// // Title : Problem 2a test fixture // Design : Homework 3 // Author : Carl Ebeling // Company : CSE 370 // //------------------------------------------------------------------------------------------------- // // File : problem2a_tf.v // // Description : This test fixture tests the 2-bit comparator // //------------------------------------------------------------------------------------------------- `timescale 1ns / 1ns module hw1_3a_tf (A, B, EQ, GT); output [1:0] A, B; input EQ, GT; reg [1:0] A, B; integer errors; integer count; initial begin errors = 0; for (count = 0; count < 16; count = count + 1) begin { A, B } = count; #10 if (EQ != (A == B)) errors = errors + 1; if (GT != (A > B)) errors = errors + 1; end if (errors == 0) $display("Test passed - No errors!!"); else $display("**** %d Errors****", errors); end endmodule