Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Xilinx ISE, expression not globally static inside generic map

Status
Not open for further replies.

ZoraNustra

Newbie level 3
Joined
Oct 3, 2014
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
27
Hello,

Is this allowed inside Xilinx ISE : generic map (record1.field1'length) ??

Previously I have defined record:

type test_record is record
field1 : std_logic_vector(31 downto 0);
field2 : std_logic_vector(31 downto 0);
end record;

constant record1 : test_record := ((others => '0'),(others => '0'));


I get this error message:

The actual value (Attribute name) associated with a generic must be a globally static expression

Thanks in advance :)
 

Ah, the ever annoying globally/locally static VHDL problem.
This does look like a bug in the VHDL compiler, as all constants are globally static (I just checked the '93 LRM). It probably gets confused by the fact it's an attribute on a record field.
ISE never had a great reputation as a compiler.

Unfortunatly they stopped working on ISE with the final version being 14.7 two years ago. You dont specify what verison you are using, have you tried a newer version?
 
Thank you for fast reply!

Yes, it is 14.7 version of ISE.

Do you have any suggestion how I could write vhdl code in another way inside generic map (to access record field and get 'length out of it) ?

Any other suggestions are also welcomed :)
 

I just compiled your code in questa using -93 and -pedanticerrors switches on VCOM, and no problems. So I still assume an ISE bug. Unless there is something you're now showing us, you probably wont be able to use 'length on the record.

It should work declaring a constant like this:

Code:
constant R_LEN : integer :=32;

type test_record is record
field1 : std_logic_vector(R_LEN-1 downto 0);
field2 : std_logic_vector(R_LEN-1 downto 0);
end record;

generic map(LEN => R_LEN);  -- please use named association not positional
 

Not sure if this is pertinent (don't know if using records like this work/don't work in '87 vs '93), but doesn't ISE always default to using '87 and not '93, I've run into issues with the VHDL version in the past with ISE, could switching the compile options in ISE to '93 or 200x fix the issue?
 

Thank you ads-ee for suggestion,

I have tried switching from '93 to 20xx, but it doesn't solve the problem.
 

You could try Vivado if you are using or willing to switch to a 7 series part.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top