yne / vcd

VCD file (Value Change Dump) command line viewer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MAX_CHANNEL reached and segfault with SystemC output

nantunest opened this issue · comments

Hi, nice work. I was trying to display a vcd file which is output from a SystemC execution. It didn`t and shows the message:

Fatal error. Send the VCD on https://github.com/yne/vcd/issues
Reason: MAX_CHANNEL reached (400), rebuild with -DMAX_CHANNEL=...

I tried to increase the MAX_CHANNEL to 100000. With that I received a segfault
counter.txt

Yes, in your file example, channel number is made of 5 character aaaaa wich mean up to 7339040224 entries

The only solution would be to store the channel list as HashMap<string,Channel>

I'll keep this refactor in mind. It'll be usefull for many other cases.

I made a hashmap based version, but the ordering are not kept during listing so I won't merge #19 for now

but here is a built asset:
vcd.zip

Yes, in your file example, channel number is made of 5 character aaaaa wich mean up to 7339040224 entries

The only solution would be to store the channel list as HashMap<string,Channel>

I'll keep this refactor in mind. It'll be usefull for many other cases.

Is it something normal to have this quantity of channels? Wha does the channel number mean? Should it be the quantity of signals in the plot?

VCD Channels are numbered with 1 character, if all the 86 allowed character are taken, you can use 2 character to go up to 7396 channel etc.
In your VCD, the first channel is numbered with an "aaaaa" name, so it's quite a huge number.

The new HashMap version seems to be working very well, but it now requires a khash.h + kvec.h headers from klib

I used git submodule to avoid duplicating the code, but I could also copy those two headers file in my repo (I find this dirty, but that's subjectiv)

@UffeJakobsen : from a maintainer perspective, could having a git submodule be problematic ?