[myhdl-list] Re: always_comb problem
Brought to you by:
jandecaluwe
From: David B. <dav...@fr...> - 2004-11-02 09:39:32
|
Or maybe there is a better way to do it. Could we have comments around th= e area of code we want to ignore, like this: #Translate off print ... #Translate on This would allow us to add more options in the future. Regards, David. Selon David Brochart <dav...@fr...>: > I think this is a good solution indeed, it would work for "always_comb"= a=3D > nd > "toVerilog". > > Thanks, > > David. > > Selon Jan Decaluwe <ja...@ja...>: > > > David Brochart wrote: > > > Thanks for the explanation. I use "print" statements as debug funct= io=3D > ns but > > I > > > could as well use graphical functions if I do signal processing. In= o=3D > ther > > words > > > in this example the problem was caused by "print" but it could be a= ny=3D > thing > > that > > > is not a signal or variable affectation. Then your solution doesn't= w=3D > ork. > > > Rather than adding a "pass" for everything we want to skip, we shou= ld=3D > only > > > "keep" the signal/variable affectations and "pass" everything else.= I=3D > s > > there a > > > way to do that? > > > > Well, there may be an easy way to do this provided > > there is some explicit help from the user. > > > > Actually there is a similar problem with conversion to > > Verilog: sometimes one would like to add code (e.g. > > for debug) that should be "hidden" from conversion (e.g. > > because it contains non-convertible constructs.) > > > > A clean way to support this would be to use Python's > > prefined __debug__ variable. (This is true by default, > > and false when python is invoked with optimizations.) > > > > All code below an "if __debug__:" could simply be > > ignored (for always_comb and also conversion.) So this > > would be a general way for a user to add arbitrary code, > > but of course he would have to state this explicitly. > > But, as Explicit Is Better Than Implicit this may not > > even be a disadvantage. Note that the actual value > > of __debug__ would not be taken into consideration. > > > > What do you think? > > > > Regards, Jan > > > > -- > > Jan Decaluwe - Resources bvba - http://jandecaluwe.com > > Losbergenlaan 16, B-3010 Leuven, Belgium > > Python is fun, and now you can design hardware with it: > > http://jandecaluwe.com/Tools/MyHDL/Overview.html > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: > > Sybase ASE Linux Express Edition - download now for FREE > > LinuxWorld Reader's Choice Award Winner for best database on Linux. > > http://ads.osdn.com/?ad_id=3D3D5588&alloc_id=3D3D12065&op=3D3Dclick > > _______________________________________________ > > myhdl-list mailing list > > myh...@li... > > https://lists.sourceforge.net/lists/listinfo/myhdl-list > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Sybase ASE Linux Express Edition - download now for FREE > LinuxWorld Reader's Choice Award Winner for best database on Linux. > http://ads.osdn.com/?ad_id=3D5588&alloc_id=3D12065&op=3Dclick > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list > |