Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Visitor
diplomat
Posts: 15
Registered: ‎07-15-2010
0

Block ram inference with generate statement -> How to apply attributes?

[ Edited ]

Hello!

 

I'm manually trying to infer BRAM in a generate statement.

But if I do this:

 

gen_ramb16_s1_s36 : for i in 0 to 31 generate
attribute DATA_WIDTH_A : integer; --
      attribute DATA_WIDTH_A of gen_ramb16_s1_s36[i].RAMB16BWE_S36_inst : label is 9; -- Line 317
begin
RAMB16BWE_S36_inst : RAMB16BWE_S36
generic map (
 -- [...]
          INITP_06 => X"0000000000000000000000000000000000000000000000000000000000000000",
          INITP_07 => X"0000000000000000000000000000000000000000000000000000000000000000")
port map (
DO => DO_RAM, -- 32-bit Data Output
DOP => open, -- 4-bit parity Output
ADDR => ADDR_RAM, -- 9-bit Address Input
          CLK  => tcm8230md_sys_clk,    -- 1-bit Clock
          DI   => DI_RAM,               -- 32-bit Data Input
          DIP  => (others => '0'),      -- 4-bit parity Input
          EN   => '1',                  -- 1-bit RAM Enable Input
          SSR  => '0',                  -- 1-bit Synchronous Set/Reset Input
          WE   => WE_RAM(i)             -- 4-bit Write Enable Input
end generate;

 

Doing so, ISE will still throw out the following error:

 

 

ERROR:HDLParsers:164 - "/home/DFK/FPGA_SVN/lib/CAM_TCM8230MD/trunk/tcm8230md_i2c_wrapper.vhd" Line 317. parse error, unexpected POINT, expecting COLON

 

 

 

what am I doing wrong????

 

Expert Contributor
eteam00
Posts: 8,318
Registered: ‎07-21-2009
0

Re: Block ram inference with generate statement -> How to apply attributes?

Line numbers are missing from source snippet ... which line is line 317?

 

- 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.
Visitor
diplomat
Posts: 15
Registered: ‎07-15-2010
0

Re: Block ram inference with generate statement -> How to apply attributes?

I added line number 317 as a comment now.
Expert Contributor
bassman59
Posts: 6,177
Registered: ‎02-25-2008
0

Re: Block ram inference with generate statement -> How to apply attributes?

You're not inferring anything. You are instantiating. Please keep this straight, as it is not a trivial distinction.

 

Anyways, the real problem is that you should NOT use those attributes at all.

The generic map should have an entry called DATA_WIDTH_A which you should use instead of the attribute.

 


----------------------------------------------------------------
Yes, I do this for a living.
Visitor
diplomat
Posts: 15
Registered: ‎07-15-2010
0

Re: Block ram inference with generate statement -> How to apply attributes?

[ Edited ]

Hi and thank's for your reply.

It's true... it's not an attribute, it's generic...

This can easily be seen in the Libraries Guide .

 

 

Greetings,

 

     \h

Expert Contributor
bassman59
Posts: 6,177
Registered: ‎02-25-2008
0

Re: Block ram inference with generate statement -> How to apply attributes?

 


diplomat wrote:

Hi and thank's (APOSTROPHE FAIL!)  for your reply.

It's true... it's not an attribute, it's generic...

This can easily be seen in the Libraries Guide .

 

 


 

You're confusing VHDL attributes with the "attribute" listed as something that can be controlled by modifying the generic through the generic map. Do not make this mistake.

 

Back in the Bad Old Days, the library primitives did not support the generic map construct for controlling how an instance of said primitive was built. At some point, the tools allowed generic maps, and for a while, generic maps and the VHDL attributes were both accepted (and in code that had both, the generic map had precedence).

 

VHDL attributes are now pretty much deprecated in favor of using generic maps. Delete the attributes, set the generic map correctly, and your design should go forward.


----------------------------------------------------------------
Yes, I do this for a living.
Visitor
diplomat
Posts: 15
Registered: ‎07-15-2010
0

Re: Block ram inference with generate statement -> How to apply attributes?

Hi bassman59,

 

that's true. I read *attribute* and without thinking further I thougt about classic vhdl attributes. :-/