yne/vcd

Suggestion: an argument to specify sample range

tcal-x opened this issue · 4 comments

Hi @yne , thanks for this!

It might be useful to be able to specify a sample range (e.g. -t=100-200, or -t=100:200, not sure what is the more standard syntax). Then it would be possible to write a wrapper script that would clear the screen and redraw the waves with a different sample range, to give the appearance of left-right scrolling of the waveforms.

Hmm, I just realized I could get the same effect by piping the output through an appropriate "cut" command -- keeping the signal names on the left, and then just selecting the range of samples that I want.

I tried using cut, but it doesn't work in all cases, since it's counting all characters, and some signals seem to have embedded special characters in their ASCII output, perhaps for bolding, or maybe just to encode special characters? It seems most Boolean signals, represented as waves, are this way. I tried the different -r options, and it doesn't matter, the wave signals are still affected.

yne commented

Hi @tcal-x ,

vcd < plasma.vcd | less -S shall give you an horizontal scrolling. Not sure if it's what you need.

As you have guessed, I use the Unicode character since there is no "upperscore" ASCII character.

This Unicode character is made of multiple bytes, which cut does not seems to understand (even using -c instead of -b)

Thanks, less -S does the trick.