-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
There seems to be an issue while running the test bench:
The program should store 8 into mem address 123.
The check is kind of strange:
cout << "top->MEM[123] = " << ((int)top->MEM[1000]) << endl;
assert(top->MEM[123] == ((8 + 1000) + 1000));
Complete output of test:
make: Entering directory '/home/jlusiardi/Dokumente/src/TinyCPU_orig/obj_dir'
make: 'Vcpu_forwarded' is up to date.
make: Leaving directory '/home/jlusiardi/Dokumente/src/TinyCPU_orig/obj_dir'
Testing arithmetic result forwarding
Instruction being issued = 00000000000000000000000000000000
decode_ireg_out = 00000000000000000000000000000000
execute_ireg_out = 00000000000000000000000000000000
memory_ireg_out = 00000000000000000000000000000000
read_data_0 = 0
read_data_1 = 0
stall = 0
squash = 0
Instruction being issued = 00000000000000000000000000000000
decode_ireg_out = 00000000000000000000000000000000
execute_ireg_out = 00000000000000000000000000000000
memory_ireg_out = 00000000000000000000000000000000
read_data_0 = 0
read_data_1 = 0
stall = 0
squash = 0
operand 0 written by exe = 0
operand 1 written by exe = 0
forwarded alu result = 0
Memory read address 0 0
Memory read address 1 0
Instruction being issued = 00001000000000000100000000000000
decode_ireg_out = 00000000000000000000000000000000
execute_ireg_out = 00000000000000000000000000000000
memory_ireg_out = 00000000000000000000000000000000
read_data_0 = 0
read_data_1 = 0
stall = 0
squash = 0
operand 0 written by exe = 0
operand 1 written by exe = 0
forwarded alu result = 0
Memory read address 0 1
Memory read address 1 0
Instruction being issued = 00001000000111110100000001000000
decode_ireg_out = 00001000000000000100000000000000
execute_ireg_out = 00000000000000000000000000000000
memory_ireg_out = 00000000000000000000000000000000
read_data_0 = 0
read_data_1 = 0
stall = 0
squash = 0
operand 0 written by exe = 1
operand 1 written by exe = 1
forwarded alu result = 0
Memory read address 0 2
Memory read address 1 0
Instruction being issued = 00101000000000100010000110000000
decode_ireg_out = 00001000000111110100000001000000
execute_ireg_out = 00001000000000000100000000000000
memory_ireg_out = 00000000000000000000000000000000
read_data_0 = 0
read_data_1 = 0
stall = 0
squash = 0
operand 0 written by exe = 0
operand 1 written by exe = 1
forwarded alu result = 0
Memory read address 0 3
Memory read address 1 0
Instruction being issued = 00101000010001000011001010000000
decode_ireg_out = 00101000000000100010000110000000
execute_ireg_out = 00001000000111110100000001000000
memory_ireg_out = 00001000000000000100000000000000
read_data_0 = 0
read_data_1 = 0
stall = 0
squash = 0
operand 0 written by exe = 0
operand 1 written by exe = 1
forwarded alu result = 0
Memory read address 0 4
Memory read address 1 0
Writing 8 to register 0
Instruction being issued = 00001000000000111101100001000000
decode_ireg_out = 00101000010001000011001010000000
execute_ireg_out = 00101000000000100010000110000000
memory_ireg_out = 00001000000111110100000001000000
read_data_0 = 0
read_data_1 = 0
stall = 0
squash = 0
operand 0 written by exe = 0
operand 1 written by exe = 0
forwarded alu result = 0
Memory read address 0 5
Memory read address 1 0
Writing 1000 to register 1
Instruction being issued = 00011000000000100000000000000000
decode_ireg_out = 00001000000000111101100001000000
execute_ireg_out = 00101000010001000011001010000000
memory_ireg_out = 00101000000000100010000110000000
read_data_0 = 0
read_data_1 = 0
stall = 0
squash = 0
operand 0 written by exe = 0
operand 1 written by exe = 1
forwarded alu result = 0
Memory read address 0 6
Memory read address 1 0
Writing 0 to register 2
Instruction being issued = 00000000000000000000000000000000
decode_ireg_out = 00011000000000100000000000000000
execute_ireg_out = 00001000000000111101100001000000
memory_ireg_out = 00101000010001000011001010000000
read_data_0 = 8
read_data_1 = 0
stall = 0
squash = 0
operand 0 written by exe = 0
operand 1 written by exe = 0
forwarded alu result = 8
Memory read address 0 7
Memory read address 1 0
Writing 0 to register 3
Instruction being issued = 00000000000000000000000000000000
decode_ireg_out = 00000000000000000000000000000000
execute_ireg_out = 00011000000000100000000000000000
memory_ireg_out = 00001000000000111101100001000000
read_data_0 = 8
read_data_1 = 1000
stall = 0
squash = 0
operand 0 written by exe = 0
operand 1 written by exe = 0
forwarded alu result = 1000
Memory read address 0 8
Memory read address 1 8
Writing 00000000000000000000000000001000 to memory address 00000000000000000000000000000000
Writing 123 to register 1
Instruction being issued = 00000000000000000000000000000000
decode_ireg_out = 00000000000000000000000000000000
execute_ireg_out = 00000000000000000000000000000000
memory_ireg_out = 00011000000000100000000000000000
read_data_0 = 8
read_data_1 = 1000
stall = 0
squash = 0
operand 0 written by exe = 0
operand 1 written by exe = 0
forwarded alu result = 1000
Memory read address 0 9
Memory read address 1 8
top->MEM[123] = 0
Vcpu_forwarded: ../cpu_forwarded_main.cpp:256: void test_forwarded_arith(int, char**): Assertion `top->MEM[123] == ((8 + 1000) + 1000)' failed.
Aborted
ERROR: cpu_forwarded tests failed
Traceback (most recent call last):
File "test_bench.py", line 10, in <module>
build_module('cpu_forwarded', '-Icommon -Icpu_forwarded')
File "/home/jlusiardi/Dokumente/src/TinyCPU_orig/testbench_utils.py", line 35, in build_module
build_module_with_main(mod_name, mod_name + '_main.cpp', flags)
File "/home/jlusiardi/Dokumente/src/TinyCPU_orig/testbench_utils.py", line 32, in build_module_with_main
assert(False)
AssertionError
Metadata
Metadata
Assignees
Labels
No labels