0
\$\begingroup\$

I was wondering if its possible to flatten all of the busses in a VCD file such that there will be a separate value change recorded for each bit - rather than a cumulative recording of the following syntax: b<value> <identifier>

My goal is to count the number of transitions that occur after each timestamp recorded. If all busses were flattened, this would be straight-forward since it would simply be the number of value changes listed.

However, these vector changes instead of bit changes complicate the issue. You would need to keep a record of the previous state of the vector in order to determine exactly how many bits in the vector transitioned.

Any other suggestions to fix the problem are welcome, any help is appreciated!

-k

\$\endgroup\$
  • \$\begingroup\$ Which tool do you want to use to analyse the VCD file? Depending to the tool either way may have its advantages. \$\endgroup\$ – Nippey Sep 17 '12 at 9:15
2
\$\begingroup\$

It is possible to flatten such a bus programmatically.

Instead of writing

$var wire 8 # data $end

You will have to declare (in this case) 8 single variables

$var wire 1 $ data0 $end
$var wire 1 % data1 $end
$var wire 1 & data2 $end
[...]

And then you can convert each change into separate lines:

b10000001 #

Will turn to: (knowing the last state being b01100001)

1$
0%
0&

So you will have to parse and rewrite the VCD file using you favourite programming language.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.