Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 408c244

Browse files
committed
Systematically initialize registers to zero (and not only in BENCH mode)
1 parent aabd49b commit 408c244

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

FemtoRV/TUTORIALS/FROM_BLINKER_TO_RISCV/step7_with_disasm.v

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,12 @@ module SOC (
9393
wire [31:0] writeBackData; // data to be written to rd
9494
wire writeBackEn; // asserted if data should be written to rd
9595

96-
`ifdef BENCH
97-
integer i;
96+
integer i;
9897
initial begin
9998
for(i=0; i<32; ++i) begin
10099
RegisterBank[i] = 0;
101100
end
102101
end
103-
`endif
104102

105103
// The ALU
106104
wire [31:0] aluIn1 = rs1;

0 commit comments

Comments
 (0)