Re: [myhdl-list] Bit-wise inversion issue
Brought to you by:
jandecaluwe
From: Jan D. <ja...@ja...> - 2008-02-28 21:12:50
|
Christopher L. Felton wrote: > Is the following expected behavior? > >> >> y = intbv(15)[4:] >> >> ~y > intbv(0L) >> >> z = ~y >> >> z._nrbits > 0 >> >> > > The new number of bits is 0? Now you know why it's a private variable :-) Seriously, I use 0 (False) to indicate that the nr of bits is undefined. Jan -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Kaboutermansstraat 97, B-3000 Leuven, Belgium From Python to silicon: http://myhdl.jandecaluwe.com |