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: 
Adventurer
Adventurer
4,046 Views
Registered: ‎01-04-2010

Instantiate Lookup Table using BRAM in virtex 5

Hi,

 

I'm using Viretex5 (XC5VSX50T). I need to create large Lookup Table so i want to use BRAM for that. How can i instantiate BRAM LUT in verilog?

 

PN

0 Kudos
1 Reply
Teacher eteam00
Teacher
4,043 Views
Registered: ‎07-21-2009

Re: Instantiate Lookup Table using BRAM

One possibility is using the coregen wizard to instantiate a BRAM as ROM.

Or use the XST template for a ROM (click on the light-bulb icon in the ISE Navigator shell):

 

parameter ROM_WIDTH = <ram_width>;
parameter ROM_ADDR_BITS = <ram_addr_bits>;

 

(* ROM_STYLE="BLOCK" *)
reg [ROM_WIDTH-1:0] <rom_name> [(2**ROM_ADDR_BITS)-1:0];
reg [ROM_WIDTH-1:0] <output_data>;

<reg_or_wire> [ROM_ADDR_BITS-1:0] <address>;

initial
   $readmemb("<data_file_name>", <rom_name>, <begin_address>, <end_address>);

always @(posedge <clock>)
   if (<enable>)
      <output_data> <= <rom_name>[<address>];

 

-- 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