I have a waveform where a lot of signals are toggling, however one signal toggled very few times.
For example, let's say my time range from 0 to 1000.
signal A changes its value at 800,900,1000.
signal B changes its value only at 10, 20,30.
In VCD file A values all way up to 1000 are defined, however the last record for B ends at 30.
If I try to get signal value like this:
vcd['B'][500] I get an error from inside the library:
~/opt/anaconda3/lib/python3.7/site-packages/vcdvcd/vcdvcd.py in __getitem__(self, time)
267 """
268 left = bisect.bisect_left(self.tv, (time, ''))
--> 269 if self.tv[left][0] == time:
270 i = left
271 else:
IndexError: list index out of range
I think the appropriate fix you be return the last value for that signal - in my example - you know value doesn't change after 30. so the correct answer for 500 should be the last value - the same for 30 timestamp.
Hi,
I have a waveform where a lot of signals are toggling, however one signal toggled very few times. For example, let's say my time range from 0 to 1000. signal A changes its value at 800,900,1000. signal B changes its value only at 10, 20,30. In VCD file A values all way up to 1000 are defined, however the last record for B ends at 30. If I try to get signal value like this: vcd['B'][500] I get an error from inside the library:
I think the appropriate fix you be return the last value for that signal - in my example - you know value doesn't change after 30. so the correct answer for 500 should be the last value - the same for 30 timestamp.