Re: [myhdl-list] Floating point
Brought to you by:
jandecaluwe
From: Sami Al D. <sam...@gm...> - 2009-02-10 10:00:52
|
Hi Guenter, Basically I'm testing serial to parallel block, it simply streams arrays. It worked fine with integers arrays, but didn't work with floating point arrays, because like you said intbv() deals with integers inherently. What I am after here is to find a short cut instead of writing a quantizer (like you said scale, round and truncate), i.e. is there any ready module that can quantize a floating point array, I tried the bin() function but it doesn't recognize floating points, it treats them as integers. On Tue, Feb 10, 2009 at 6:47 AM, Günter Dannoritzer <dan...@we...>wrote: > Sami Al Dalahmah wrote: > > Dear all, > > I'm trying to pass a floating point array to intbv() but normally > couldn't, > > is there any suggestions on how to do it elegantly or should I write a > > function for quantization? > > Hi Sami, > > An intbv() is a data type related to the int data type in Python. So to > assign a whole floating point array might not work that well. Could you > explain more in detail what you are trying to do? > > What would make sense is to convert a floating point array to an intbv > array. In that case you would need to scale and round/trunc the floating > point values and then convert them to intbv. > > Cheers, > > Guenter > > > > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with > Adobe(R)AIR(TM) > software. With Adobe AIR, Ajax developers can use existing skills and code > to > build responsive, highly engaging applications that combine the power of > local > resources and data with the reach of the web. Download the Adobe AIR SDK > and > Ajax docs to start building applications today- > http://p.sf.net/sfu/adobe-com > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list > -- Best Regards Sami Aldalahmeh |