UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Explorer
Explorer
8,633 Views
Registered: ‎07-13-2010

How to use built-in RAM blocks?

Jump to solution

Hi,

Could someone please enlighten me how to use built-in RAM blocks rather than implementing it?

Do I have to use "Core Generator & Architecture wizard" or what?

 

Ignas

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
Teacher eteam00
Teacher
10,625 Views
Registered: ‎07-21-2009

Re: How to use built-in RAM blocks?

Jump to solution

I'm some kind of self-educated begginer and I'm more familiar with Verilog language rather than VHDL...

Dear beginner:

 

some advice:

  • Stick with Verilog (easier to learn than VHDL if you are just starting)
  • No schematics.  None.

But how about interconnection between built-in RAMS and my FPGA design?

Primitives are "connected" to your design as per the template.  That's what "template" means.

Do I have to create new module in my design

No.

copy that code from language template

Yes.

make some changes in my needed port declarations (marked red)

You are not allowed to change port names of instantiated primitives.

and that will be enough for synthesizer to recognize that I want to use built-in RAMS and NOT implement it in FPGA?

You need to understand what the term "primitive" means.  A primitive is an explicit instantiation, and is not interpreted by the synthesiser.

Or do I have to make more changes in some other files, for example some kind of wiring or something

Here's a suggestion:  Experiment with primitives which are simple (e.g. flip-flops, output buffers).  Learn by experimentation (trial and error).  It won't take long to get the hang of it.  Also spend some time with "reference" design source code (e.g. XAPP495).  You can learn much from others' code, at this stage.

And how about viewing RTL schematic. Will I be able to see all connections of my fpga design with built-in RAMs or not ?

Don't bother with schematics.  This will give you more sources of confusion and distraction.  Stick with Verilog until you are comfortable with it.

 

-- Bob Elkind

SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
7 Replies
Teacher eteam00
Teacher
8,630 Views
Registered: ‎07-21-2009

Re: How to use built-in RAM blocks?

Jump to solution

Using the Core generator is quick simple.

 

If you want to roll your own, then (from within ISE) EDIT > Language Templates

check the section for <Verilog | VHDL> / Device Primitive Instantiation / <FPGA family> / RAM/ROM

 

Also check the user docs for the FPGA family you are using.  There might be a memory user guide or something like that.

 

-- Bob Elkind

SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
0 Kudos
Explorer
Explorer
8,603 Views
Registered: ‎07-13-2010

Re: How to use built-in RAM blocks?

Jump to solution

Mhm, thats a nice hint, Bob.

A few more questions:

 

1) But how about interconnection between built-in RAMS and my FPGA design? Do I have to create new module in my desing, copy that code from language template, make some changes in my needed port declarations (marked red) and that will be enough for synthesizer to recognize that I want to use built-in RAMS and NOT implement it in FPGA?

Or do I have to make more changes in some other files, for example some kind of wiring or something?

 

 2) And how about viewing RTL schematic. Will I be able to see all connections of my fpga design with built-in RAMs or not ?


port map (
      CASCADEOUTA => CASCADEOUTA, -- 1-bit cascade output
      CASCADEOUTB => CASCADEOUTB, -- 1-bit cascade output
      DOA => DOA,      -- 32-bit A port Data Output
      DOB => DOB,      -- 32-bit B port Data Output
      DOPA => DOPA,    -- 4-bit  A port Parity Output
      DOPB => DOPB,    -- 4-bit  B port Parity Output
     
ADDRA => ADDRA,  -- 15-bit A port Address Input
      ADDRB => ADDRB,  -- 15-bit B port Address Input
      CASCADEINA => CASCADEINA, -- 1-bit cascade A input
      CASCADEINB => CASCADEINB, -- 1-bit cascade B input

      .... );

 

Regards,
Ignas

0 Kudos
Teacher rcingham
Teacher
8,598 Views
Registered: ‎09-09-2010

Re: How to use built-in RAM blocks?

Jump to solution
Don't change the names on the left-hand side of the port map.

Have you done much VHDL?

------------------------------------------
"If it don't work in simulation, it won't work on the board."
0 Kudos
Explorer
Explorer
8,597 Views
Registered: ‎07-13-2010

Re: How to use built-in RAM blocks?

Jump to solution

I'm some kind of self-educated begginer and I'm more familiar with Verilog language rather than VHDL...

0 Kudos
Teacher eteam00
Teacher
10,626 Views
Registered: ‎07-21-2009

Re: How to use built-in RAM blocks?

Jump to solution

I'm some kind of self-educated begginer and I'm more familiar with Verilog language rather than VHDL...

Dear beginner:

 

some advice:

  • Stick with Verilog (easier to learn than VHDL if you are just starting)
  • No schematics.  None.

But how about interconnection between built-in RAMS and my FPGA design?

Primitives are "connected" to your design as per the template.  That's what "template" means.

Do I have to create new module in my design

No.

copy that code from language template

Yes.

make some changes in my needed port declarations (marked red)

You are not allowed to change port names of instantiated primitives.

and that will be enough for synthesizer to recognize that I want to use built-in RAMS and NOT implement it in FPGA?

You need to understand what the term "primitive" means.  A primitive is an explicit instantiation, and is not interpreted by the synthesiser.

Or do I have to make more changes in some other files, for example some kind of wiring or something

Here's a suggestion:  Experiment with primitives which are simple (e.g. flip-flops, output buffers).  Learn by experimentation (trial and error).  It won't take long to get the hang of it.  Also spend some time with "reference" design source code (e.g. XAPP495).  You can learn much from others' code, at this stage.

And how about viewing RTL schematic. Will I be able to see all connections of my fpga design with built-in RAMs or not ?

Don't bother with schematics.  This will give you more sources of confusion and distraction.  Stick with Verilog until you are comfortable with it.

 

-- Bob Elkind

SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
Explorer
Explorer
8,579 Views
Registered: ‎07-13-2010

Re: How to use built-in RAM blocks?

Jump to solution

Thank you for your answers, Bob. Now I know where to start  :)

 

Have a nice day,

Ignas

0 Kudos
Explorer
Explorer
8,534 Views
Registered: ‎07-13-2010

Re: How to use built-in RAM blocks?

Jump to solution

There are few good examples about how to create CORE generator module in "in depth tutorials" of your chosen software:

 

http://www.xilinx.com/support/techsup/tutorials/index.htm

 

Hope this will help for somebody ;)