PDA

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


Phil Tomson
02-15-2005, 02:38 PM
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 <csvm> (Architecture <synth_csvm>).
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

Neo
02-16-2005, 03:57 AM
cant say for sure but check if you have completely defined the type and
range for UFix and it is visible to the function.

Paul Uiterlinden
02-16-2005, 07:27 AM
Phil Tomson wrote:
> Here's the error:
>
> Analyzing Entity <csvm> (Architecture <synth_csvm>).
> 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);

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.

Phil Tomson
02-16-2005, 08:54 AM
In article <[email protected]>,
Paul Uiterlinden <[email protected]> wrote:
>Phil Tomson wrote:
>> Here's the error:
>>
>> Analyzing Entity <csvm> (Architecture <synth_csvm>).
>> 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);
>
>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).
>

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