Skip to content

Commit

Permalink
Systematically initialize registers to zero (and not only in BENCH mode)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoLevy committed Jan 8, 2023
1 parent aabd49b commit 408c244
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions FemtoRV/TUTORIALS/FROM_BLINKER_TO_RISCV/step7_with_disasm.v
Expand Up @@ -93,14 +93,12 @@ module SOC (
wire [31:0] writeBackData; // data to be written to rd
wire writeBackEn; // asserted if data should be written to rd

`ifdef BENCH
integer i;
integer i;
initial begin
for(i=0; i<32; ++i) begin
RegisterBank[i] = 0;
end
end
`endif

// The ALU
wire [31:0] aluIn1 = rs1;
Expand Down

0 comments on commit 408c244

Please sign in to comment.