Forum Discussion

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

using altmem_init

I have a case where I am using a dual port ram that under certain conditions needs to be initialized to all '0's. I'm looking at the altmem_init function, but can not determine how to apply it. I can't find any examples of how to use it. If it is connected to the datain and add lines, do I have to created a mux to use the ram normally? Does it require a dual port ram with one side dedicated to the init function? Any help would be appreciated. gweather

2 Replies

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

    --- Quote Start ---

    I can't find any examples of how to use it.

    --- Quote End ---

    Did you read the altmem_init users manual?

    --- Quote Start ---

    If it is connected to the datain and add lines, do I have to created a mux to use the ram normally?

    --- Quote End ---

    Yes.

    --- Quote Start ---

    Does it require a dual port ram with one side dedicated to the init function?

    --- Quote End ---

    If not using a mux. Basically, the function does a sequential load of the ram. You can do the same in your code, if you prefer. It's rather easy.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Did you read the altmem_init users manual?

    Yes.

    If not using a mux. Basically, the function does a sequential load of the ram. You can do the same in your code, if you prefer. It's rather easy.

    --- Quote End ---

    Yes, I read the manual. It shows how to hookup the altmem_init to ram, but does not show how any of the user's data, address or write enable lines are connected. I have also performed a search of the Altera web site and the web and have not found any info on the best way to use the megafunction.