This is not nice. I write some VHPI interface for a 32 bit engine. Some functions works an some not. Now I have found out my problem with this two examples. I need to exchange value c to vhdl and reverse.
I have the range of 32 bit. My range is 0x00000000 to 0xFFFFFFFF 0...2^32-1 I am interested on "VHDL implementations may extend the range." This should be no bigger problem on 64bit PCs. Please do not reduce the range by the analysis to a shorter range as possible. René Doß Am 24.11.2015 um 21:18 schrieb Tristan Gingold: > On 24/11/15 21:10, René Doß wrote: >> >> I have a question. What is the range of integer in GHDL? > > Try: ghdl --disp-standard > > and look for integer: > > type integer is range -2147483648 to 2147483647; > >> This works (wert>2^31): >> signal wert: std_logic_vector(31 downto 0):= X"ffff0000"; >> signal a: integer:= to_integer(unsigned(wert)); > > There are some undetected overflow during the conversion. > >> This produce an error (c=2^31): >> signal c: integer:=2**31; >> >> >> hometown.vhd:34:23: static constant violates bounds >> ghdl: compilation error >> makefile:4: recipe for target 'all' failed > > But the overflow are detected during analysis. > > Tristan. > > > _______________________________________________ > Ghdl-discuss mailing list > Ghdl-discuss@gna.org > https://mail.gna.org/listinfo/ghdl-discuss _______________________________________________ Ghdl-discuss mailing list Ghdl-discuss@gna.org https://mail.gna.org/listinfo/ghdl-discuss