Closed adumont closed 4 years ago
Full build log of working commit: (Build 222) https://travis-ci.com/adumont/hrm-cpu/builds/147103961#L1596
Build log of failing commit: (Build 223) https://travis-ci.com/adumont/hrm-cpu/builds/147104799#L1482
Hi @adumont. Thanks for the report. Your diff looks innocuous enough that this looks to be a bug in upstream ABC berkeley-abc/abc, perhaps hitting an obscure corner case that wasn't triggered before. Would you like to report it there?
An example that I did earlier is here: berkeley-abc/abc#61 and uses the equivalent test-case that you attached as yosys-abc-eQGZWS.zip
.
In case it helps, I've minimised the ABC script to this:
read_blif input.blif;
strash;
dc2; # Removing this optimisation command results in a different solution that does not trigger the assertion failure
if;
lutpack -S 1;
As for you current predicament, I understand that the lutpack
command that is failing is an optional optimisation. You can workaround this ahead of an upstream fix by overriding the -script
argument to abc
with this Yosys command before synth_ice40
:
scratchpad -set abc.script +strash;ifraig;scorr;dc2;dretime;strash;dch,-f;if;mfs2
Let me know if that unblocks you!
Hi @eddiehung ,
Thanks for the feedback.
First of all, I have tried the scratchpad -set abc.script +strash;ifraig;scorr;dc2;dretime;strash;dch,-f;if;mfs2
before synth_ice40
and it worked.
I'll open an issue in berkeley-abc/abc.
Feel free to close this issue then :). Thanks a lot.
The assertion is commented out for now in abc: https://github.com/berkeley-abc/abc/commit/53f223806f1c570b62a180e0eb3aed3a974c1677
The assertion is commented out for now in abc: berkeley-abc/abc@53f2238
Thanks @nakengelhardt! I think that change is safe to use despite its commit message being:
Temporary commenting out of the assertion.
I've opened PR #1744 to bump ABCREV
.
@adumont: please report back whether it fixes it for you too!
Steps to reproduce the issue
Failing commit is 2b4180c2bf508fead7d1d14def8600957124f50b.
will try to synthesize the design. The step:
fails with:
I've uploaded some stuff from the /tmp/yosys-abc-eQGZWS:
yosys-abc-eQGZWS.zip
My toolchain is updated to latest git version (tool/commit sha):
yosys.ver:9f5613100b360beb60608df1296ee81dc185e56c arachne-pnr.ver:c40fb2289952f4f120cc10a5a4c82a6fb88442dc icestorm.ver:0ec00d892a91cc68e45479b46161f649caea2933 iverilog.ver:b1114760fcfba55ee9ca35ba95e2b3ed2b7c7a20 symbiyosys.ver:500b526131f434b9679732fc89515dbed67c8d7d verilator.ver:0c6c83e2787803d9b7c014ddbc8710f47d0f82f7 yices2.ver:1dcb71c405b5f1d21b363eb33b566068cad2e87d
Previous commit (053c6f1a5f2ab79add807138b24f92de6b3b308c053c6f1a5f2ab79add807138b24f92de6b3b308c) build fine.
Here's the diff in verilog code: https://github.com/adumont/hrm-cpu/commit/2b4180c2bf508fead7d1d14def8600957124f50b.
Expected behavior
It should produce the blif file.
Actual behavior
Fails with assertion in ABC.