This 3-bit comparator requires two 3-bit inputs and outputs whether the first input is greater than / less than / or equal to the second input. In practice, the 3-bit comparator would compare two numbers and output the relation between them.
To verify this module, the binary input bits were converted into their decimal representation and compared mathematically, example: inputs of 010 and 010 represent, 2 and 2, which the module would output 001 for the outputs: GT, LT, and EQ, respectively.
Simulation results from the Verilog representation of this Three-Bit Comparator
- Three-Bit Comparator Module - three_bit_comparator.v
- Three-Bit Comparator Test Bench - three_bit_comparator_test.v