Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

Constant Value overflow

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

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

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

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.