Re: [myhdl-list] intbv.wrap()
Brought to you by:
jandecaluwe
From: Jan D. <ja...@ja...> - 2011-04-18 20:27:03
|
On 04/18/2011 08:23 PM, Christopher Lozinski wrote: > Thank you to Tom Dillon and to Chris Felton for explaining the wrapping > stuff. It took me forever to understand it. Now I know why. > > I totally understand how hardware engineers would want to do that. But > for the software engineer, it is a terrible idea. Different people > really do see the world differently. Terrible? Ada has modular types. They wrap around. > As a software guy I just want a 32 bit integer that yields an error > condition when it overflows. That is what I expect. And of course if > it is made up of a sign object and a mantissa so much the better. Really? Python doesn't have 32 bit integers that yield an overflow error. If you want that, tryintbv(0)[32:]. > I am not trying to change the intbv library. It is perfect for its > users. I am just pointing out that we software engineers see the world > differently from the hardware engineers. As my counter-examples show, many software engineers apparently see the word differently from you. Let's sort that out, before even starting with the hardware engineers. > So maybe eventually there can > be two different integer libraries, with different models behind them, > and maybe different users. Those building application specific circuits > would use one, those building generic microprocessors could use the other. I don't see what good this would do for these cases. Both users are hardware designers for which hardware efficiency is probably a crucial cost factor, especially for those building generic microprocessors. -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Python as a HDL: http://www.myhdl.org VHDL development, the modern way: http://www.sigasi.com Analog design automation: http://www.mephisto-da.com World-class digital design: http://www.easics.com |