From 33bb4c7538212cc902b0698e0790a0f498f07800 Mon Sep 17 00:00:00 2001 From: Aadi Desai <21363892+supleed2@users.noreply.github.com> Date: Wed, 16 Dec 2020 14:13:54 -0800 Subject: [PATCH] Constant selects not working in always_ff in current iverilog --- rtl/mips_cpu_bus.v | 2 +- test/test_mips_cpu_bus.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rtl/mips_cpu_bus.v b/rtl/mips_cpu_bus.v index ca00dc9..ca117dd 100644 --- a/rtl/mips_cpu_bus.v +++ b/rtl/mips_cpu_bus.v @@ -87,7 +87,7 @@ always_ff @(negedge clk) begin // CLK Falling Edge clk_state <= 1'b0; end -always_comb begin +always @(*) begin case (instr_reg[31:26]) 6'b101000: begin // Store Byte partial_write = 1'b1; diff --git a/test/test_mips_cpu_bus.sh b/test/test_mips_cpu_bus.sh index 352244b..1b90fe7 100755 --- a/test/test_mips_cpu_bus.sh +++ b/test/test_mips_cpu_bus.sh @@ -47,10 +47,10 @@ else -P mips_cpu_bus_tb.INSTR_INIT_FILE=\"inputs/${INSTR}/${TESTCASE}.txt\" \ -P mips_cpu_bus_tb.DATA_INIT_FILE=\"inputs/${INSTR}/${TESTCASE}.data.txt\" \ -o exec/mips_cpu_bus_tb_${TESTCASE} testbench/mips_cpu_bus_tb.v \ - ${SRC} #2> /dev/null + ${SRC} 2> /dev/null ./exec/mips_cpu_bus_tb_${TESTCASE} &> ./inputs/${INSTR}/${TESTCASE}.log.txt; # log file for debugging (contains $display) echo "$(tail -1 ./inputs/${INSTR}/${TESTCASE}.log.txt)" > ./inputs/${INSTR}/${TESTCASE}.out.txt; # register v0 output to compare with reference - if diff -w ./inputs/${INSTR}/${TESTCASE}.out.txt ./inputs/${INSTR}/${TESTCASE}.ref.txt #&> /dev/null # compare + if diff -w ./inputs/${INSTR}/${TESTCASE}.out.txt ./inputs/${INSTR}/${TESTCASE}.ref.txt &> /dev/null # compare then echo ${TESTCASE} ${INSTR} "Pass"; else