Results 1 to 4 of 4

Thread: One port ram question

  1. #1
    Join Date
    Nov 2016
    Posts
    12
    Rep Power
    1

    Default One port ram question

    Hi all, my project currently will use multiple memory block with some initial data. If I try to use on chip memory such as on port ram, and I generate the memory block through the wizard. I known I need to create a mif file for each memory. But how can I link each mif file to the corresponding memory. By creating new on chip memory for each mif file? or I can write the new architecture in the memory file i get from wizard?

    Thanks.

  2. #2
    Tricky is online now Moderator **Forum Master**
    Join Date
    Oct 2008
    Posts
    5,254
    Rep Power
    1

    Default Re: One port ram question

    When you generate the ram from the wizard, you can specify the .mif file to use for initialisation.
    You only need a .mif file if you need the ram to be filled when the power is turned on. .mif file is not required if you intend to fill the ram yourself during run time.

  3. #3
    Join Date
    Nov 2016
    Posts
    12
    Rep Power
    1

    Default Re: One port ram question

    Thanks for the help.

    If I need 100 memories with same kind of memory block but with different mif files, how can I do that?

    I will have 100 mif files: m1_data.mif to m100_data.mif

    But I want to link these files to the mem.vhd which I got from wizard, so I need to generate 100 .vhd files for each .mif file, is that right?

    Or there is another way to do it?

  4. #4
    Tricky is online now Moderator **Forum Master**
    Join Date
    Oct 2008
    Posts
    5,254
    Rep Power
    1

    Default Re: One port ram question

    Yes. You can instantiate the rams yourself, and you could instantiate them inside a generate loop and generate the .mif string for each ram
    or you can infer the ram and use attributes to specify the .mif file to use, but that wont work in simulation. But you can use a function to initialise the ram yourself.

Similar Threads

  1. Question about Audio port
    By Taeyangchoi in forum SoC Device Discussion
    Replies: 0
    Last Post: December 1st, 2016, 12:31 AM
  2. Question about 1 port ram
    By zhbai in forum VHDL
    Replies: 3
    Last Post: November 18th, 2016, 12:12 AM
  3. Replies: 1
    Last Post: September 18th, 2015, 07:17 AM
  4. The question about bidirectional port
    By buddha1987 in forum Verilog and System Verilog
    Replies: 1
    Last Post: May 2nd, 2014, 02:29 PM
  5. Question about GPIO port,Please help
    By gpakillsme in forum General Altera Discussion
    Replies: 0
    Last Post: March 17th, 2010, 10:13 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •