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
Segmentation fault at V3LinkLevel::wrapTop () #79
Comments
Original Redmine Comment This may be related to #�. Are you using the release version or the git |
Original Redmine Comment To solve #� I couldn't download the git version behind our secure network so you send me some mods to do to the source code myself. The version I am using does include these changes. Are there any more changes in the git version that need to be incorporated? If yes, then I will see if I can find an alternative way of accessing the git version. |
Original Redmine Comment The patches should have what matters in the git version. Unfortunately the backtrace doesn't include the filename. Try "verilator --gdb --debug ..." then the "run" and "bt". The --debug should have it load the symbols so we can see the error line. |
Original Redmine Comment Before I received your latest email I downloaded the git version but while making the installation I came across the compile error shown in file #�. As far as the --gdb option the response is shown in file #�. |
Original Redmine Comment The first error "DTVERSION_rev" is because I think you got a earlier error message from git. There's probably something wrong with your git install, anyhow just put into src/config_rev.h static const char* DTVERSION_rev = "UNKNOWN_REV (mod)"; I'll make it handle the error better in the next version. As for the real problem, I didn't see a backtrace. Use
Note the _dbg on verilator_bin |
Original Redmine Comment Thanks. That worked. Here is the backtrace: Program received signal SIGSEGV, Segmentation fault. |
Original Redmine Comment I believe the error is because at that point there's no modules left to process. |
Original Redmine Comment I guess the clue must be that the module itself can be verilated but the instance of that module in the higher level wrapper crashes. I tried the same with the submodules i.e. the submodules themselves can be verilated but when they are instantiated in a similar wrapper the translation crashes. The same submodules when they are instantiated in the top level module are fine since the top level module itself with instances of the submodules can be verilated fine. The wrapper module is as simple as can be with no inputs, and just an instance with inputs tied to 0 and outputs connected to wires. |
Original Redmine Comment The problem was indeed in the wrapper schematic. I was not specifying the top-module correctly:) Now it's fine. |
Original Redmine Comment Glad you found it. I did have a test for the error message when --top-module isn't specified, so it wasn't just that - can you tell me what to do to hit this? |
Original Redmine Comment I can see the error message when the top-module specification is missing all-together. I did specify a top-module and it was an existing module only it wasn't the actual top module in my design. My top module A had submodules B, C, and D. I was accidentally specifying submodule B as a top-module. Does that make sense? |
Original Redmine Comment To be more exact I had module A_top which was instantiating module A (which in turn instantiated B, C, and D) and I was specifying top-module to be A instead of A_top. I tried to simplify the problem in my earlier response and I don't expect it to make a difference but this is the exact setup I was working with. |
Original Redmine Comment Ok, got it reproduced. The git version now gives: %Error: Specified --top-module 'a' isn't at the top level, it's under another cell. |
Original Redmine Comment In 3.703. |
Author Name: Dimitris Nalbantis
Original Redmine Issue: 79 from https://www.veripool.org
Original Date: 2009-04-22
Original Assignee: Wilson Snyder (@wsnyder)
I have a hierarchical Verilog module which I can translate to C++ using Verilator but when I instantiate this module into another wrapper module I get a segmentation fault. Using gdb I can see the following call stack at the point of the crash:
(gdb) bt
#0 0x00000000005d021c in V3LinkLevel::wrapTop ()
#1 0x0000000000446ad9 in process ()
#2 0x000000000044b997 in main ()
(gdb) p fl
No symbol table is loaded. Use the "file" command.
(gdb) p nodep->fl
No symbol table is loaded. Use the "file" command.
Any idea what might be wrong or how to debug further?
The text was updated successfully, but these errors were encountered: