Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > ISE:ERROR:Xst:829: Constant Value expected for Generic 'U'?

Reply
Thread Tools

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

 
 
Phil Tomson
Guest
Posts: n/a
 
      02-15-2005

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

 
Reply With Quote
 
 
 
 
Neo
Guest
Posts: n/a
 
      02-16-2005
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 With Quote
 
 
 
 
Paul Uiterlinden
Guest
Posts: n/a
 
      02-16-2005
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.
 
Reply With Quote
 
Phil Tomson
Guest
Posts: n/a
 
      02-16-2005
In article <cuusld$spu$(E-Mail Removed)>,
Paul Uiterlinden <(E-Mail Removed)> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
expected unqualified-id before numeric constant ahso C++ 2 11-27-2009 12:27 PM
Change a constant value, depending on a generic Barry VHDL 6 01-16-2009 03:16 AM
What does "expected unqualified-id before numeric constant" mean? Allen C++ 1 12-25-2007 11:10 AM
"error C2057: expected constant expression", "error C2466: cannot allocate an array of constant size 0". Why doesn't my simple program work??? hn.ft.pris@gmail.com C++ 13 01-22-2007 02:03 PM
(0x800A0415) Expected literal constant unixnewsboy@gmail.com ASP General 2 01-14-2006 09:02 PM



Advertisments