Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21602 Discussions

Constant Value overflow

Altera_Forum
Honored Contributor II
3,161 Views

I have the following Warning: 

Warning (10639): VHDL warning at FRAME_ROTATOR_NEW.vhd(391): constant value overflow 

 

It's about  

elsif main_cnt >= to_unsigned (74877906940 , 39) then 

 

and i decleared main_cnt as  

 

signal main_cnt : unsigned (38 downto 0) := (others => '0'); 

 

Where did i go wrong? Or is the warning caused somewhere else?  

 

To make it easy for u 74877906940 decimal = 116F122FFC HEX = 37 bit
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
1,649 Views

I am not sure but possibly VHDL has a limit on integer values (2^34 may be...)

0 Kudos
Altera_Forum
Honored Contributor II
1,649 Views

I'm aware of the limit for integer. But does that count when i use it in this way ?  

 

Aparly it does, cause is get the warning :). I'll try something. 

 

elsif main_cnt >= "111" & x"FFFFFFF" then 

 

That does the trick. Thx
0 Kudos
Altera_Forum
Honored Contributor II
1,649 Views

In Quartus and most other VHDL tools, integer literals are limited to 32 bit, although the VHDL standard would allow a larger range. Bit string literals have no limitation, but unfortunately, the supported formats are only binary, octal and hexadecimal, not decimal.

0 Kudos
Reply