Looping with First cause segmentation fault (modelsim)
See original GitHub issueHello,
I am writing a test-bench to parse an asynchronous signal.
Among the various checks, I need to get whether the monitored signal shows a rising edge, a falling edge or simply never arrive (timeout) transition.
To achieve this I used the cocotb.triggers.First
method.
When I yield this method in a for loop I always get a segmentation error after the first few iterations.
I attached a simple counter test to reproduce the issue.
I think it is related to the way the scheduler cleans up the not-yet-fired triggers in the First
method list (I do not understand a lot of the code behind its implementation).
Issue Analytics
- State:
- Created 4 years ago
- Comments:20 (20 by maintainers)
Top Results From Across the Web
Segmentation fault in a for loop [duplicate] - Stack Overflow
When I run gdb, it says I'm getting the segmentation fault at line 25, which is the first for loop. Edit: So I've...
Read more >ModelSim User's Manual - Microsemi
Tcl while Loop . ... Fatal Signal Segmentation Violation (SIGSEGV) . ... The primary access point in the ModelSim GUI is called the...
Read more >Segmentation Fault During Elaboration with ModelSim SE - Intel
If you run the ld or elab commandsin the msim_setup.tcl script for a UniPHY-based IPcore in ModelSim SE, you may encounter a segmentation...
Read more >Identify what's causing segmentation faults (segfaults)
A segmentation fault (aka segfault) is a common condition that causes programs to crash; they are often associated with a file named core...
Read more >ModelSim® User's Manual
Fatal Signal Segmentation Violation (SIGSEGV) . ... In order to detect the presence of these loops, ModelSim defines a limit, the “iteration limit", ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Should I ever manage to miraculously debug code in python, would it be worth to add the procedure to the
Troubleshooting
section of the CoCoTb guide?Ok will make a pull request to update the guide.
Btw I managed to connect to a debugger in remote (I report the receipt for your convenience):
remote_pdb
python packageGUI=1
At this point you should see a pdb instance being opened.