Re: [myhdl-list] fixed-point thoughts : part two
Brought to you by:
jandecaluwe
From: Christopher F. <chr...@gm...> - 2013-09-13 10:30:11
|
On 9/11/13 3:11 PM, Jan Decaluwe wrote: > On 09/05/2013 05:28 AM, Christopher Felton wrote: > >> It is assumed the /fixbv/ operations will actually return an >> /int/ same as /intbv/ operations >> >> >>> x1 = fixbv(2.5,min=-8,max=8,res=1/16.) >> >>> x2 = fixbv(1.25,min=-8,max=8,res=1/16.) >> >>> x1 + x2 >> 15 >> >> When assigned to another /fixbv/ the value will fit in the >> format of the accepting object. > > No, I don't think that can be right. The equivalent for > fixbv would be to return a "fix" :-) > Yes, I agree. Ben pointed out the same issue. I changed the proposed to return a /fixbv/ (since Python doesn't have a /fix/ :) Regards, Chris > Like intbv, fixbv would be a "number with bit-level features", > but the actual value of that number should always be as expected. > |