FPGARelated.com
Forums

0x80000000 Integer not supported??

Started by cdb October 25, 2010
On 10/25/2010 05:24 AM, cdb wrote:
> Hi everybody, > I'm designing a VHDL testbench for a VHDL module. > > I have to generate values to be written into a 32 bit register of my > module. > I decided tu use integer variables to compose my data and than convert them > to std_logic_vector to perform the write operation on the module. > > The issue is that I discovered that VHDL > integer range is from -2147483647 to 2147483647, > that is to say 0x80000000 integer is not supported.
This is, indeed, an invalid positive integer in a signed 32-bit field. The correct form would be -2147483648 (decimal). I'm not exactly sure how to write a negative value in hex notation. If the value doesn't need to be signed, then make it unsigned, and the assignment should work properly. Jon