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

Simulation results are inconsistent #1186

Open
FSY369 opened this issue Nov 25, 2024 · 1 comment
Open

Simulation results are inconsistent #1186

FSY369 opened this issue Nov 25, 2024 · 1 comment
Labels
Need info Needs more information, or changes are requested, before a merge is approved.

Comments

@FSY369
Copy link

FSY369 commented Nov 25, 2024

Hello, recently I encountered a problem that gave me a lot of headaches when using iverilog for project development. Here's how it works, I have an RTL design file called rtl.v that I synthesize using two different tools (vivado and yosys). Following the normal process, I thought I would get a similar result, but it wasn't.

After synthesis, I used IverLog to perform simulation tests to verify the correctness of the design. However, during this step, I noticed an anomaly: the combined results of Vivado and Yosys were inconsistent in the simulation. This inconsistency is mainly reflected in the presence of the letter "z" in the analog output, which confuses me a lot.

Here, I'd like to ask, does iverilog need additional clarification or handling of the special state of "z"? After all, in my current project, there are cases where I use the same tools and get inconsistent results.

屏幕截图 2024-11-25 200816

屏幕截图 2024-11-25 200733

@caryr caryr added the Need info Needs more information, or changes are requested, before a merge is approved. label Nov 25, 2024
@caryr
Copy link
Collaborator

caryr commented Nov 25, 2024

I'm not sure how we can help given all you have provided is what looks like screen shots of diagnostic output. We have no idea what the RTL is that is generating the logs or what the diagnostic output corresponds to. It is very likely that the RTL is different between the two runs and that it is this difference, not a bug in iverilog, that is causing the difference.

It feels like this is part of a class and if so it would be best if you discussed any failures in your simulations with a teaching assistant or instructor before filing bug reports against the tools you are using. In general you should not need to file a report and your instructor/teaching assistant should do this after reducing the example to the minimum that reproduces the issue

Once you start to learn to code RTL one of the first adjacent skills you need to learn is how to debug the RTL and how to create a reduced example of the failure. There are occasionally issues that are because of global interactions, but these are rare. For this example it looks like you have an 8-bit wide wire that is not driven by any logic. Find the statement that is generating the output and determine what wire/wires are showing z? Next look in the design and find if the signal is actually driven in both cases. If it's not then why are the synthesis tools giving different results? It is much more likely that this is a synthesis issue and not an issue in iverilog.

Lastly if this is part of a class could you have your instructor contact us because we have seen reports like this before and we are not adjunct teaching assistants. They should be making it clear that the students do not currently have the skills necessary to file bug reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Need info Needs more information, or changes are requested, before a merge is approved.
Projects
None yet
Development

No branches or pull requests

2 participants