// // Title : Problem 1 test fixture // Design : Homework 3 // Author : Carl Ebeling // Company : CSE 370 // //------------------------------------------------------------------------------------------------- // // File : problem1_tf.v // // Description : This test fixture tests the multiplexor // //------------------------------------------------------------------------------------------------- `timescale 1ns / 1ns module if_then_else_tf (A, B, S, F1, F2); output A, B, S ; input F1, F2 ; reg A, B, S; integer errors; initial begin errors = 0; A = 0; B = 0; S = 0; #10 if ((F1 != 0) || (F2 != 0)) errors = errors + 1; A = 0; B = 0; S = 1; #10 if ((F1 != 0) || (F2 != 0)) errors = errors + 1; A = 0; B = 0; S = 0; #10 if ((F1 != 0) || (F2 != 0)) errors = errors + 1; A = 0; B = 1; S = 0; #10 if ((F1 != 0) || (F2 != 0)) errors = errors + 1; A = 1; B = 1; S = 0; #10 if ((F1 != 1) || (F2 != 1)) errors = errors + 1; A = 1; B = 1; S = 1; #10 if ((F1 != 1) || (F2 != 1)) errors = errors + 1; A = 1; B = 1; S = 0; #10 if ((F1 != 1) || (F2 != 1)) errors = errors + 1; A = 0; B = 1; S = 0; #10 if ((F1 != 0) || (F2 != 0)) errors = errors + 1; if (errors == 0) $display("No errors!!"); else $display("%d Errors", errors); end endmodule