mirror of
https://github.com/lowRISC/ibex.git
synced 2025-04-22 04:47:25 -04:00
[rtl] Replace always_ff with always @(posedge .. in FPGA regfile
This resolves lowRISC/Ibex#1485. Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
This commit is contained in:
parent
fa3df3b8ee
commit
fccdd63992
1 changed files with 6 additions and 1 deletions
|
@ -51,7 +51,12 @@ module ibex_register_file_fpga #(
|
|||
// we select
|
||||
assign we = (waddr_a_i == '0) ? 1'b0 : we_a_i;
|
||||
|
||||
always_ff @(posedge clk_i) begin : sync_write
|
||||
// Note that the SystemVerilog LRM requires variables on the LHS of assignments within
|
||||
// "always_ff" to not be written to by any other process. However, to enable the initialization
|
||||
// of the inferred RAM32M primitives with non-zero values, below "initial" procedure is needed.
|
||||
// Therefore, we use "always" instead of the generally preferred "always_ff" for the synchronous
|
||||
// write procedure.
|
||||
always @(posedge clk_i) begin : sync_write
|
||||
if (we == 1'b1) begin
|
||||
mem[waddr_a_i] <= wdata_a_i;
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue