Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16848 Discussions

Load initialization .mif file to RAM/ROM with impure function

XCui0
Beginner
2,052 Views

Hi,

 

For some reason, I have to use a function to load .mif file to initialize RAM/ROM, but cannot use the synthesis attribute.

 

My function is working well from simulation, it parsed the file very well. But not matter what I do, it just doesn't work on Quartus (I am using Quartus prime pro 19.1, on Stratix 10 devkit). I always got the message:

 

Info(19337): VHDL info at generic_ram.vhd(231): executing entity "generic_ram(init_file="pu_comp_ram.mif",d_width_a=20,a_width_a=10,ram_type="M20K",ram_model="SMPL_DP_SC")(1,15)(1,4)(1,10)" with architecture "basic_ram_models" 

 

Warning(127007): Memory Initialization File or Hexadecimal (Intel-Format) File "/home/xin/LASP/modules/test/compilation/deep_testing/pu/qdb/_compiler/pu_comp/root_partition/19.2.0/partitioned/1/mifs/ram0_generic_ram_3fe21ac7.hdl.mif" contains "don't care" values -- overwriting them with 0s 

 

Does anybody know if Quartus support VHDL textio? It seems my init_file="pu_comp_ram.mif" has been read and copy to "qdb/_compiler/pu_comp/root_partition/19.2.0/partitioned/1/mifs/ram0_generic_ram_3fe21ac7.hdl.mif" . However the data are all wrong. The content in `ram0_generic_ram_3fe21ac7.hdl.mif` is

```

-- begin_signature

-- generic_ram

-- end_signature

WIDTH=20;

DEPTH=1024;

 

ADDRESS_RADIX=UNS;

DATA_RADIX=BIN;

 

CONTENT BEGIN

1023 : UUUUUUUUUUUUUUUUUUUU;

1022 : UUUUUUUUUUUUUUUUUUUU;

1021 : UUUUUUUUUUUUUUUUUUUU;

1020 : UUUUUUUUUUUUUUUUUUUU;

1019 : UUUUUUUUUUUUUUUUUUUU;

1018 : UUUUUUUUUUUUUUUUUUUU;

1017 : UUUUUUUUUUUUUUUUUUUU;

1016 : UUUUUUUUUUUUUUUUUUUU;

1015 : UUUUUUUUUUUUUUUUUUUU;

1014 : UUUUUUUUUUUUUUUUUUUU;

1013 : UUUUUUUUUUUUUUUUUUUU;

1012 : UUUUUUUUUUUUUUUUUUUU;

1011 : UUUUUUUUUUUUUUUUUUUU;

1010 : UUUUUUUUUUUUUUUUUUUU;

1009 : UUUUUUUUUUUUUUUUUUUU;

1008 : UUUUUUUUUUUUUUUUUUUU;

1007 : UUUUUUUUUUUUUUUUUUUU;

1006 : UUUUUUUUUUUUUUUUUUUU;

.

.

.

```

 

Thanks, Xin

0 Kudos
1 Reply
RichardTanSY_Intel
1,919 Views

Hi Xin,

 

Regarding the warning message (127007), if you want to avoid receiving this message in the future, specify values other than "don't care" values in the Memory Initialization File or Hexadecimal (Intel-Format) File.

 

Textio is supported but file I/O cannot be synthesized; therefore, calls to TEXTIO functions are ignored. Quartus apparently won't let you use textio functions during synthesis. Reference: package_textio

 

0 Kudos
Reply