zaun / BasicCPU

Basic CPU that runs on Tang Nano 9K FPGA
6 stars 0 forks source link

"make test" has been failed #1

Open iDoka opened 1 year ago

iDoka commented 1 year ago

Verification has failed on main branch:

$ make test
iverilog -o test.out src/*.v tests/programcounter_tb.v; vvp ./test.out; rm test.out
src/controller.v:327: warning: Extra digits given for sized binary constant.
src/controller.v:335: warning: Extra digits given for sized binary constant.
src/alu.v:25: error: reg o_flag_c; cannot be driven by primitives or continuous assignment.
src/alu.v:26: error: reg o_flag_z; cannot be driven by primitives or continuous assignment.
2 error(s) during elaboration.
./test.out: Unable to open input file.
rm: cannot remove 'test.out': No such file or directory
Makefile:28: recipe for target 'test' failed
make: *** [test] Error 1

Used icarus version from https://github.com/YosysHQ/oss-cad-suite-build (build 2023-04-28):

$ iverilog -v
Icarus Verilog version 13.0 (devel) (s20221226-126-gb210eb826)
iDoka commented 1 year ago

It seems src/controller.v have several issues as well:

 $ iverilog -o test.out src/controller.v
src/controller.v:119: warning: macro OPCODE_LDA undefined (and assumed null) at this point.
src/controller.v:145: warning: macro OPCODE_LDAI undefined (and assumed null) at this point.
src/controller.v:163: warning: macro OPCODE_LDB undefined (and assumed null) at this point.
src/controller.v:189: warning: macro OPCODE_LDBI undefined (and assumed null) at this point.
src/controller.v:207: warning: macro OPCODE_LDO undefined (and assumed null) at this point.
src/controller.v:233: warning: macro OPCODE_LDOI undefined (and assumed null) at this point.
src/controller.v:251: warning: macro OPCODE_MOVA undefined (and assumed null) at this point.
src/controller.v:266: warning: macro OPCODE_ADD undefined (and assumed null) at this point.
src/controller.v:281: warning: macro OPCODE_SUB undefined (and assumed null) at this point.
src/controller.v:298: warning: macro OPCODE_JNZ undefined (and assumed null) at this point.
src/controller.v:326: warning: macro OPCODE_HLT undefined (and assumed null) at this point.
src/controller.v:119: syntax error
src/controller.v:145: syntax error
src/controller.v:163: syntax error
src/controller.v:189: syntax error
src/controller.v:207: syntax error
src/controller.v:233: syntax error
src/controller.v:251: syntax error
src/controller.v:266: syntax error
src/controller.v:281: syntax error
src/controller.v:298: syntax error
src/controller.v:326: syntax error
src/controller.v:327: warning: Extra digits given for sized binary constant.
src/controller.v:335: warning: Extra digits given for sized binary constant.
src/controller.v:326: error: Malformed conditional expression.
src/controller.v:298: error: Malformed conditional expression.
src/controller.v:281: error: Malformed conditional expression.
src/controller.v:266: error: Malformed conditional expression.
src/controller.v:251: error: Malformed conditional expression.
src/controller.v:233: error: Malformed conditional expression.
src/controller.v:207: error: Malformed conditional expression.
src/controller.v:189: error: Malformed conditional expression.
src/controller.v:163: error: Malformed conditional expression.
src/controller.v:145: error: Malformed conditional expression.
src/controller.v:119: error: Malformed conditional expression.