diff --git a/images/ISA.png b/images/ISA.png index 18bf414..9bfdfde 100644 Binary files a/images/ISA.png and b/images/ISA.png differ diff --git a/src/testbench/.gitignore b/src/testbench/.gitignore index f21eae4..d5e41f0 100644 --- a/src/testbench/.gitignore +++ b/src/testbench/.gitignore @@ -1,2 +1,2 @@ -./simulation.vvp -./dump.vcd \ No newline at end of file +simulation.vvp +dump.vcd diff --git a/src/testbench/computer_tb.v b/src/testbench/computer_tb.v index 8bfe24d..2235f44 100644 --- a/src/testbench/computer_tb.v +++ b/src/testbench/computer_tb.v @@ -22,6 +22,10 @@ // `define MEMORY "memory/conditional-jmp.hex" // `define MEMORY_CHECK "memory-check/conditional-jmp.hex" +// // Test OR +// `define MEMORY "memory/or.hex" +// `define MEMORY_CHECK "memory-check/or.hex" + // // Test SUB // `define MEMORY "memory/sub.hex" // `define MEMORY_CHECK "memory-check/sub.hex" diff --git a/src/testbench/memory-check/or.hex b/src/testbench/memory-check/or.hex new file mode 100644 index 0000000..8c6bfe9 --- /dev/null +++ b/src/testbench/memory-check/or.hex @@ -0,0 +1,32 @@ +89 +20 +ab +8a +20 +0b +20 +ac +ff +03 +04 +fc +07 +ff +ff +ff +ff +ff +ff +ff +ff +ff +ff +ff +ff +ff +ff +ff +ff +ff +ff +ff \ No newline at end of file diff --git a/src/testbench/memory/nop.hex b/src/testbench/memory/nop.hex index 8cfc19b..b9e5825 100644 --- a/src/testbench/memory/nop.hex +++ b/src/testbench/memory/nop.hex @@ -29,5 +29,4 @@ FF FF FF FF -FF FF \ No newline at end of file diff --git a/src/testbench/memory/or.hex b/src/testbench/memory/or.hex new file mode 100644 index 0000000..421de22 --- /dev/null +++ b/src/testbench/memory/or.hex @@ -0,0 +1,32 @@ +89 +20 +AB +8A +20 +0B +20 +AC +FF +03 +04 +FF +FF +FF +FF +FF +FF +FF +FF +FF +FF +FF +FF +FF +FF +FF +FF +FF +FF +FF +FF +FF \ No newline at end of file diff --git a/src/testbench/simulation.vvp b/src/testbench/simulation.vvp deleted file mode 100755 index f14095c..0000000 --- a/src/testbench/simulation.vvp +++ /dev/null @@ -1,559 +0,0 @@ -#! /usr/bin/vvp -:ivl_version "11.0 (stable)"; -:ivl_delay_selection "TYPICAL"; -:vpi_time_precision + 0; -:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/system.vpi"; -:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/vhdl_sys.vpi"; -:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/vhdl_textio.vpi"; -:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/v2005_math.vpi"; -:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/va_math.vpi"; -:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/v2009.vpi"; -S_0x5617883c98a0 .scope package, "$unit" "$unit" 2 1; - .timescale 0 0; -S_0x5617883c9a30 .scope module, "computer_tb" "computer_tb" 3 33; - .timescale 0 0; -v0x5617883ee620_0 .net "addr", 4 0, v0x5617883ed4d0_0; 1 drivers -v0x5617883ee700_0 .var "clk", 0 0; -v0x5617883ee7d0_0 .net "halt", 0 0, v0x5617883ed820_0; 1 drivers -v0x5617883ee8d0_0 .var/i "i", 31 0; -v0x5617883ee970_0 .var "idata", 7 0; -v0x5617883eea10 .array "memory", 0 31, 7 0; -v0x5617883eeab0 .array "memory_check", 0 31, 7 0; -v0x5617883eeb50_0 .net "odata", 7 0, v0x5617883edd00_0; 1 drivers -v0x5617883eec40_0 .var/i "pass", 31 0; -v0x5617883eed00_0 .var "rst_n", 0 0; -v0x5617883eedd0_0 .var "start", 0 0; -v0x5617883eeea0_0 .net "we", 0 0, v0x5617883ee460_0; 1 drivers -E_0x5617883b8630 .event edge, v0x5617883ed4d0_0, v0x5617883ee460_0; -S_0x5617883b56f0 .scope module, "dut" "computer" 3 45, 4 1 0, S_0x5617883c9a30; - .timescale 0 0; - .port_info 0 /INPUT 1 "clk"; - .port_info 1 /INPUT 1 "rst_n"; - .port_info 2 /INPUT 1 "start"; - .port_info 3 /OUTPUT 1 "halt"; - .port_info 4 /OUTPUT 1 "we"; - .port_info 5 /INPUT 8 "idata"; - .port_info 6 /OUTPUT 8 "odata"; - .port_info 7 /OUTPUT 5 "addr"; -v0x5617883b59e0_0 .var "accumulator", 7 0; -v0x5617883ed4d0_0 .var "addr", 4 0; -v0x5617883ed5b0_0 .net "clk", 0 0, v0x5617883ee700_0; 1 drivers -v0x5617883ed650_0 .var "flag_n", 0 0; -v0x5617883ed710_0 .var "flag_p", 0 0; -v0x5617883ed820_0 .var "halt", 0 0; -v0x5617883ed8e0_0 .net "idata", 7 0, v0x5617883ee970_0; 1 drivers -v0x5617883ed9c0_0 .var "jump_amt", 2 0; -v0x5617883edaa0_0 .var "jump_n", 0 0; -v0x5617883edb60_0 .var "jump_p", 0 0; -v0x5617883edc20_0 .var "next_state", 1 0; -v0x5617883edd00_0 .var "odata", 7 0; -v0x5617883edde0_0 .var "opcode", 2 0; -v0x5617883edec0_0 .var "pc", 4 0; -v0x5617883edfa0_0 .net "rst_n", 0 0, v0x5617883eed00_0; 1 drivers -v0x5617883ee060_0 .var "shift_a", 0 0; -v0x5617883ee120_0 .var "shift_amt", 2 0; -v0x5617883ee200_0 .var "shift_l", 0 0; -v0x5617883ee2c0_0 .net "start", 0 0, v0x5617883eedd0_0; 1 drivers -v0x5617883ee380_0 .var "state", 1 0; -v0x5617883ee460_0 .var "we", 0 0; -E_0x5617883b8180 .event edge, v0x5617883ee380_0; -E_0x5617883b6280 .event posedge, v0x5617883ed5b0_0; - .scope S_0x5617883b56f0; -T_0 ; - %wait E_0x5617883b6280; - %load/vec4 v0x5617883edfa0_0; - %nor/r; - %flag_set/vec4 8; - %jmp/0xz T_0.0, 8; - %pushi/vec4 3, 0, 2; - %assign/vec4 v0x5617883ee380_0, 0; - %jmp T_0.1; -T_0.0 ; - %load/vec4 v0x5617883ee2c0_0; - %load/vec4 v0x5617883ed820_0; - %nor/r; - %and; - %flag_set/vec4 8; - %jmp/0xz T_0.2, 8; - %load/vec4 v0x5617883edc20_0; - %assign/vec4 v0x5617883ee380_0, 0; - %jmp T_0.3; -T_0.2 ; - %pushi/vec4 3, 0, 2; - %assign/vec4 v0x5617883ee380_0, 0; -T_0.3 ; -T_0.1 ; - %jmp T_0; - .thread T_0; - .scope S_0x5617883b56f0; -T_1 ; - %wait E_0x5617883b8180; - %pushi/vec4 0, 0, 1; - %assign/vec4 v0x5617883ee460_0, 0; - %load/vec4 v0x5617883ee380_0; - %dup/vec4; - %pushi/vec4 0, 0, 2; - %cmp/u; - %jmp/1 T_1.0, 6; - %dup/vec4; - %pushi/vec4 1, 0, 2; - %cmp/u; - %jmp/1 T_1.1, 6; - %dup/vec4; - %pushi/vec4 2, 0, 2; - %cmp/u; - %jmp/1 T_1.2, 6; - %dup/vec4; - %pushi/vec4 3, 0, 2; - %cmp/u; - %jmp/1 T_1.3, 6; - %pushi/vec4 0, 0, 2; - %assign/vec4 v0x5617883edc20_0, 0; - %jmp T_1.5; -T_1.0 ; - %load/vec4 v0x5617883edec0_0; - %assign/vec4 v0x5617883ed4d0_0, 0; - %load/vec4 v0x5617883edec0_0; - %addi 1, 0, 5; - %assign/vec4 v0x5617883edec0_0, 0; - %pushi/vec4 1, 0, 2; - %assign/vec4 v0x5617883edc20_0, 0; - %jmp T_1.5; -T_1.1 ; - %load/vec4 v0x5617883ed8e0_0; - %parti/s 3, 5, 4; - %assign/vec4 v0x5617883edde0_0, 0; - %load/vec4 v0x5617883ed8e0_0; - %parti/s 3, 5, 4; - %dup/vec4; - %pushi/vec4 0, 0, 3; - %cmp/u; - %jmp/1 T_1.6, 6; - %dup/vec4; - %pushi/vec4 2, 0, 3; - %cmp/u; - %jmp/1 T_1.7, 6; - %dup/vec4; - %pushi/vec4 4, 0, 3; - %cmp/u; - %jmp/1 T_1.8, 6; - %dup/vec4; - %pushi/vec4 5, 0, 3; - %cmp/u; - %jmp/1 T_1.9, 6; - %dup/vec4; - %pushi/vec4 6, 0, 3; - %cmp/u; - %jmp/1 T_1.10, 6; - %load/vec4 v0x5617883ed4d0_0; - %assign/vec4 v0x5617883ed4d0_0, 0; - %jmp T_1.12; -T_1.6 ; - %load/vec4 v0x5617883ed8e0_0; - %parti/s 5, 0, 2; - %assign/vec4 v0x5617883ed4d0_0, 0; - %jmp T_1.12; -T_1.7 ; - %load/vec4 v0x5617883ed8e0_0; - %parti/s 5, 0, 2; - %assign/vec4 v0x5617883ed4d0_0, 0; - %jmp T_1.12; -T_1.8 ; - %load/vec4 v0x5617883ed8e0_0; - %parti/s 5, 0, 2; - %assign/vec4 v0x5617883ed4d0_0, 0; - %jmp T_1.12; -T_1.9 ; - %load/vec4 v0x5617883ed8e0_0; - %parti/s 5, 0, 2; - %assign/vec4 v0x5617883ed4d0_0, 0; - %jmp T_1.12; -T_1.10 ; - %load/vec4 v0x5617883ed8e0_0; - %parti/s 5, 0, 2; - %assign/vec4 v0x5617883ed4d0_0, 0; - %jmp T_1.12; -T_1.12 ; - %pop/vec4 1; - %load/vec4 v0x5617883ed8e0_0; - %parti/s 3, 5, 4; - %dup/vec4; - %pushi/vec4 3, 0, 3; - %cmp/u; - %jmp/1 T_1.13, 6; - %pushi/vec4 0, 0, 1; - %assign/vec4 v0x5617883ee200_0, 0; - %pushi/vec4 0, 0, 1; - %assign/vec4 v0x5617883ee060_0, 0; - %pushi/vec4 0, 0, 3; - %assign/vec4 v0x5617883ee120_0, 0; - %jmp T_1.15; -T_1.13 ; - %load/vec4 v0x5617883ed8e0_0; - %parti/s 1, 4, 4; - %assign/vec4 v0x5617883ee200_0, 0; - %load/vec4 v0x5617883ed8e0_0; - %parti/s 1, 3, 3; - %assign/vec4 v0x5617883ee060_0, 0; - %load/vec4 v0x5617883ed8e0_0; - %parti/s 3, 0, 2; - %assign/vec4 v0x5617883ee120_0, 0; - %jmp T_1.15; -T_1.15 ; - %pop/vec4 1; - %load/vec4 v0x5617883ed8e0_0; - %parti/s 3, 5, 4; - %dup/vec4; - %pushi/vec4 7, 0, 3; - %cmp/u; - %jmp/1 T_1.16, 6; - %pushi/vec4 0, 0, 1; - %assign/vec4 v0x5617883edaa0_0, 0; - %pushi/vec4 0, 0, 1; - %assign/vec4 v0x5617883edb60_0, 0; - %pushi/vec4 0, 0, 3; - %assign/vec4 v0x5617883ed9c0_0, 0; - %jmp T_1.18; -T_1.16 ; - %load/vec4 v0x5617883ed8e0_0; - %parti/s 1, 4, 4; - %assign/vec4 v0x5617883edaa0_0, 0; - %load/vec4 v0x5617883ed8e0_0; - %parti/s 1, 3, 3; - %assign/vec4 v0x5617883edb60_0, 0; - %load/vec4 v0x5617883ed8e0_0; - %parti/s 3, 0, 2; - %assign/vec4 v0x5617883ed9c0_0, 0; - %jmp T_1.18; -T_1.18 ; - %pop/vec4 1; - %pushi/vec4 2, 0, 2; - %assign/vec4 v0x5617883edc20_0, 0; - %jmp T_1.5; -T_1.2 ; - %load/vec4 v0x5617883edde0_0; - %dup/vec4; - %pushi/vec4 0, 0, 3; - %cmp/u; - %jmp/1 T_1.19, 6; - %dup/vec4; - %pushi/vec4 1, 0, 3; - %cmp/u; - %jmp/1 T_1.20, 6; - %dup/vec4; - %pushi/vec4 2, 0, 3; - %cmp/u; - %jmp/1 T_1.21, 6; - %dup/vec4; - %pushi/vec4 3, 0, 3; - %cmp/u; - %jmp/1 T_1.22, 6; - %dup/vec4; - %pushi/vec4 4, 0, 3; - %cmp/u; - %jmp/1 T_1.23, 6; - %dup/vec4; - %pushi/vec4 5, 0, 3; - %cmp/u; - %jmp/1 T_1.24, 6; - %dup/vec4; - %pushi/vec4 6, 0, 3; - %cmp/u; - %jmp/1 T_1.25, 6; - %dup/vec4; - %pushi/vec4 7, 0, 3; - %cmp/u; - %jmp/1 T_1.26, 6; - %jmp T_1.27; -T_1.19 ; - %load/vec4 v0x5617883b59e0_0; - %load/vec4 v0x5617883ed8e0_0; - %and; - %assign/vec4 v0x5617883b59e0_0, 0; - %jmp T_1.27; -T_1.20 ; - %load/vec4 v0x5617883b59e0_0; - %inv; - %assign/vec4 v0x5617883b59e0_0, 0; - %jmp T_1.27; -T_1.21 ; - %load/vec4 v0x5617883b59e0_0; - %load/vec4 v0x5617883ed8e0_0; - %add; - %assign/vec4 v0x5617883b59e0_0, 0; - %jmp T_1.27; -T_1.22 ; - %load/vec4 v0x5617883ee200_0; - %load/vec4 v0x5617883ee060_0; - %concat/vec4; draw_concat_vec4 - %dup/vec4; - %pushi/vec4 0, 0, 2; - %cmp/u; - %jmp/1 T_1.28, 6; - %dup/vec4; - %pushi/vec4 1, 0, 2; - %cmp/u; - %jmp/1 T_1.29, 6; - %dup/vec4; - %pushi/vec4 2, 0, 2; - %cmp/u; - %jmp/1 T_1.30, 6; - %dup/vec4; - %pushi/vec4 3, 0, 2; - %cmp/u; - %jmp/1 T_1.31, 6; - %jmp T_1.32; -T_1.28 ; - %load/vec4 v0x5617883b59e0_0; - %ix/getv 4, v0x5617883ee120_0; - %shiftr 4; - %assign/vec4 v0x5617883b59e0_0, 0; - %jmp T_1.32; -T_1.29 ; - %load/vec4 v0x5617883b59e0_0; - %parti/s 1, 7, 4; - %load/vec4 v0x5617883b59e0_0; - %parti/s 7, 0, 2; - %ix/getv 4, v0x5617883ee120_0; - %shiftr 4; - %concat/vec4; draw_concat_vec4 - %assign/vec4 v0x5617883b59e0_0, 0; - %jmp T_1.32; -T_1.30 ; - %load/vec4 v0x5617883b59e0_0; - %ix/getv 4, v0x5617883ee120_0; - %shiftl 4; - %assign/vec4 v0x5617883b59e0_0, 0; - %jmp T_1.32; -T_1.31 ; - %load/vec4 v0x5617883b59e0_0; - %ix/getv 4, v0x5617883ee120_0; - %shiftl 4; - %assign/vec4 v0x5617883b59e0_0, 0; - %jmp T_1.32; -T_1.32 ; - %pop/vec4 1; - %jmp T_1.27; -T_1.23 ; - %load/vec4 v0x5617883ed8e0_0; - %assign/vec4 v0x5617883b59e0_0, 0; - %jmp T_1.27; -T_1.24 ; - %pushi/vec4 1, 0, 1; - %assign/vec4 v0x5617883ee460_0, 0; - %load/vec4 v0x5617883b59e0_0; - %assign/vec4 v0x5617883edd00_0, 0; - %jmp T_1.27; -T_1.25 ; - %load/vec4 v0x5617883b59e0_0; - %load/vec4 v0x5617883ed8e0_0; - %cmp/ne; - %jmp/0xz T_1.33, 4; - %load/vec4 v0x5617883ed8e0_0; - %load/vec4 v0x5617883b59e0_0; - %cmp/u; - %flag_mov 8, 5; - %jmp/0 T_1.35, 8; - %pushi/vec4 1, 0, 1; - %jmp/1 T_1.36, 8; -T_1.35 ; End of true expr. - %pushi/vec4 0, 0, 1; - %jmp/0 T_1.36, 8; - ; End of false expr. - %blend; -T_1.36; - %assign/vec4 v0x5617883ed710_0, 0; - %load/vec4 v0x5617883b59e0_0; - %load/vec4 v0x5617883ed8e0_0; - %cmp/u; - %flag_mov 8, 5; - %jmp/0 T_1.37, 8; - %pushi/vec4 1, 0, 1; - %jmp/1 T_1.38, 8; -T_1.37 ; End of true expr. - %pushi/vec4 0, 0, 1; - %jmp/0 T_1.38, 8; - ; End of false expr. - %blend; -T_1.38; - %assign/vec4 v0x5617883ed650_0, 0; - %jmp T_1.34; -T_1.33 ; - %pushi/vec4 0, 0, 1; - %assign/vec4 v0x5617883ed710_0, 0; - %pushi/vec4 0, 0, 1; - %assign/vec4 v0x5617883ed650_0, 0; -T_1.34 ; - %jmp T_1.27; -T_1.26 ; - %load/vec4 v0x5617883ed9c0_0; - %load/vec4 v0x5617883edaa0_0; - %concat/vec4; draw_concat_vec4 - %load/vec4 v0x5617883edb60_0; - %concat/vec4; draw_concat_vec4 - %cmpi/e 31, 0, 5; - %jmp/0xz T_1.39, 4; - %pushi/vec4 1, 0, 1; - %assign/vec4 v0x5617883ed820_0, 0; - %jmp T_1.40; -T_1.39 ; - %pushi/vec4 0, 0, 1; - %assign/vec4 v0x5617883ed820_0, 0; - %load/vec4 v0x5617883ed650_0; - %load/vec4 v0x5617883edaa0_0; - %cmp/e; - %flag_get/vec4 4; - %load/vec4 v0x5617883ed710_0; - %load/vec4 v0x5617883edb60_0; - %cmp/e; - %flag_get/vec4 4; - %and; - %flag_set/vec4 8; - %load/vec4 v0x5617883edaa0_0; - %load/vec4 v0x5617883edb60_0; - %concat/vec4; draw_concat_vec4 - %cmpi/e 3, 0, 2; - %flag_or 4, 8; - %jmp/0xz T_1.41, 4; - %load/vec4 v0x5617883edec0_0; - %load/vec4 v0x5617883ed9c0_0; - %parti/s 1, 2, 3; - %replicate 3; - %load/vec4 v0x5617883ed9c0_0; - %parti/s 2, 0, 2; - %concat/vec4; draw_concat_vec4 - %ix/load 4, 1, 0; - %flag_set/imm 4, 0; - %shiftl 4; - %add; - %assign/vec4 v0x5617883edec0_0, 0; - %jmp T_1.42; -T_1.41 ; - %load/vec4 v0x5617883edec0_0; - %assign/vec4 v0x5617883edec0_0, 0; -T_1.42 ; -T_1.40 ; - %jmp T_1.27; -T_1.27 ; - %pop/vec4 1; - %pushi/vec4 0, 0, 2; - %assign/vec4 v0x5617883edc20_0, 0; - %jmp T_1.5; -T_1.3 ; - %pushi/vec4 0, 0, 5; - %assign/vec4 v0x5617883edec0_0, 0; - %pushi/vec4 0, 0, 1; - %assign/vec4 v0x5617883ed820_0, 0; - %pushi/vec4 0, 0, 1; - %assign/vec4 v0x5617883ed710_0, 0; - %pushi/vec4 0, 0, 1; - %assign/vec4 v0x5617883ed650_0, 0; - %pushi/vec4 0, 0, 2; - %assign/vec4 v0x5617883edc20_0, 0; - %jmp T_1.5; -T_1.5 ; - %pop/vec4 1; - %jmp T_1; - .thread T_1, $push; - .scope S_0x5617883c9a30; -T_2 ; - %vpi_call/w 3 59 "$dumpfile", "dump.vcd" {0 0 0}; - %end; - .thread T_2; - .scope S_0x5617883c9a30; -T_3 ; - %vpi_call/w 3 66 "$readmemh", "memory/and.hex", v0x5617883eea10 {0 0 0}; - %vpi_call/w 3 67 "$readmemh", "memory-check/and.hex", v0x5617883eeab0 {0 0 0}; - %end; - .thread T_3; - .scope S_0x5617883c9a30; -T_4 ; - %wait E_0x5617883b8630; - %load/vec4 v0x5617883eeea0_0; - %flag_set/vec4 8; - %jmp/0xz T_4.0, 8; - %load/vec4 v0x5617883eeb50_0; - %load/vec4 v0x5617883ee620_0; - %pad/u 7; - %ix/vec4 3; - %ix/load 4, 0, 0; Constant delay - %assign/vec4/a/d v0x5617883eea10, 0, 4; - %jmp T_4.1; -T_4.0 ; - %load/vec4 v0x5617883ee620_0; - %pad/u 7; - %ix/vec4 4; - %load/vec4a v0x5617883eea10, 4; - %assign/vec4 v0x5617883ee970_0, 0; -T_4.1 ; - %jmp T_4; - .thread T_4, $push; - .scope S_0x5617883c9a30; -T_5 ; - %pushi/vec4 0, 0, 1; - %store/vec4 v0x5617883ee700_0, 0, 1; -T_5.0 ; - %delay 1, 0; - %load/vec4 v0x5617883ee700_0; - %inv; - %store/vec4 v0x5617883ee700_0, 0, 1; - %jmp T_5.0; - %end; - .thread T_5; - .scope S_0x5617883c9a30; -T_6 ; - %pushi/vec4 0, 0, 1; - %store/vec4 v0x5617883eedd0_0, 0, 1; - %pushi/vec4 1, 0, 1; - %store/vec4 v0x5617883eed00_0, 0, 1; - %delay 1, 0; - %pushi/vec4 0, 0, 1; - %store/vec4 v0x5617883eed00_0, 0, 1; - %delay 1, 0; - %pushi/vec4 1, 0, 1; - %store/vec4 v0x5617883eed00_0, 0, 1; - %delay 4, 0; - %pushi/vec4 1, 0, 1; - %store/vec4 v0x5617883eedd0_0, 0, 1; - %delay 200, 0; - %pushi/vec4 1, 0, 32; - %store/vec4 v0x5617883eec40_0, 0, 32; - %pushi/vec4 0, 0, 32; - %store/vec4 v0x5617883ee8d0_0, 0, 32; -T_6.0 ; - %load/vec4 v0x5617883ee8d0_0; - %cmpi/s 32, 0, 32; - %jmp/0xz T_6.1, 5; - %vpi_call/w 3 100 "$display", "%0d: %h", v0x5617883ee8d0_0, &A {0 0 0}; - %ix/getv/s 4, v0x5617883ee8d0_0; - %load/vec4a v0x5617883eea10, 4; - %ix/getv/s 4, v0x5617883ee8d0_0; - %load/vec4a v0x5617883eeab0, 4; - %cmp/ne; - %jmp/0xz T_6.2, 4; - %pushi/vec4 0, 0, 32; - %store/vec4 v0x5617883eec40_0, 0, 32; -T_6.2 ; - %load/vec4 v0x5617883ee8d0_0; - %addi 1, 0, 32; - %store/vec4 v0x5617883ee8d0_0, 0, 32; - %jmp T_6.0; -T_6.1 ; - %load/vec4 v0x5617883eec40_0; - %cmpi/ne 0, 0, 32; - %jmp/0xz T_6.4, 4; - %vpi_call/w 3 107 "$display", "Test passed" {0 0 0}; - %jmp T_6.5; -T_6.4 ; - %vpi_call/w 3 110 "$display", "Test failed" {0 0 0}; -T_6.5 ; - %vpi_call/w 3 113 "$finish" {0 0 0}; - %end; - .thread T_6; -# The file index is used to find the file name in the following table. -:file_names 5; - "N/A"; - ""; - "-"; - "computer_tb.v"; - "../rtl/computer.v";