Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAX_CHANNEL reached and segfault with SystemC output #18

Open
nantunest opened this issue May 24, 2022 · 5 comments
Open

MAX_CHANNEL reached and segfault with SystemC output #18

nantunest opened this issue May 24, 2022 · 5 comments

Comments

@nantunest
Copy link

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

@yne
Copy link
Owner

yne commented May 26, 2022

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.

@yne
Copy link
Owner

yne commented May 27, 2022

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

@nantunest
Copy link
Author

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?

@yne
Copy link
Owner

yne commented May 27, 2022

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.

@yne
Copy link
Owner

yne commented Dec 17, 2022

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants