Untitled
Anonymous
plain_text
11/13/2023 11:15 PM
1020 B
12
Indexable
////////////////////////////////////////////////////////////////////////////// // // author: Stevo Bailey ([email protected]) // // Parity Checker // // Checks parity bit against the data. ////////////////////////////////////////////////////////////////////////////// module stv_parity_check #( // input data type parameter type DTYPE = logic[7:0] ) ( // if 1, generate even parity, otherwise generate odd parity input logic even, // input data input DTYPE data, // input parity input logic parity, // output parity good signal, high if parity check passes, otherwise low output logic good ); logic exp_parity; always_comb begin exp_parity = even ^ (^data); good = parity == exp_parity; end endmodule : stv_parity_check
Editor is loading...
Leave a Comment