-
Notifications
You must be signed in to change notification settings - Fork 80
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
Wires used but never driven #422
Comments
Hi Julian, Undriven wires are often because a wire was intended to be an input but it was coded as a simple wire. Basically it is a wire that is that is a dangling input. The function Does the .blif file have all of the inputs listed as ".inputs"? Is there a really simple .blif (maybe generated in the same way but for simple logic gate) that has the same problem and we can dissect to figure out what is going on? For that smaller input you might try running it with debug mode on, that way we can track back to where in the blif parser we are generated those wires which might (in turn) help us figure out the issue. |
So the original VHDL does indeed have places where constant propagation through, ex. AND gates, is likely expected to occur... But I thought constant propagation and other optimization steps would be done by yosys. Which made me wonder what optimizations PyRTL was finding/doing that likely could be better handled upstream... I did not try to read the .blif. But I will try to create a smaller example that shows the issue. Thanks for your time eh! |
Yeah, that would be my expectation as well. We have only tested PyRTL with the Verilog->YoSys->Pyrtl path and have not tried VHDL at all -- could be something being generated differently there. |
This .blif shows the issue and is much smaller If I had to bet it's maybe whatever these undefined
From the VHDL I can tell you |
I was able to reproduce the "used but not driven" exception with processor_instances_0CLK_a3e7f19d_top.blif (but not top_265f.blif.txt). After adding some more debug logs, it seems the errors are triggered by a lot of wires named
Searching the .blif file for these wires, they do seem to be undriven:
Is it possible to change the program that generated this .blif file to omit these wires? I tried removing them with
|
Hi there thanks for checking in on this Yeah these But I would have expected them to not even be rendered in the .blif and would have been optimized away by yosys? As opposed to making PyRTL do the work with The original start of this issue is just about it being slow - it doesnt seem like things are broken at all in PyRTL and I can get by with the You folks can close this issue unless it otherwise serves you. Thanks for your attention. |
Hi there,
I am quite unsure if this issue stems from PyRTL itself and am looking for some feedback/suggestions.
I have a flow where I am doing timing analysis on VHDL code.
VHDL -> GHDL plugin for yosys -> yosys write_blif -> pyrtl.input_from_blif
PyRTL steps look like:
processor_instances_0CLK_a3e7f19d_top.blif.zip
Previously I was happy with results from adding in those two commented out lines
It was apparently doing what was needed to trim the unused/undriven? wires...
The cause for this issue is that
pyrtl.optimize
is taking a long time (and this is a ~smaller version of the design). I think it is doing more than the bare minimum I need it to regarding theWires used but never driven
tmp
wires.Maybe adding a
skip_sanity_check=True
option toTimingAnalysis
could work?Or I think the
_remove_unlistened_nets
step inoptmize
is all I need?Open to any comments+suggestions on the whole flow using the tools
Thanks folks
The text was updated successfully, but these errors were encountered: