[myhdl-list] len() of an intbv
Brought to you by:
jandecaluwe
From: <sv...@te...> - 2010-01-08 22:34:13
|
Hi all, Is ther a particular reason why the number of bits (according to the len() finction is 1 in following example: a = intbv(0, min=0, max=1) len(a) --> returns 1 instead of an expected 0 I thought 'a' can only store '0' in this case, and you don't need any bits for doing that. b = intbv(0,min=0,max=2) len(b) --> returns 1 This is not so important at the moment for me, but it should be interesting to know where this (according to me) unlogical behavior comes from. Stefaan |