[CHANGE] Work around uninitialized signal issue with === operator

It seems many of the initial arch/uarch states, including the GPR, are
uninitialized in the VCS simulation, which results in functional errors caused
by propagated X's.  In this particular case it resulted in a dcache request not
being fired due to the rs1 data for an lw instruction having values as X,
causing the smem_unit to not arbitrate the request correctly.

A workaround of this issue is to stop the X propagation by using the
===-operation instead of == in the GPR unit, which had been the main source of X
propagation into the raddr port of the GPR.

Also, we run the simulation with GSR_RESET set to 1 so that the contents of the
GPR are initialized at the beginning of the simulation (however, this alone does
not prevent reading in X's, hence this fix.)

FIXME: This is a slight deviation from the upstream code; ideally, we want to do
clean & full initialization of microarchitectural states.
This commit is contained in:
Hansung Kim
2023-11-17 17:13:44 -08:00
parent 9651cc6bc5
commit 90e21e8e58

View File

@@ -305,7 +305,7 @@ module VX_dp_ram #(
`UNUSED_VAR (prev_waddr)
assign rdata = ram[raddr];
end else begin
assign rdata = (prev_write && (prev_waddr == raddr)) ? prev_data : ram[raddr];
assign rdata = (prev_write && (prev_waddr === raddr)) ? prev_data : ram[raddr];
end
end
`endif