[myhdl-list] Re: VCD viewer ?
Brought to you by:
jandecaluwe
From: Jean D. <jea...@un...> - 2005-04-22 06:19:41
|
Jan Decaluwe a écrit : > Jean Demartini wrote: > >> Jean DEMARTINI a écrit : >> >>> Hi all, >>> >>> For many reasons I've to use MyHDL on a Windows platform (XP SP2). >>> Python and MyHDL works perfectly. But has anyone knowledge of a >>> working free VCD viewer onto Windows. Despite many effort, I've not >>> succeded to use GTKwave and Wavevcd from ISS (beta downloadable at >>> www.iss-us.com) does not recognize the VCD format generated by MyHDL >>> (its is a drawback of the ISS viewer as the VCD format generated by >>> MyDHL is quite correct) . >>> >>> Jean >>> >>> >> >> ISS has just release a new version of its free Wave VCD viewer >> (http://www.iss-us.com/wavevcd/). This viewer functions quite properly >> but is only conformant with IEEE VCD std. To generate such VCD files, >> it is necessary to modifie: >> _Signal.py >> _traceSignals.py >> >> Enclosed are a modified version of these files. Testing is in progress >> and these files are given as it. > > > In _traceSignal.py, I had expected a type check to differentiate > between the various types - instead this is done by checking the > bit width. Doesn't this mean that a reg of width 32 or 64 would > be declared as an int or a float ?? > > Jan Yes. It is in memory of the (not so) old ineger size (32 bits) and the IEEE float size (64 bits). It could be now probably better to introduce a "true" type checking. But as it was the 1st time I was "intruding" in your code, I prefered not to modify its structure. Then the trick. A more deep modification has been done in _Signal.py code to track enum variables. The default _printVcd() method is no more for strings but for an integer which is the _index attribute of the val of an (potentially) enum variable. It seems that this default case is invocated only in this case. I'm a little newbie in Python and some Python idiom's are a little puzzling. Then my question: Why an enum variable is not a true class testable by isinstance(..,Enum) ? this will simplify the catching of enum variables in _Signal.py. Jean |