FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > VHDL

VHDL comp.lang.vhdl newsgroup / Usenet

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-24-2006, 01:43 AM
Guy_Sweden
Guest
 
Posts: n/a
Default How to check if ROM got inferred from synth reports

Hello.
I have been trying to write code that should infer a ROM using Block
RAMs. The target device is spartan II series FPGA.
I have come up with the following code which does get synthesized
properly and also gets synthsized.
But i wonder if I have been able to acheive my objective of realising
ROMs using block RAM as the synthesis report never shows anything that
any block RAM was ever used.

Heres the code:

LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_arith.all;
USE ieee.numeric_std.all;
USE ieee.std_logic_unsigned.all;

ENTITY BLOCKROM_Coeffs IS
PORT(
clk : IN std_logic;
reset : IN std_logic;
en : IN std_logic;
addr : IN std_logic_vector(7 downto 0);
data : OUT std_logic_vector(15 downto 0)
);

-- Declarations

END ENTITY BLOCKROM_Coeffs ;

--
ARCHITECTURE blkram_ROM OF BLOCKROM_Coeffs IS

type rom_type is array(255 downto 0) of std_logic_vector(15 downto 0);
constant ROM : rom_type:=(others=>X"0000");
attribute rom_extract : string;
attribute rom_style : string;
attribute rom_extract of ROM : constant is "yes";
attribute rom_style of ROM : constant is "auto";

BEGIN
process(clk)
begin
if (clk'event and clk = '1') then
if (en = '1') then
data <= ROM(conv_integer(addr));
end if;
end if;
end process;
END ARCHITECTURE blkram_ROM;

As far as I know, I think it is because I have not used the Block_ram
attribute in the code..but i've seen a couple of code examples in the
newsgroup and on the internet and no where have i come accross such an
attribute for inferriing a ROM out of Block RAMs.

Second question:
Ive seen two major methods when inferring memory. One of them talks
about using library primitives in which there is no definition for the
architecture of the memory (or may be it is defined somewhere else)..It
directly instantiates a component for ex. a library primitive for
inferring a ROM which has a data bus which is 1 bit wide and has a 16
bit long word is called ROM16X1
(http://toolbox.xilinx.com/docsan/xil...html#wp1001394).
Does it mean that if I instantiate a component using this library
primitive then I dont need to worry about the internal architecture
right? Just use it directly and all works fine and gets synthesized all
right..isnt it?
Additionally some of them are called macros whereas some of them are
called primitives..could some one please shed some light into this.
(heres the xilinx link abt memory elements :
http://toolbox.xilinx.com/docsan/xil...lib0039_6.html
)

The second one is directly writing HDL code which is more of a
behavioral description of what the memory does..

Whats the difference between the two methods? Additionally do these
methods work with synthesis tools..
I've even heard that one has to do different kinds of memory
initialisations when simulating and when synthesizing..
Like it would be different when i wanna simulate the behavior using
modelsim and when Im synthesizing it.
Theres a lot of scattered information everywhere but no where can i
find information about what difference does it make with these two
methods and when is one supposed to be using what.

Hoping to hear from you

Reply With Quote
  #2 (permalink)  
Old 10-24-2006, 06:42 PM
Mike Treseler
Guest
 
Posts: n/a
Default Re: How to check if ROM got inferred from synth reports

Guy_Sweden wrote:

> I have been trying to write code that should infer a ROM using Block
> RAMs. The target device is spartan II series FPGA.


Here's one way to go about it:

http://home.comcast.net/~mike_treseler/sync_rom.vhd
http://home.comcast.net/~mike_tresel...c_rom_tech.pdf
http://home.comcast.net/~mike_treseler/sync_rom_rtl.pdf

-- Mike Treseler
Reply With Quote
  #3 (permalink)  
Old 10-26-2006, 04:53 PM
Guy_Sweden
Guest
 
Posts: n/a
Default Re: How to check if ROM got inferred from synth reports

Hello.
The links u sent never seem to open. Would u please provide me with
alternatives.
Best regards,
Aijaz.
Mike Treseler wrote:
> Guy_Sweden wrote:
>
> > I have been trying to write code that should infer a ROM using Block
> > RAMs. The target device is spartan II series FPGA.

>
> Here's one way to go about it:
>
> http://home.comcast.net/~mike_treseler/sync_rom.vhd
> http://home.comcast.net/~mike_tresel...c_rom_tech.pdf
> http://home.comcast.net/~mike_treseler/sync_rom_rtl.pdf
>
> -- Mike Treseler


Reply With Quote
  #4 (permalink)  
Old 10-26-2006, 05:57 PM
Mike Treseler
Guest
 
Posts: n/a
Default Re: How to check if ROM got inferred from synth reports

Guy_Sweden wrote:
> Hello.
> The links u sent never seem to open. Would u please provide me with
> alternatives.


Some organizations block comcast.
Try it from home.

-- Mike Treseler
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to check if ROM got inferred from synth reports Guy_Sweden FPGA 3 10-24-2006 04:40 PM
ISE and IEEE.Fixed_pkg (fixed point math for synth?) Phil Tomson FPGA 4 02-12-2005 01:48 PM
post-synth. with webpack Amontec Team, Laurent Gauch FPGA 0 12-04-2003 06:50 AM


All times are GMT +1. The time now is 11:48 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved