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

Assume x values for missing signal data in FST #4627

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RCoeurjoly
Copy link
Contributor

What are the reasons/motivation for this change?
Handle cases where signal data is missing in FST files during simulation. Previously, when a signal ID was not found in past_data, it would cause an error. This patch ensures that missing signal data is assumed to be undefined ('x'), which aligns with the behaviour of gtkwave. Below is a screenshot of how gtkwave interprets tests/sim/simple_assign.vcd.
gtkwave_simple_assign

Explain how this is achieved.
Instead of logging an error when the signal ID is not found, the valueOf now returns a string filled with 'x' characters, where the length of the string corresponds to the signal’s width.
If applicable, please suggest to reviewers how they can test the change.

Note

I considered adding a warning like:
log_warning("Signal id %d not found, assuming x\n", (int)signal);
but decided against it to avoid extra verbosity. Open to adding it if needed.

Co-authored-by: Miodrag Milanovic <[email protected]>
Co-authored-by: Roland Coeurjoly <[email protected]>
@RCoeurjoly RCoeurjoly requested a review from mmicko October 2, 2024 10:13
Copy link
Member

@mmicko mmicko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think this we can safely add after release

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

Successfully merging this pull request may close these issues.

2 participants