J
Jan Decaluwe
Guest
Hi:
I have been trying to figure out how signed arithmetic in
your favourite language actually works. The 2 (open-source)
simulators I use don't agree on the subject. I have prepared
a small test module (attached) with 3 relevant test cases.
The output of Icarus 0.8.1 is:
p= 15659 s= -24 d=1
The output of cver (gplcver 2.11a) is:
p= -725 s= 40 d=0
Explanations would be great, but just letting me know
what your simulator outputs would already be very useful.
Jan
--
Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com
Losbergenlaan 16, B-3010 Leuven, Belgium
Electronic design with Python:
http://myhdl.jandecaluwe.com
I have been trying to figure out how signed arithmetic in
your favourite language actually works. The 2 (open-source)
simulators I use don't agree on the subject. I have prepared
a small test module (attached) with 3 relevant test cases.
The output of Icarus 0.8.1 is:
p= 15659 s= -24 d=1
The output of cver (gplcver 2.11a) is:
p= -725 s= 40 d=0
Explanations would be great, but just letting me know
what your simulator outputs would already be very useful.
Jan
--
Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com
Losbergenlaan 16, B-3010 Leuven, Belgium
Electronic design with Python:
http://myhdl.jandecaluwe.com