Re: [myhdl-list] Re: VCD generation bug
Brought to you by:
jandecaluwe
From: David B. <dav...@fr...> - 2004-11-16 08:51:52
|
Selon Jan Decaluwe <ja...@ja...>: > David Brochart wrote: > > There is a bug in the generation of the VCD file. In the following ex= ample: > > > > ---------------------------------------------------------------------= ------ > > > > from myhdl import intbv, Signal, Simulation, delay, traceSignals > > > > def gen(a): > > while 1: > > a.next =3D 0 > > yield delay(10) > > a.next =3D 1 > > yield delay(10) > > > > def dummy(a): > > b =3D Signal(intbv(0)) > > b_i0 =3D gen(b) > > return b_i0 > > > > def test(): > > a =3D Signal(intbv(0)) > > a_i0 =3D gen(a) > > dummy_i0 =3D dummy(a) > > return a_i0, dummy_i0 > > > > test =3D traceSignals(test) > > sim =3D Simulation(test) > > sim.run(100) > > > > ---------------------------------------------------------------------= ------ > > > > You can see in the generated VCD file that several signals have the s= ame > > identifier. > > There are 2 signals, so there should be two different identifiers, > right? That's also what I see in the VCD definition area, so I'm not su= re > there's a problem here. > > > Also, signals in "a_i0" are not traced. > > Yes, there was a bug in _extractHierarchy.py. Attached the current vers= ion > that probably solves it. (As I had solved this already some time ago, I > think it's about time I'll do a maintenance release...) > > 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 > Here is the relevant part we get in the VCD file: $scope module test $end $var real 1 ! a $end $scope module dummy_i0 $end $var real 1 ! a $end $var real 1 " b $end $scope module b_i0 $end $var real 1 " a $end $upscope $end $upscope $end $upscope $end The thing is that we have the same identifier for "a" in "test" and "a" i= n "dummy_i0", and also for "b" in "dummy_i0" and "a" in "b_i0", which is ri= ght because they are really the same signals. But somehow the version of GTKW= AVE I run on Linux doesn't like it and doesn't display the waves properly. Whic= h is strange because with another version of GTKWAVE on Solaris it works fine.= Maybe we should give a unique identifier for every signal even if some of the s= ignals are actually the same? David. |