Skip to content

Commit

Permalink
Fix initialization of memory array in simulation (#2259)
Browse files Browse the repository at this point in the history
  • Loading branch information
CoralieAllioux authored Jun 14, 2024
1 parent 3ed5e78 commit 205872a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vendor/pulp-platform/tech_cells_generic/src/rtl/tc_sram.sv
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,10 @@ module tc_sram #(
// write memory array
always_ff @(posedge clk_i or negedge rst_ni) begin
if (!rst_ni) begin
sram <= init_val;
// Fix to avoid runtime space reaching maximum capacity in simulation
foreach (init_val[i]) begin
sram[i] <= init_val[i];
end
for (int i = 0; i < NumPorts; i++) begin
r_addr_q[i] <= {AddrWidth{1'b0}};
// initialize the read output register for each port
Expand Down

0 comments on commit 205872a

Please sign in to comment.