Re: [myhdl-list] intbv wrap
Brought to you by:
jandecaluwe
From: Jan D. <ja...@ja...> - 2011-05-11 14:36:41
|
On 05/11/2011 02:31 PM, Ben wrote: > Hi Chris, > > I am following your struggle with this feature with great interest, as > I do think this would be an interesting addition to MyHDL, however, as > an hypothetical future extension to MyHDL, I think this would deserve > a MEP ... For now, If I want to understand your design decisions, I > have to dig into my mails and look for the relevant part. I for one > have for instance a question about the restrictions you enforce. See > below. > > On Tue, May 10, 2011 at 13:27, Christopher Felton > <chr...@gm...> wrote: >> I made a couple of minor adjustments to this patch. >> >> 1. Made the wrap function private (_wrap) and moved _wrap to __wrap. The >> wrap funct ion should not be used directly because it will not covert >> correctly. I think for a future (todo) enhancement the wrap function can be >> made public and handled by the converter. This is an involved modification. >> For now I think it is good to advertise the wrap function was private. > > I don't really understand the reason of such an enforcement on min and > max for the wrapping. Let's be for a moment the devil's advocate and > say I want my intbv to be between -3 and 12. Why would MyHDL prevent > me to have it wrapped ? In the past days, I have reviewed and thought about all the proposals, and that is exactly my most important critique. As in the intbv case, we should consider modeling requirements first, and "efficiency" only later. (The case of the intbv shows that sometimes you can have easier modeling without an efficiency price to pay.) I have also reviewed the concept behind Ada modular types more thorougly, and I really think this is the way to follow. I am working on an extensive review and proposal, that I will post shortly. > >> >> 2. Added myrange to a slot, _range. > > This is a coding style decision. This _range is used at only one > place, and completely redundant with the existence of _nrbits. I don't > think it deserves a slot. > >> >> 3. Modified a couple comments. >> > > BTW, did you got the testsuite to run ? To run the "core" one, I don't > think you would need py.py. It uses unittest, which is included in > your python distribution. > > Best Regards > Benoît > > ------------------------------------------------------------------------------ > Achieve unprecedented app performance and reliability > What every C/C++ and Fortran developer should know. > Learn how Intel has extended the reach of its next-generation tools > to help boost performance applications - inlcuding clusters. > http://p.sf.net/sfu/intel-dev2devmay -- 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 |