How to initialize a large buffer by quartus prime - How to initialize a large buffer by quartus prime Hi, I want to init my written RAM by a mif file. Here is my mif file: DEPTH = 256; WIDTH = 32; ADDRESS_RADIX = HEX; DATA_RADIX = HEX; CONTENT BEGIN 00 : 0000 0000; 01 : 0000 0000; 02 : 0000 0000; 03 : 0000 0000; 04 : 0000 0000; 05 : 0000 0000; . . . FF : 0000 0000; END; And here is the error from the quartus prime: Error (10852): Verilog HDL error at DPbuffer_init.mif(1): illegal character 'p' in hexadecimal number Error (10170): Verilog HDL syntax error at DPbuffer_init.mif(1) near text: p. Check for and fix any syntax errors that appear immediately before or at the specified keyword. The Intel FPGA Knowledge Database contains many articles with specific details on how to resolve this error. Visit the Knowledge Database at https://www.altera.com/support/support-resources/knowledge-base/search.html and search for this specific error message number. Error (12152): Can't elaborate user hierarchy "soc_system:soc_inst|m_buffer:dpbuffer_0" Do you guys know how to fix that or is there another way to init the RAM? Thank you. Replies: Re: How to initialize a large buffer by quartus prime Thank you for acknowledging the solution provided. I'm glad to hear that your question has been addressed. Now, I will transition this thread to community support. If you have any further questions or concerns, please don't hesitate to reach out. Thank you and have a great day! Best Regards, Richard Tan Replies: Re: How to initialize a large buffer by quartus prime Hi sorry for the late reply, Yes, it works. Thank you for the help Replies: Re: How to initialize a large buffer by quartus prime May I know does my latest reply helps? Do you need further help in regards to this case? Best Regards, Richard Tan Replies: Re: How to initialize a large buffer by quartus prime I discovered that we cannot use the $readmemb funciton to read a MIF file. To read the MIF file, you should use the ram_init_file attribute instead. You may refer to the document below for instructions on how to apply this attribute: Link: https://www.intel.com/content/www/us/en/docs/programmable/683283/18-1/ram-initialization-file-for-inferred-memory.html Best Regards, Richard Tan Replies: Re: How to initialize a large buffer by quartus prime Sure, the qar file is attached. I changed the mif file to mem file so that it can be compiled successfully. But I still need to use mif file to start. The IP name is DPbuffer. Replies: Re: How to initialize a large buffer by quartus prime Could you help to share your design .qar file (Project> Achieve Project) so I could investigate further? Best Regards, Richard Tan Replies: Re: How to initialize a large buffer by quartus prime Hi in the RAM design: // initial initial begin if (DPBUFFER_INITIAL_FILE == "DPbuffer_init.mif" ) begin $readmemh (DPBUFFER_INITIAL_FILE,mem); end // read data initial ava_read_data <= 0 ; read_data <= 0 ; end I've tried different path, but the quartus still cant recognize the mif file. I've placed the mif file both under qpf file and my IP verilog file. Replies: Re: How to initialize a large buffer by quartus prime Hi, please show how you reference the .mif file in your design. - 2023-09-11

external_document