Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

about mif file question

Hello All advanced:

i created a Block RAM IP from MegaWizard,and addition a XX.mif to RAM for initial value,and gererator XX.pof after compilation

xx.mif content as below:

WIDTH=16;

DEPTH=1;

ADDRESS_RADIX=UNS;

DATA_RADIX=HEX;

CONTENT BEGIN

0 : 1234;

END;

1.i programming XX.pof to EPCS,and restart power,then FPGA working Ok,

and read XX.mif value is 16'h1234(that is correct)

2.i modify XX.mif value as below,and gererator new XX.pof

after re-compilation

WIDTH=16;

DEPTH=1;

ADDRESS_RADIX=UNS;

DATA_RADIX=HEX;

CONTENT BEGIN

0 : aabb;

END;

3.i programming new XX.pof to EPCS,and restart power,then FPGA working Ok,but read XX.mif value is 16'h1234 rather than 16'aabb

so how to solve this problem?

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Perhaps Quartus didn't detect the change. Try deleting your /db and /incremental_db directories, recompile, and program the EPCS.

    Also I assume you are just testing for now and don't plan on instantiating a single word RAM/ROM (that's a waste of a memory block since you can use a flip flop for that). If you plan one using a single word memory so that you can use the in-system memory editor then you are better off instantiating lpm_constant since you can edit it as well over JTAG.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    hello Badomen:

    very gratitude your answer,

    i just use a single word for instantiating,

    actuality, i use memory editor to edit memory content

    so delet /db that is to say delet all file from /db directory,is correct?

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    That's correct, make sure you delete those files with the Quartus project closed though. You can delete both /db and /incremental_db. By doing this you'll force Quartus to recompile everything.

    If you only need to edit one value you don't need an on-chip memory to do this. If you instantiate the megawizard "lpm_constant" you can use the memory editor to modify it on the fly as well and not waste a memory block in the process. I do this from time to time to inject bits into my hardware.