Problem with vcd output

The code in the gist creates a vcd file which when opened using GTKwave shows some undesired waveform.

Here in this example both ‘ins1’ and ‘ins2’ have same name ‘test_0’ and both the function have signals named ‘clock’ .
The desired output should contain two ‘clock’ signals with one signal starting from 1 and the other starting from 0.

But here the vcd file generated by this code, shows a single bus of width 2 (probably the merged values of both the signals named ‘clock’) with value alternating between ‘10’ and ‘01’.

Can anyone help me with this? … is this some issue or am I doing something wrong?

Thank you

I confirm this on my setup and the same thing happens if clock is coming from an argument.
And conversion gives a duplicate:
wire test_0_self_clock; wire test_0_self_clock;

@sriramesh4 can you create a test for this under the myhdl/test/bugs and submit a PR to myhdl. Use the analyze_convert and verify_convert methods.

1 Like