diff options
Diffstat (limited to 'nandgame/arith_unit_tb.sv')
| -rw-r--r-- | nandgame/arith_unit_tb.sv | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/nandgame/arith_unit_tb.sv b/nandgame/arith_unit_tb.sv index 917a113..4c2a588 100644 --- a/nandgame/arith_unit_tb.sv +++ b/nandgame/arith_unit_tb.sv @@ -4,16 +4,16 @@ module arith_unit_tb; -logic [15:0] in1; -logic [15:0] in2; -ArithCode opcode; -logic [15:0] result; +logic [15:0] tst_in1; +logic [15:0] tst_in2; +ArithCode tst_opcode; +logic [15:0] tst_result; arith_unit uut ( - .X(in1), - .Y(in2), - .operation(opcode), - .RES(result) + .X_in(tst_in1), + .Y_in(tst_in2), + .arith_operation_in(tst_opcode), + .result_out(tst_result) ); string filename; @@ -28,41 +28,41 @@ initial begin end initial begin - in1 = 13; - in2 = 17; - opcode = ARITH_PLUS; + tst_in1 = 13; + tst_in2 = 17; + tst_opcode = ARITH_PLUS; #1 - assert(result == 30); + assert(tst_result == 30); #1 - in1 = 12; - in2 = 4; - opcode = ARITH_MINUS; + tst_in1 = 12; + tst_in2 = 4; + tst_opcode = ARITH_MINUS; #1 - assert(result == 8); + assert(tst_result == 8); #1 - in1 = 12; - in2 = 13; - opcode = ARITH_MINUS; + tst_in1 = 12; + tst_in2 = 13; + tst_opcode = ARITH_MINUS; #1 - assert(result == 16'hffff); + assert(tst_result == 16'hffff); #1 - in1 = 13; - in2 = 17; - opcode = ARITH_INC; + tst_in1 = 13; + tst_in2 = 17; + tst_opcode = ARITH_INC; #1 - assert(result == 14); + assert(tst_result == 14); #1 - in1 = 13; - in2 = 17; - opcode = ARITH_DEC; + tst_in1 = 13; + tst_in2 = 17; + tst_opcode = ARITH_DEC; #1 - assert(result == 12); + assert(tst_result == 12); #1 - in1 = 0; - in2 = 17; - opcode = ARITH_DEC; + tst_in1 = 0; + tst_in2 = 17; + tst_opcode = ARITH_DEC; #1 - assert(result == 16'hffff); + assert(tst_result == 16'hffff); #1 $finish(); end |
