ISE:ERROR:Xst:829: Constant Value expected for Generic 'U'?

I've searched around Xilinx's site, but I havent' been able to find the meaning of this error message (there was a message there about how this had been fixed in XSE 4.something, but I've tried on both 6.2i and 6.3i and still get the same error).

Here's the error:

Analyzing Entity (Architecture ). ERROR:Xst:829 - C:/phil/vhdl/svm/../fix_std.vhd line 1382: Constant Value expected for Generic 'U'.

Here's the offending line: Copy_V(F, N, overflow, rounding);

Here's the Copy_V function: procedure Copy_V( target : out UFix; source : UFix; overflow : Fix_Overflow_Mode := Fix_Default_Overflow; rounding : Fix_Rounding_Mode := Fix_Default_Rounding ) is subtype target_T is UFix(target'RANGE); variable W: UFix(Max(target'LEFT, source'LEFT+1) downto Min(target'RIGHT, source'RIGHT)); constant HighZero: UFix(W'LEFT downto target'LEFT+1) := (others => '0'); begin assert not target'ASCENDING report "target" & bad_direction_msg severity direction_severity; assert not source'ASCENDING report "source" & bad_direction_msg severity direction_severity; W := (others => '0'); W(source'RANGE) := source; if target'RIGHT > source'RIGHT then case rounding is when clip_LS | towards_zero =>

null; when to_nearest =>

W(W'LEFT downto target'RIGHT-1) := UFix( unsigned(W(W'LEFT downto target'RIGHT-1)) + 1 ); end case; end if; target := W(target'RANGE); if HighZero'LENGTH > 0 then if unsigned(W(HighZero'RANGE)) /= unsigned(HighZero) then case overflow is when clip_MS =>

null; when saturate =>

target := target_T'(others => '1'); end case; end if; end if; end;

I have no idea what this error message is trying to tell me. This code compiles fine in my simulator (GHDL).

Any ideas about what this means?

Phil

Reply to
Phil Tomson
Loading thread data ...

cant say for sure but check if you have completely defined the type and range for UFix and it is visible to the function.

Reply to
Neo

The error is about a generic. The line above does not contain a generic. Seems to me that the line number in your error message is wrong.

Look in your code and try to locate where you declare and/or use generic U (in an entity declaration or component instantiation).

Paul.

Reply to
Paul Uiterlinden

I did a `grep -i generic *.vhd` and nothing comes up in that code (there is a testbench that has some, but it's not included in the ISE project). That's what's strange about the error.

It would be nice if the Xilinx tools could synthesize a fixed point package - so far I've tried two synthesizable (with other tools) fixed point packages and it chokes on both, but for different reasons.

Phil

Reply to
Phil Tomson

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.