Skip to content
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

picosoc_demo example hits yosys ABC9 assert during synth #127

Open
Arvind-Srinivasan opened this issue Feb 28, 2021 · 5 comments
Open

picosoc_demo example hits yosys ABC9 assert during synth #127

Arvind-Srinivasan opened this issue Feb 28, 2021 · 5 comments

Comments

@Arvind-Srinivasan
Copy link

As mentioned in Slack, following the steps in issue #120 as @Xiretza except attempting to build the picosoc_demo results in a similar issue with an assert failing

25.5.2. Executing ABC9_OPS pass (helper functions for ABC9).
ERROR: Assert `modules_.count(name) == 0' failed in kernel/rtlil.cc:616.

However, it seems that this can be resolved successfully by commenting out that specific assert on line 616 which is seemingly not present in the Conda packaged version.

@Ravenslofty
Copy link

I'm going to come back to this tomorrow, but here's my debugging so far:

The problem here is that ABC9 is trying to create a bypass module for FDCE, but because ABC9 has already been run, this already exists, and Yosys throws an assert because of the name collision.

I'm not entirely sure what to do here; the bypass module is mostly just a buffer and according to a comment should have been removed at the end of ABC9.

@litghost
Copy link
Contributor

litghost commented Mar 6, 2021

I'm not entirely sure what to do here; the bypass module is mostly just a buffer and according to a comment should have been removed at the end of ABC9.

Is it possible that some of cleanup is not triggering? As a debugging idea, could all new modules from ABC9 be marked with an attribute, and then add an assertion something like assert len(select modules where attribute == "added_for_abc9") == 0 after the clean-up?

@dnltz
Copy link

dnltz commented Mar 8, 2021

I had the same issue some days ago and opened an issue on Yosys: YosysHQ/yosys#2581

In my case this was due a really strange, wrong call from PROC_CLEAN into the abc9 function which only occurred when building it by myself. My solution was to use the litex-hub binary ...

@Ravenslofty
Copy link

That's an interesting hint, thank you.

@Arvind-Srinivasan
Copy link
Author

The asserts are optimized out on the Litex-hub binary no? That would explain why it never causes an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants