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
Use of // verilator public with inout causes error #58
Comments
Original Redmine Comment Might be a tristate bug, try changing assign eth_mdio = 1'bZ; to = 1'b0; |
Original Redmine Comment Thanks for the quick response. I tried changing that tristate with no effect. However there are other tri-state's in the code, which I'll check. I'll also fix the warnings to see if that helps. |
Original Redmine Comment I got rid of all the warnings, but the error persisted. I noticed that the signal concerned (@eth_mdio@) is an @inout@ of the underlying module. I temporarily removed it as an argument, together with two other @inout@ signals and the problem went away. I'll work on putting together a small demonstrator. |
Original Redmine Comment Given it's an inout issue and you have a workaround, it's probably Lane's inout code. |
Original Redmine Comment Jeremy,
It is very fragile in that it must meet the additional rules:
Check out the other issues we have found with tristate as well. I am in the process of improving the robustness and expanding tristate support. I am not expecting to have an update ready for several weeks. Lane |
Original Redmine Comment Thanks for your hard work on this. I'll try to get some test cases together to help you. My work is all with OpenRISC, so no problem sharing it publicly. Jeremy |
Original Redmine Comment We'll address this with dpi functions if it comes up again. |
Author Name: Jeremy Bennett (@jeremybennett)
Original Redmine Issue: 58 from https://www.veripool.org
Original Date: 2009-01-25
Original Assignee: Lane Brooks
I have a model (of the OpenRISC 1000 SoC) which compiles with Verilator 3.700, albeit with a bucketload of warnings.
I've tried extending it to allow external access to a variable by using a @verilator public@ function:
This is in a Verilog file a few levels down the hierarchy. @wb_freeze@ is an input to the module. However when I now build the model, I get a completely unrelated error in the top module:
The problem seems to be use of @// verilator public@. If I remove this the problem goes away (but then I can't access the function, which was the whole point).
I've attached the script file I used for the build (v_processed.scr), the file with the modified function (or1200_ctrl.v) and the top level file (orpsoc.v).
I realize this may be a consequence of the ignored warnings, but I've flagged the issue early in case it is already known. In the meantime I'll address the warnings and try to reproduce the problems in a clean build.
Running under Fedora 9, with GCC 4.3.0 and SystemC 2.2.
The text was updated successfully, but these errors were encountered: