cocotb: Looping with First cause segmentation fault (modelsim)
Hello,
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).
About this issue
- Original URL
- State: open
- Created 5 years ago
- Comments: 20 (20 by maintainers)
Should I ever manage to miraculously debug code in python, would it be worth to add the procedure to the
Troubleshootingsection 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_pdbpython packageGUI=1At this point you should see a pdb instance being opened.