Memory Inference
Write HDL in a pattern the synthesis tool maps to block RAM or distributed RAM.
Intermediate
reg [7:0] mem [0:1023];
always @(posedge clk) begin
if (we) mem[addr] <= din;
dout <= mem[addr]; // registered read → block RAM
end
Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.
Discussion (0)
Sign in or join free to ask questions and discuss this topic.