//-------------------------------------------------------------------------------------------------- // // Title : fibonacci_tf // Design : lab5_sp05 // Author : cse // Company : uw // //------------------------------------------------------------------------------------------------- // // File : fibonacci_tf.v // Generated : Wed Oct 12 17:39:07 2005 // From : interface description file // By : Itf2Vhdl ver. 1.20 // //------------------------------------------------------------------------------------------------- // // Description : // //------------------------------------------------------------------------------------------------- `timescale 1 ns / 1 ps //{{ Section below this comment is automatically maintained // and may be overwritten //{module {fibonacci_tf}} module fibonacci_tf(A, B, C, D, f); input f; output A; reg A; output B; reg B; output C; reg C; output D; reg D; reg passed; initial begin passed = 1; A = 0; B = 0; C = 0; D = 1; #10 if (f !== 1) begin if (f === 1'bx) \$display("Error: x detected for case 1"); else if (f === 1'bz) \$display("Error: z detected for case 1"); else \$display("Error: didn't detect 1 as a fibonacci"); passed = 0; end A = 0; B = 0; C = 1; D = 0; #10 if (f !== 1) begin if (f === 1'bx) \$display("Error: x detected for case 2"); else if (f === 1'bz) \$display("Error: z detected for case 2"); else \$display("Error: didn't detect 2 as a fibonacci"); passed = 0; end A = 0; B = 0; C = 1; D = 1; #10 if (f !== 1) begin if (f === 1'bx) \$display("Error: x detected for case 3"); else if (f === 1'bz) \$display("Error: z detected for case 3"); else \$display("Error: didn't detect 3 as a fibonacci"); passed = 0; end A = 0; B = 1; C = 0; D = 0; #10 if (f !== 0) begin if (f === 1'bx) \$display("Error: x detected for case 4"); else if (f === 1'bz) \$display("Error: z detected for case 4"); else \$display("Error: detected 4 as a fibonacci"); passed = 0; end A = 0; B = 1; C = 0; D = 1; #10 if (f !== 1) begin if (f === 1'bx) \$display("Error: x detected for case 5"); else if (f === 1'bz) \$display("Error: z detected for case 5"); else \$display("Error: didn't detect 5 as a fibonacci"); passed = 0; end A = 0; B = 1; C = 1; D = 0; #10 if (f !== 0) begin if (f === 1'bx) \$display("Error: x detected for case 6"); else if (f === 1'bz) \$display("Error: z detected for case 6"); else \$display("Error: detected 6 as a fibonacci"); passed = 0; end A = 0; B = 1; C = 1; D = 1; #10 if (f !== 0) begin if (f === 1'bx) \$display("Error: x detected for case 7"); else if (f === 1'bz) \$display("Error: z detected for case 7"); else \$display("Error: detected 7 as a fibonacci"); passed = 0; end A = 1; B = 0; C = 0; D = 0; #10 if (f !== 1) begin if (f === 1'bx) \$display("Error: x detected for case 8"); else if (f === 1'bz) \$display("Error: z detected for case 8"); else \$display("Error: didn't detect 8 as a fibonacci"); passed = 0; end A = 1; B = 0; C = 0; D = 1; #10 if (f !== 0) begin if (f === 1'bx) \$display("Error: x detected for case 9"); else if (f === 1'bz) \$display("Error: z detected for case 9"); else \$display("Error: detected 9 as a fibonacci"); passed = 0; end A = 1; B = 0; C = 1; D = 0; #10 if (f !== 0) begin if (f === 1'bx) \$display("Error: x detected for case 10"); else if (f === 1'bz) \$display("Error: z detected for case 10"); else \$display("Error: detected 10 as a fibonacci"); passed = 0; end A = 1; B = 0; C = 1; D = 1; #10 if (f !== 0) begin if (f === 1'bx) \$display("Error: x detected for case 11"); else if (f === 1'bz) \$display("Error: z detected for case 11"); else \$display("Error: detected 11 as a fibonacci"); passed = 0; end A = 1; B = 1; C = 0; D = 0; #10 if (f !== 0) begin if (f === 1'bx) \$display("Error: x detected for case 12"); else if (f === 1'bz) \$display("Error: z detected for case 12"); else \$display("Error: detected 12 as a fibonacci"); passed = 0; end A = 1; B = 1; C = 0; D = 1; #10 if (f !== 1) begin if (f === 1'bx) \$display("Error: x detected for case 13"); else if (f === 1'bz) \$display("Error: z detected for case 13"); else \$display("Error: didn't detect 13 as a fibonacci"); passed = 0; end A = 1; B = 1; C = 1; D = 0; #10 if (f !== 0) begin if (f === 1'bx) \$display("Error: x detected for case 14"); else if (f === 1'bz) \$display("Error: z detected for case 14"); else \$display("Error: detected 14 as a fibonacci"); passed = 0; end A = 1; B = 1; C = 1; D = 1; #10 if (f !== 0) begin if (f === 1'bx) \$display("Error: x detected for case 15"); else if (f === 1'bz) \$display("Error: z detected for case 15"); else \$display("Error: detected 15 as a fibonacci"); passed = 0; end if (passed) \$display("Test passed"); else \$display("Test failed"); end //}} end of automatically maintained section // -- Enter your statements here -- // endmodule