Digital icon indicating copy to clipboard operation
Digital copied to clipboard

Verilog code with $readmemh

Open j054n opened this issue 2 years ago • 1 comments

Hi Neemann! In order to fill memory contents I code in Verilog file: initial $readmemh("RV32I_memory.txt",Memory); I can with success the file in Digital, and export also the design file to Verilog again, but I can simulate correctly into Digital, It seems not execute the sentence. Which is the reason for it? Thanks in advance and best regards, Josan M

j054n avatar May 23 '22 09:05 j054n

In the simulator, ram can only be initialized if it is marked as program memory. In general, ram can not be initialized. And also in Verilog or VHDL this is not a good idea, because if ram is initialized here, no blockram can be used for synthesis as far as I know.

hneemann avatar May 24 '22 05:05 hneemann