2
\$\begingroup\$

I have the following read-only memory module:

import Signals::*;
module ProgramMemory(input logic [PC_SIZE:0] pc,
 output logic [IS:0] ir
);
 (* romstyle = "M10K" *) logic [IS:0] memory [MEM_SIZE:0];
 initial
 $readmemb("program.mem", memory);
 assign ir = memory[pc];
endmodule // ProgramMemory

When it is synthesized for a Cyclone V the ROM is implemented in logic rather than dedicated read-only memory. How can I make this work?

I've turned of the minimum ROM and RAM sizes in the project settings.

IS = 10, MEM_SIZE = 10

asked Apr 8, 2020 at 11:30
\$\endgroup\$
0

1 Answer 1

1
\$\begingroup\$

You've specified a completely asynchronous memory. AIUI, you can only use block RAM if the inputs (addresses) and/or outputs pass through pipeline registers — at least one or the other, but you'll get the best performance if you do both. The synthesis process can then map those pipeline registers to registers that are part of the block RAM structure on the chip.

answered Apr 8, 2020 at 11:51
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.