Le 2015-11-25 12:00, KIMURA Masaru a écrit :
I have the range of 32 bit.
My range is 0x00000000 to 0xFFFFFFFF
0...2^32-1
This is the "normal" range for computers,
for at least 25 years, so it shouldn't create
any problem... "normally". But VHDL is not "normal".
Then you'd need unsigned integers. Does VHDL have those?
No, VHDL integer types are always signed.
FYI, and you may know, but i've not tested actually,
some closed source VHDL simulators (such as Aldec Riviera-PRO) have
relax
options (e.g. integer range), IIRC.
consider to introduce these kind of relax options to GHDL?
That would be good, I would appreciate it too.
It seems to me that VHDL was designed in such a conservative way
that it *could* work on 1-complement machines that had not
disappeared yet in the 1980s (but were already old, expensive
relics from the 60s). They wanted VHDL to work "everywhere"
and now it wouldn't work well anywhere...
My struggle to get boolean integer operations adopted is
one example of a perfectly fine, natural and easy operation
that is not provided "because you can do it the hard, slow way".
The good news is that I have barely seen the 2^31 range
enforced in GHDL, as long as you don't perform computations
in VHDL domain, use VHPI and C code instead...
yg
_______________________________________________
Ghdl-discuss mailing list
Ghdl-discuss@gna.org
https://mail.gna.org/listinfo/ghdl-discuss