Forum Discussion

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

hardcoding the contents into memory

Hi,

I have a predefined set of test data (frames which contain 256 bits), which i want to test my DUT with. I wish to know how can i hardcode the data into memory (on-chip or off chip). So that I can take each frame and pass it to my DUT and check the results.

thanks for your time..:)

1 Reply

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

    If you created the memory block with the megawizard or are instantiating a megafunction in your code, then you can supply a parameter with the name of a .hex or .mif file describing the memory contents.

    If you instantiate it from HDL code, you can directly give the contents using an array. Have a look at the Altera recommended HDL style document.