Previous journal: | Next journal: |
---|---|
0129-2023-08-22.md | 0131-2023-08-24.md |
I managed (I think) to tease an error message out of yosys-abc before it core-dumps (SIGABRT), and it's this:
yosys-abc: src/base/abc/abcAig.c:167: void abc::Abc_AigFree(abc::Abc_Aig_t*): Assertion `Vec_PtrSize( pMan->vStackReplaceOld ) == 0' failed.
Here's the longer log:
$ yosys-abc -s -f /work/runs/yosys-abc-failed/abc.script
ABC command line: "source /work/runs/yosys-abc-failed/abc.script".
+ read_blif /work/runs/yosys-abc-failed/input.blif
+ read_lib -w /work/runs/wokwi/tmp/synthesis/trimmed.lib
Parsing finished successfully. Parsing time = 0.06 sec
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dfbbn_2".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dfrbp_2".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dfrtp_2".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dfrtp_4".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dfsbp_2".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dfstp_2".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dfstp_4".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dfxbp_2".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dfxtp_2".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dfxtp_4".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dlxtn_1".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dlxtn_2".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dlxtn_4".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dlxtp_1".
Scl_LibertyReadGenlib() skipped three-state cell "sky130_fd_sc_hd__ebufn_2".
Scl_LibertyReadGenlib() skipped three-state cell "sky130_fd_sc_hd__ebufn_4".
Scl_LibertyReadGenlib() skipped three-state cell "sky130_fd_sc_hd__ebufn_8".
Library "sky130A_merged" from "/work/runs/wokwi/tmp/synthesis/trimmed.lib" has 175 cells (17 skipped: 14 seq; 3 tri-state; 0 no func; 0 dont_use). Time = 0.09 sec
Memory = 9.54 MB. Time = 0.09 sec
Warning: Detected 2 multi-output gates (for example, "sky130_fd_sc_hd__fa_1").
+ read_constr -v /work/runs/wokwi/tmp/synthesis/synthesis.sdc
Setting driving cell to be "sky130_fd_sc_hd__inv_2".
Setting output load to be 33.442001.
+ read_constr /work/runs/wokwi/tmp/synthesis/synthesis.sdc
+ fx
Abc_NtkFastExtract: Nodes have duplicated fanins. FX is not performed.
+ mfs
+ strash
+ refactor
Flags A, B, or C are not zero.
yosys-abc: src/base/abc/abcAig.c:167: void abc::Abc_AigFree(abc::Abc_Aig_t*): Assertion `Vec_PtrSize( pMan->vStackReplaceOld ) == 0' failed.
Aborted (core dumped)
That led me to this, which might be similar to what I'm seeing: The-OpenROAD-Project/OpenLane#1523 -- In there, it's recommended that this be used in the config.tcl
:
set ::env(SYNTH_STRATEGY) {DELAY 4}
I don't think that can be done in TT though, because of the 'golden' config.tcl
. Also not sure what the consequences of this are. I will try it anyway, locally, to see what happens.
For some reason, the above log lines and error don't seem to be recorded anywhere in the OpenLane runs/wokwi
output, maybe because the SIGABRT causes the output buffer to be discarded before it gets picked up and redirected into 1-synthesis.log
?.
In order to get this, I had to grab the original files that were passed to yosys-abc. Here's how I did that:
- Launch the OpenLane container (
3bc9d02
, tag2023.06.26
as used by TT04):export OPENLANE_ROOT=~/tt/openlane export PDK_ROOT=~/tt/pdk export PDK=sky130A export OPENLANE_TAG=2023.06.26 export OPENLANE_IMAGE_NAME=efabless/openlane:3bc9d02d0b34ad032921553e512fbe4bebf1d833 cd ~/anton/tt04-raybox-zero # My TT04 repo to be hardened. docker run --rm \ -v $OPENLANE_ROOT:/openlane \ -v $PDK_ROOT:$PDK_ROOT \ -v $(pwd):/work \ -e PDK=$PDK \ -e PDK_ROOT=$PDK_ROOT \ -u $(id -u $USER):$(id -g $USER) \ --interactive --tty \ $OPENLANE_IMAGE_NAME
- When in the OppenLane docker container, run:
./flow.tcl -overwrite -design /work/src -run_path /work/runs -tag wokwi
- This will fail during synthesis (Step 1) as follows:
OpenLane 3bc9d02d0b34ad032921553e512fbe4bebf1d833 All rights reserved. (c) 2020-2022 Efabless Corporation and contributors. Available under the Apache License, version 2.0. See the LICENSE file for more details. [INFO]: Using configuration in '../work/src/config.tcl'... [INFO]: PDK Root: /home/zerotoasic/tt/pdk [INFO]: Process Design Kit: sky130A [INFO]: Standard Cell Library: sky130_fd_sc_hd [INFO]: Optimization Standard Cell Library: sky130_fd_sc_hd [INFO]: Run Directory: /work/runs/wokwi [INFO]: Removing existing /work/runs/wokwi... [INFO]: Saving runtime environment... [INFO]: Preparing LEF files for the nom corner... [INFO]: Preparing LEF files for the min corner... [INFO]: Preparing LEF files for the max corner... [INFO]: Running linter (Verilator) (log: ../work/runs/wokwi/logs/synthesis/linter.log)... [INFO]: 0 errors found by linter [WARNING]: 20 warnings found by linter [STEP 1] [INFO]: Running Synthesis (log: ../work/runs/wokwi/logs/synthesis/1-synthesis.log)... [ERROR]: during executing yosys script /openlane/scripts/yosys/synth.tcl [ERROR]: Log: ../work/runs/wokwi/logs/synthesis/1-synthesis.log [ERROR]: Last 10 lines: 67. Executing ABC pass (technology mapping using ABC). 67.1. Extracting gate netlist of module `\tt_um_algofoogle_raybox_zero' to `/tmp/yosys-abc-SKgl2t/input.blif'.. Extracted 18889 gates and 19039 wires to a netlist network with 148 inputs and 151 outputs. 67.1.1. Executing ABC. sh: line 1: 206 Aborted (core dumped) "/build/bin/yosys-abc" -s -f /tmp/yosys-abc-SKgl2t/abc.script 2>&1 ERROR: ABC: execution of command ""/build/bin/yosys-abc" -s -f /tmp/yosys-abc-SKgl2t/abc.script 2>&1" failed: return code 134. child process exited abnormally [ERROR]: Creating issue reproducible... [INFO]: Saving runtime environment... . . .
- Notice the error refers to
/tmp/yosys-abc-SKgl2t/
-- I wanted to make a backup copy of this directory so I did:...which putscd /tmp cp -R yosys-abc-* /work/runs/
yosys-abc-SKgl2t
in my host's~/anton/tt04-raybox-zero/runs/
- Now we can actually just re-run the failed yosys-abc command as follows:
...and for me this spat out the output above.
yosys-abc -s -f /tmp/yosys-abc-SKgl2t/abc.script
OpenLane cleans up the yosys-abc tmp files very quickly, so to snag a copy of them, I went into the docker container as above, then ran this in background:
while true; do sleep 0.2; cp -R /tmp/yosys-abc* /work/runs/; done &
Every 200ms this makes a copy of any of the yosys-abc tmp files and puts them in /work/runs/
(which is ~/anton/tt04-raybox-zero
). I managed to get a copy of the tmp files from a successful run by then running an OpenLane flow.
The input files in the yosys-abc-*
tmp directory are:
2463 abc.script
1551396 input.blif
754 stdcells.genlib
abc.script
is the same between a working and failed run, while input.blif
differs substantially between the two.
Anyway, by copying the passed yosys-abc-...
dir back into /tmp
(note that abc.script
has absolute path references to this stuff in /tmp
) I was able to then run yosys-abc and it gave this output:
Click to show full log...
$ yosys-abc -s -f /tmp/yosys-abc-SSFkB5/abc.script
ABC command line: "source /tmp/yosys-abc-SSFkB5/abc.script".
+ read_blif /tmp/yosys-abc-SSFkB5/input.blif
+ read_lib -w /work/runs/wokwi/tmp/synthesis/trimmed.lib
Parsing finished successfully. Parsing time = 0.06 sec
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dfbbn_2".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dfrbp_2".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dfrtp_2".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dfrtp_4".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dfsbp_2".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dfstp_2".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dfstp_4".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dfxbp_2".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dfxtp_2".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dfxtp_4".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dlxtn_1".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dlxtn_2".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dlxtn_4".
Scl_LibertyReadGenlib() skipped sequential cell "sky130_fd_sc_hd__dlxtp_1".
Scl_LibertyReadGenlib() skipped three-state cell "sky130_fd_sc_hd__ebufn_2".
Scl_LibertyReadGenlib() skipped three-state cell "sky130_fd_sc_hd__ebufn_4".
Scl_LibertyReadGenlib() skipped three-state cell "sky130_fd_sc_hd__ebufn_8".
Library "sky130A_merged" from "/work/runs/wokwi/tmp/synthesis/trimmed.lib" has 175 cells (17 skipped: 14 seq; 3 tri-state; 0 no func; 0 dont_use). Time = 0.09 sec
Memory = 9.54 MB. Time = 0.09 sec
Warning: Detected 2 multi-output gates (for example, "sky130_fd_sc_hd__fa_1").
+ read_constr -v /work/runs/wokwi/tmp/synthesis/synthesis.sdc
Setting driving cell to be "sky130_fd_sc_hd__inv_2".
Setting output load to be 33.442001.
+ read_constr /work/runs/wokwi/tmp/synthesis/synthesis.sdc
+ fx
Abc_NtkFastExtract: Nodes have duplicated fanins. FX is not performed.
+ mfs
+ strash
+ refactor
+ balance
+ rewrite
+ refactor
+ balance
+ rewrite
+ rewrite -z
+ balance
+ refactor -z
+ rewrite -z
+ balance
+ retime -D -D 20000 -M 5
+ scleanup
Error: The network is combinational.
+ fraig_store
+ balance
+ fraig_store
+ balance
+ rewrite
+ refactor
+ balance
+ rewrite
+ rewrite -z
+ balance
+ refactor -z
+ rewrite -z
+ balance
+ fraig_store
+ balance
+ rewrite
+ refactor
+ balance
+ rewrite
+ rewrite -z
+ balance
+ refactor -z
+ rewrite -z
+ balance
+ fraig_store
+ balance
+ rewrite
+ refactor
+ balance
+ rewrite
+ rewrite -z
+ balance
+ refactor -z
+ rewrite -z
+ balance
+ fraig_store
+ fraig_restore
+ amap -m -Q 0.1 -F 20 -A 20 -C 5000
+ retime -D -D 20000
+ &get -n
+ &st
+ &dch
+ &nf
+ &put
+ buffer -N 10
+ upsize -D 20000
(...a progress update appears here, overwriting the same line repeatedly...)
+ dnsize -D 20000
(...another progress update appears here...)
+ stime -p
WireLoad = "none" Gates = 6128 ( 7.0 %) Cap = 9.6 ff ( 2.1 %) Area = 56160.11 ( 92.2 %) Delay = 20371.09 ps ( 10.3 %)
Path 0 -- 26 : 0 1 pi A = 0.00 Df = 17.4 -10.3 ps S = 29.7 ps Cin = 0.0 ff Cout = 4.9 ff Cmax = 0.0 ff G = 0
Path 1 -- 2132 : 1 9 sky130_fd_sc_hd__buf_6 A = 11.26 Df = 147.8 -14.9 ps S = 93.4 ps Cin = 4.6 ff Cout = 42.0 ff Cmax = 785.5 ff G = 864
Path 2 -- 2140 : 4 9 sky130_fd_sc_hd__or4_4 A = 11.26 Df = 658.0 -342.8 ps S = 115.5 ps Cin = 2.4 ff Cout = 22.7 ff Cmax = 534.7 ff G = 894
Path 3 -- 2164 : 4 3 sky130_fd_sc_hd__or4_4 A = 11.26 Df =1199.8 -749.6 ps S = 91.2 ps Cin = 2.4 ff Cout = 8.7 ff Cmax = 534.7 ff G = 341
Path 4 -- 2272 : 4 3 sky130_fd_sc_hd__a22o_2 A = 10.01 Df =1454.5 -226.7 ps S = 63.2 ps Cin = 2.3 ff Cout = 8.7 ff Cmax = 301.2 ff G = 347
Path 5 -- 2298 : 5 1 sky130_fd_sc_hd__a41o_2 A = 11.26 Df =1674.1 -180.6 ps S = 39.7 ps Cin = 2.3 ff Cout = 2.5 ff Cmax = 325.0 ff G = 99
Path 6 -- 2299 : 4 4 sky130_fd_sc_hd__a211o_2 A = 10.01 Df =1960.4 -120.7 ps S = 67.1 ps Cin = 2.4 ff Cout = 10.4 ff Cmax = 325.0 ff G = 420
Path 7 -- 2339 : 4 1 sky130_fd_sc_hd__or4_4 A = 11.26 Df =2492.6 -280.5 ps S = 83.8 ps Cin = 2.4 ff Cout = 4.9 ff Cmax = 534.7 ff G = 193
Path 8 -- 2340 : 1 7 sky130_fd_sc_hd__buf_6 A = 11.26 Df =2650.0 -305.8 ps S = 91.9 ps Cin = 4.6 ff Cout = 41.2 ff Cmax = 785.5 ff G = 858
Path 9 -- 2365 : 3 7 sky130_fd_sc_hd__o21ai_4 A = 16.27 Df =2735.9 -308.2 ps S = 194.3 ps Cin = 8.8 ff Cout = 19.9 ff Cmax = 224.3 ff G = 217
Path 10 -- 2398 : 2 2 sky130_fd_sc_hd__or2_2 A = 6.26 Df =2880.9 -150.7 ps S = 55.1 ps Cin = 1.5 ff Cout = 3.1 ff Cmax = 299.4 ff G = 207
Path 11 -- 2399 : 3 2 sky130_fd_sc_hd__or3b_4 A = 11.26 Df =3239.9 -178.6 ps S = 65.8 ps Cin = 2.1 ff Cout = 4.3 ff Cmax = 469.7 ff G = 197
Path 12 -- 2428 : 3 2 sky130_fd_sc_hd__o21a_2 A = 8.76 Df =3456.1 -85.5 ps S = 55.9 ps Cin = 2.4 ff Cout = 7.5 ff Cmax = 294.8 ff G = 296
Path 13 -- 2436 : 1 10 sky130_fd_sc_hd__buf_6 A = 11.26 Df =3581.4 -78.5 ps S = 73.4 ps Cin = 4.6 ff Cout = 31.3 ff Cmax = 785.5 ff G = 646
Path 14 -- 2438 : 4 6 sky130_fd_sc_hd__or4_4 A = 11.26 Df =4013.0 -282.6 ps S = 107.2 ps Cin = 2.4 ff Cout = 17.2 ff Cmax = 534.7 ff G = 674
Path 15 -- 2571 : 4 2 sky130_fd_sc_hd__o211a_2 A = 10.01 Df =4306.7 -107.0 ps S = 102.2 ps Cin = 2.4 ff Cout = 14.2 ff Cmax = 268.3 ff G = 574
Path 16 -- 2573 : 2 2 sky130_fd_sc_hd__xnor2_2 A = 16.27 Df =4539.2 -124.3 ps S = 223.7 ps Cin = 8.5 ff Cout = 13.5 ff Cmax = 121.8 ff G = 154
Path 17 -- 2574 : 2 2 sky130_fd_sc_hd__xnor2_2 A = 16.27 Df =4756.1 -103.8 ps S = 201.2 ps Cin = 8.5 ff Cout = 11.5 ff Cmax = 121.8 ff G = 130
Path 18 -- 2577 : 2 2 sky130_fd_sc_hd__xnor2_2 A = 16.27 Df =4989.5 -113.9 ps S = 217.8 ps Cin = 8.5 ff Cout = 13.0 ff Cmax = 121.8 ff G = 148
Path 19 -- 2578 : 2 2 sky130_fd_sc_hd__xnor2_2 A = 16.27 Df =5210.2 -110.2 ps S = 224.3 ps Cin = 8.5 ff Cout = 13.5 ff Cmax = 121.8 ff G = 153
Path 20 -- 2596 : 3 2 sky130_fd_sc_hd__a21oi_2 A = 8.76 Df =5435.8 -217.7 ps S = 199.0 ps Cin = 4.6 ff Cout = 14.0 ff Cmax = 128.2 ff G = 293
Path 21 -- 2625 : 2 2 sky130_fd_sc_hd__xor2_2 A = 16.27 Df =5717.2 -131.4 ps S = 213.2 ps Cin = 8.6 ff Cout = 13.6 ff Cmax = 130.0 ff G = 153
Path 22 -- 2639 : 2 2 sky130_fd_sc_hd__xnor2_2 A = 16.27 Df =5944.8 -95.9 ps S = 220.7 ps Cin = 8.5 ff Cout = 13.2 ff Cmax = 121.8 ff G = 148
Path 23 -- 2640 : 2 2 sky130_fd_sc_hd__xor2_2 A = 16.27 Df =6123.8 -13.1 ps S = 211.5 ps Cin = 8.6 ff Cout = 13.5 ff Cmax = 130.0 ff G = 152
Path 24 -- 2641 : 2 2 sky130_fd_sc_hd__xnor2_2 A = 16.27 Df =6332.1 -4.7 ps S = 220.7 ps Cin = 8.5 ff Cout = 13.2 ff Cmax = 121.8 ff G = 148
Path 25 -- 2782 : 2 2 sky130_fd_sc_hd__xor2_2 A = 16.27 Df =6540.1 -51.4 ps S = 142.3 ps Cin = 8.6 ff Cout = 7.0 ff Cmax = 130.0 ff G = 79
Path 26 -- 2783 : 4 2 sky130_fd_sc_hd__nor4b_4 A = 23.77 Df =6831.7 -200.0 ps S = 293.4 ps Cin = 7.0 ff Cout = 13.1 ff Cmax = 113.5 ff G = 181
Path 27 -- 2784 : 2 2 sky130_fd_sc_hd__xnor2_2 A = 16.27 Df =7081.2 -173.5 ps S = 230.8 ps Cin = 8.5 ff Cout = 14.1 ff Cmax = 121.8 ff G = 159
Path 28 -- 2823 : 3 2 sky130_fd_sc_hd__o21ai_2 A = 8.76 Df =7304.4 -271.9 ps S = 199.7 ps Cin = 4.5 ff Cout = 14.0 ff Cmax = 139.2 ff G = 293
Path 29 -- 2826 : 4 2 sky130_fd_sc_hd__a22o_4 A = 17.52 Df =7467.9 -116.5 ps S = 57.7 ps Cin = 4.6 ff Cout = 13.6 ff Cmax = 556.6 ff G = 284
Path 30 -- 2887 : 4 2 sky130_fd_sc_hd__a2bb2o_4 A = 20.02 Df =7602.0 -24.6 ps S = 60.5 ps Cin = 4.6 ff Cout = 14.0 ff Cmax = 502.6 ff G = 287
Path 31 -- 2981 : 4 3 sky130_fd_sc_hd__a22oi_2 A = 12.51 Df =7798.2 -116.4 ps S = 238.1 ps Cin = 4.3 ff Cout = 13.5 ff Cmax = 170.3 ff G = 303
Path 32 -- 3068 : 4 3 sky130_fd_sc_hd__o31a_2 A = 10.01 Df =8064.8 -43.1 ps S = 95.7 ps Cin = 2.3 ff Cout = 14.7 ff Cmax = 285.7 ff G = 598
Path 33 -- 3073 : 3 1 sky130_fd_sc_hd__o21ai_2 A = 8.76 Df =8227.1 -132.0 ps S = 152.2 ps Cin = 4.5 ff Cout = 9.4 ff Cmax = 139.2 ff G = 197
Path 34 -- 3098 : 2 2 sky130_fd_sc_hd__xor2_2 A = 16.27 Df =8487.1 -200.6 ps S = 206.7 ps Cin = 8.6 ff Cout = 13.2 ff Cmax = 130.0 ff G = 147
Path 35 -- 3123 : 2 7 sky130_fd_sc_hd__xnor2_2 A = 16.27 Df =8729.0 -7.1 ps S = 331.2 ps Cin = 8.5 ff Cout = 22.8 ff Cmax = 121.8 ff G = 254
Path 36 -- 3516 : 3 3 sky130_fd_sc_hd__or3b_4 A = 11.26 Df =9130.8 -207.7 ps S = 74.1 ps Cin = 2.1 ff Cout = 8.3 ff Cmax = 469.7 ff G = 383
Path 37 -- 3586 : 3 2 sky130_fd_sc_hd__a21o_2 A = 8.76 Df =9326.8 -239.1 ps S = 37.1 ps Cin = 2.4 ff Cout = 4.0 ff Cmax = 309.5 ff G = 163
Path 38 -- 3596 : 3 3 sky130_fd_sc_hd__a21o_2 A = 8.76 Df =9546.3 -215.4 ps S = 59.3 ps Cin = 2.4 ff Cout = 9.1 ff Cmax = 309.5 ff G = 370
Path 39 -- 3632 : 2 2 sky130_fd_sc_hd__nor2b_4 A = 13.76 Df =9713.6 -31.3 ps S = 114.4 ps Cin = 5.5 ff Cout = 13.5 ff Cmax = 254.5 ff G = 235
Path 40 -- 3697 : 2 2 sky130_fd_sc_hd__xnor2_2 A = 16.27 Df =9892.3 -16.3 ps S = 184.2 ps Cin = 8.5 ff Cout = 10.1 ff Cmax = 121.8 ff G = 116
Path 41 -- 3745 : 2 1 sky130_fd_sc_hd__or2b_4 A = 11.26 Df =10157.8 -66.2 ps S = 42.1 ps Cin = 2.0 ff Cout = 2.6 ff Cmax = 515.5 ff G = 122
Path 42 -- 3746 : 3 2 sky130_fd_sc_hd__a21boi_4 A = 18.77 Df =10299.0 -10.4 ps S = 134.9 ps Cin = 6.8 ff Cout = 10.9 ff Cmax = 215.2 ff G = 154
Path 43 -- 3748 : 2 2 sky130_fd_sc_hd__xor2_2 A = 16.27 Df =10493.6 -11.5 ps S = 140.7 ps Cin = 8.6 ff Cout = 7.2 ff Cmax = 130.0 ff G = 79
Path 44 -- 3750 : 2 1 sky130_fd_sc_hd__or2_4 A = 8.76 Df =10700.2 -76.8 ps S = 42.4 ps Cin = 2.4 ff Cout = 2.6 ff Cmax = 514.5 ff G = 101
Path 45 -- 3751 : 2 2 sky130_fd_sc_hd__and2_4 A = 8.76 Df =10848.3 -101.7 ps S = 35.4 ps Cin = 2.4 ff Cout = 4.1 ff Cmax = 539.3 ff G = 162
Path 46 -- 3753 : 5 1 sky130_fd_sc_hd__a221o_2 A = 11.26 Df =11186.1 -169.8 ps S = 50.7 ps Cin = 2.3 ff Cout = 2.5 ff Cmax = 299.4 ff G = 101
Path 47 -- 3760 : 4 1 sky130_fd_sc_hd__a31o_2 A = 8.76 Df =11388.1 -228.2 ps S = 47.8 ps Cin = 2.4 ff Cout = 4.6 ff Cmax = 271.9 ff G = 186
Path 48 -- 3763 : 5 2 sky130_fd_sc_hd__a41o_4 A = 21.27 Df =11648.9 -135.5 ps S = 62.5 ps Cin = 4.3 ff Cout = 10.9 ff Cmax = 560.3 ff G = 244
Path 49 -- 3765 : 3 2 sky130_fd_sc_hd__a21bo_2 A = 10.01 Df =11882.2 -133.1 ps S = 73.3 ps Cin = 2.0 ff Cout = 10.9 ff Cmax = 288.4 ff G = 520
Path 50 -- 3767 : 3 3 sky130_fd_sc_hd__a21o_2 A = 8.76 Df =12123.8 -211.3 ps S = 83.8 ps Cin = 2.4 ff Cout = 14.3 ff Cmax = 309.5 ff G = 582
Path 51 -- 3775 : 4 4 sky130_fd_sc_hd__a211o_2 A = 10.01 Df =12449.1 -376.9 ps S = 72.0 ps Cin = 2.4 ff Cout = 12.1 ff Cmax = 325.0 ff G = 490
Path 52 -- 3777 : 5 4 sky130_fd_sc_hd__a311o_2 A = 11.26 Df =12871.0 -523.0 ps S = 82.0 ps Cin = 2.3 ff Cout = 11.6 ff Cmax = 298.5 ff G = 485
Path 53 -- 3780 : 4 3 sky130_fd_sc_hd__and4_4 A = 11.26 Df =13073.5 -432.4 ps S = 74.4 ps Cin = 2.4 ff Cout = 12.1 ff Cmax = 531.9 ff G = 488
Path 54 -- 3784 : 3 5 sky130_fd_sc_hd__o21a_2 A = 8.76 Df =13298.9 -496.3 ps S = 71.1 ps Cin = 2.4 ff Cout = 10.8 ff Cmax = 294.8 ff G = 427
Path 55 -- 3789 : 4 2 sky130_fd_sc_hd__o31a_2 A = 10.01 Df =13665.6 -671.7 ps S = 106.9 ps Cin = 2.3 ff Cout = 16.9 ff Cmax = 285.7 ff G = 699
Path 56 -- 3876 : 2 2 sky130_fd_sc_hd__xnor2_2 A = 16.27 Df =13820.3 -670.1 ps S = 143.6 ps Cin = 8.5 ff Cout = 6.5 ff Cmax = 121.8 ff G = 72
Path 57 -- 3912 : 3 2 sky130_fd_sc_hd__o21ai_2 A = 8.76 Df =13897.1 -67.7 ps S = 133.7 ps Cin = 4.5 ff Cout = 7.6 ff Cmax = 139.2 ff G = 158
Path 58 -- 3915 : 4 1 sky130_fd_sc_hd__a211o_2 A = 10.01 Df =14226.2 -248.6 ps S = 52.7 ps Cin = 2.4 ff Cout = 4.5 ff Cmax = 325.0 ff G = 183
Path 59 -- 3927 : 5 5 sky130_fd_sc_hd__a221oi_2 A = 15.01 Df =14531.5 -492.1 ps S = 272.1 ps Cin = 4.5 ff Cout = 9.0 ff Cmax = 96.1 ff G = 191
Path 60 -- 3985 : 3 3 sky130_fd_sc_hd__and3b_2 A = 10.01 Df =14790.9 -496.5 ps S = 71.6 ps Cin = 1.5 ff Cout = 8.8 ff Cmax = 309.5 ff G = 563
Path 61 -- 3986 : 4 4 sky130_fd_sc_hd__or4_4 A = 11.26 Df =15223.2 -378.1 ps S = 96.6 ps Cin = 2.4 ff Cout = 10.7 ff Cmax = 534.7 ff G = 435
Path 62 -- 4047 : 4 2 sky130_fd_sc_hd__a22o_2 A = 10.01 Df =15485.7 -195.7 ps S = 56.1 ps Cin = 2.3 ff Cout = 7.1 ff Cmax = 301.2 ff G = 290
Path 63 -- 4059 : 3 3 sky130_fd_sc_hd__a21o_2 A = 8.76 Df =15712.3 -248.6 ps S = 60.4 ps Cin = 2.4 ff Cout = 9.3 ff Cmax = 309.5 ff G = 386
Path 64 -- 4106 : 3 2 sky130_fd_sc_hd__a21o_2 A = 8.76 Df =15908.5 -201.6 ps S = 50.4 ps Cin = 2.4 ff Cout = 7.1 ff Cmax = 309.5 ff G = 289
Path 65 -- 4125 : 3 3 sky130_fd_sc_hd__a21o_2 A = 8.76 Df =16132.7 -214.2 ps S = 61.1 ps Cin = 2.4 ff Cout = 9.5 ff Cmax = 309.5 ff G = 390
Path 66 -- 4355 : 3 2 sky130_fd_sc_hd__a21o_2 A = 8.76 Df =16351.5 -229.6 ps S = 50.4 ps Cin = 2.4 ff Cout = 7.1 ff Cmax = 309.5 ff G = 289
Path 67 -- 4357 : 3 3 sky130_fd_sc_hd__a21o_2 A = 8.76 Df =16575.7 -226.0 ps S = 61.1 ps Cin = 2.4 ff Cout = 9.5 ff Cmax = 309.5 ff G = 390
Path 68 -- 4365 : 3 3 sky130_fd_sc_hd__a21o_2 A = 8.76 Df =16802.2 -228.7 ps S = 60.6 ps Cin = 2.4 ff Cout = 9.4 ff Cmax = 309.5 ff G = 386
Path 69 -- 4368 : 4 3 sky130_fd_sc_hd__a211o_2 A = 10.01 Df =17148.5 -340.7 ps S = 63.3 ps Cin = 2.4 ff Cout = 8.7 ff Cmax = 325.0 ff G = 354
Path 70 -- 4423 : 3 3 sky130_fd_sc_hd__a21o_2 A = 8.76 Df =17377.3 -331.7 ps S = 58.4 ps Cin = 2.4 ff Cout = 8.7 ff Cmax = 309.5 ff G = 354
Path 71 -- 4426 : 3 2 sky130_fd_sc_hd__a21o_2 A = 8.76 Df =17588.4 -226.2 ps S = 40.0 ps Cin = 2.4 ff Cout = 4.8 ff Cmax = 309.5 ff G = 196
Path 72 -- 4428 : 3 1 sky130_fd_sc_hd__a21o_2 A = 8.76 Df =17785.6 -291.0 ps S = 32.4 ps Cin = 2.4 ff Cout = 2.5 ff Cmax = 309.5 ff G = 100
Path 73 -- 4438 : 4 1 sky130_fd_sc_hd__a22o_2 A = 10.01 Df =18050.6 -138.2 ps S = 63.0 ps Cin = 2.3 ff Cout = 8.7 ff Cmax = 301.2 ff G = 358
Path 74 -- 4452 : 4 4 sky130_fd_sc_hd__a31oi_4 A = 21.27 Df =18237.4 -208.5 ps S = 202.8 ps Cin = 8.5 ff Cout = 17.0 ff Cmax = 211.5 ff G = 188
Path 75 -- 4649 : 4 3 sky130_fd_sc_hd__o31a_4 A = 17.52 Df =18426.6 -20.6 ps S = 64.2 ps Cin = 4.5 ff Cout = 15.3 ff Cmax = 544.7 ff G = 319
Path 76 -- 4836 : 5 4 sky130_fd_sc_hd__o311ai_4 A = 26.28 Df =18728.2 -188.9 ps S = 291.1 ps Cin = 8.5 ff Cout = 13.6 ff Cmax = 142.8 ff G = 152
Path 77 -- 5120 : 4 3 sky130_fd_sc_hd__a31o_2 A = 8.76 Df =18970.3 -163.7 ps S = 69.6 ps Cin = 2.4 ff Cout = 8.5 ff Cmax = 271.9 ff G = 348
Path 78 -- 5511 : 5 3 sky130_fd_sc_hd__a41o_2 A = 11.26 Df =19164.8 -132.7 ps S = 67.2 ps Cin = 2.3 ff Cout = 8.7 ff Cmax = 325.0 ff G = 353
Path 79 -- 5745 : 5 3 sky130_fd_sc_hd__a41o_2 A = 11.26 Df =19368.0 -80.5 ps S = 66.4 ps Cin = 2.3 ff Cout = 8.5 ff Cmax = 325.0 ff G = 350
Path 80 -- 5903 : 5 3 sky130_fd_sc_hd__a41o_2 A = 11.26 Df =19585.1 -32.5 ps S = 80.5 ps Cin = 2.3 ff Cout = 11.7 ff Cmax = 325.0 ff G = 476
Path 81 -- 5931 : 4 2 sky130_fd_sc_hd__a2bb2o_4 A = 20.02 Df =19759.0 -49.0 ps S = 41.6 ps Cin = 4.6 ff Cout = 7.2 ff Cmax = 502.6 ff G = 147
Path 82 -- 5933 : 2 1 sky130_fd_sc_hd__or2_4 A = 8.76 Df =19971.9 -167.4 ps S = 42.3 ps Cin = 2.4 ff Cout = 2.5 ff Cmax = 514.5 ff G = 100
Path 83 -- 5934 : 3 1 sky130_fd_sc_hd__and3_4 A = 11.26 Df =20142.6 -142.8 ps S = 45.2 ps Cin = 2.4 ff Cout = 4.6 ff Cmax = 532.8 ff G = 178
Path 84 -- 5935 : 4 1 sky130_fd_sc_hd__o22a_4 A = 17.52 Df =20371.1 -190.6 ps S = 112.8 ps Cin = 4.6 ff Cout = 33.4 ff Cmax = 530.1 ff G = 732
Start-point = pi025. End-point = po044.
+ print_stats -m
netlist : i/o = 148/ 151 lat = 0 nd = 6128 edge = 15370 area =56172.66 delay =90.00 lev = 90
+ write_blif /tmp/yosys-abc-SSFkB5/output.blif
I've included a copy of the ABC input files from above in this journal repo:
Each contains the following:
run.sh - Script to run yosys-abc, i.e. just: yosys-abc -s -f abc.script
input.blif - Main input file
abc.script-original - Original ABC script
abc.script - Modified ABC script we actually use, with relative dirs
stdcells.genlib - An original tmp dir inclusion
tmp/synthesis/trimmed.lib - A file normally from the run tree
tmp/synthesis/synthesis.sdc - A file normally from the run tree
I've found a case where triggering the bug (or not) can come down to something as trivial as the name of a wire. For example, see lines 162 and 163 here, which appear as follows:
162: // wire [9:0] m = hpos+vpos; assign traced_size = {m[0], heightScale[2:-7]}; // Works.
163: wire [9:0] M = hpos+vpos; assign traced_size = {M[0], heightScale[2:-7]}; // FAILS!!
The actual code seen in that branch of raybox-zero is somewhat contrived for the purposes of hunting this bug, but I have observed that line 163 in effect will lead to the failure of yosys-abc, while if 163 is commented out and 162 is uncommented and used instead, then yosys-abc will pass. The only difference here is the wire's name switches between uppercase and lowercase, and doesn't otherwise change the logic in any way.
Anyway, when I hit the bug, the output from OpenLane looks like this:
Click to show OpenLane log...
OpenLane Container (3bc9d02):/openlane$ ./flow.tcl -overwrite -design /work/src -run_path /work/runs -tag wokwi
OpenLane 3bc9d02d0b34ad032921553e512fbe4bebf1d833
All rights reserved. (c) 2020-2022 Efabless Corporation and contributors.
Available under the Apache License, version 2.0. See the LICENSE file for more details.
[INFO]: Using configuration in '../work/src/config.tcl'...
[INFO]: PDK Root: /home/zerotoasic/tt/pdk
[INFO]: Process Design Kit: sky130A
[INFO]: Standard Cell Library: sky130_fd_sc_hd
[INFO]: Optimization Standard Cell Library: sky130_fd_sc_hd
[INFO]: Run Directory: /work/runs/wokwi
[INFO]: Removing existing /work/runs/wokwi...
[INFO]: Saving runtime environment...
[INFO]: Preparing LEF files for the nom corner...
[INFO]: Preparing LEF files for the min corner...
[INFO]: Preparing LEF files for the max corner...
[INFO]: Running linter (Verilator) (log: ../work/runs/wokwi/logs/synthesis/linter.log)...
[INFO]: 0 errors found by linter
[WARNING]: 20 warnings found by linter
[STEP 1]
[INFO]: Running Synthesis (log: ../work/runs/wokwi/logs/synthesis/1-synthesis.log)...
[ERROR]: during executing yosys script /openlane/scripts/yosys/synth.tcl
[ERROR]: Log: ../work/runs/wokwi/logs/synthesis/1-synthesis.log
[ERROR]: Last 10 lines:
67. Executing ABC pass (technology mapping using ABC).
67.1. Extracting gate netlist of module `\tt_um_algofoogle_raybox_zero' to `/tmp/yosys-abc-yorMFB/input.blif'..
Extracted 18889 gates and 19039 wires to a netlist network with 148 inputs and 151 outputs.
67.1.1. Executing ABC.
sh: line 1: 4213 Aborted (core dumped) "/build/bin/yosys-abc" -s -f /tmp/yosys-abc-yorMFB/abc.script 2>&1
ERROR: ABC: execution of command ""/build/bin/yosys-abc" -s -f /tmp/yosys-abc-yorMFB/abc.script 2>&1" failed: return code 134.
child process exited abnormally
[ERROR]: Creating issue reproducible...
[INFO]: Saving runtime environment...
OpenLane TCL Issue Packager
EFABLESS CORPORATION AND ALL AUTHORS OF THE OPENLANE PROJECT SHALL NOT BE HELD
LIABLE FOR ANY LEAKS THAT MAY OCCUR TO ANY PROPRIETARY DATA AS A RESULT OF USING
THIS SCRIPT. THIS SCRIPT IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND.
BY USING THIS SCRIPT, YOU ACKNOWLEDGE THAT YOU FULLY UNDERSTAND THIS DISCLAIMER
AND ALL IT ENTAILS.
Parsing config file(s)…
Setting up /work/runs/wokwi/issue_reproducible…
Done.
[INFO]: Reproducible packaged: Please tarball and upload '../work/runs/wokwi/issue_reproducible' if you're going to submit an issue.
[ERROR]: Step 1 (synthesis) failed with error:
-code 1 -level 0 -errorcode NONE -errorinfo {
while executing
"throw_error"
(procedure "run_tcl_script" line 219)
invoked from within
"run_tcl_script -tool yosys -no_consume {*}$args"
(procedure "run_yosys_script" line 2)
invoked from within
"run_yosys_script $::env(SYNTH_SCRIPT) -indexed_log $arg_values(-indexed_log)"
(procedure "run_yosys" line 44)
invoked from within
"run_yosys -indexed_log $log"
(procedure "run_synthesis" line 13)
invoked from within
"run_synthesis"} -errorline 1
[INFO]: Saving current set of views in '../work/runs/wokwi/results/final'...
[INFO]: Generating final set of reports...
[INFO]: Created manufacturability report at '../work/runs/wokwi/reports/manufacturability.rpt'.
[INFO]: Created metrics report at '../work/runs/wokwi/reports/metrics.csv'.
[INFO]: Saving runtime environment...
[ERROR]: Flow failed.
[INFO]: The failure may have been because of the following warnings:
[WARNING]: 20 warnings found by linter
The actual logs/synthesis/1-synthesis.*
files are unhelpful: They show no additional information.
As the log suggests:
...
[ERROR]: Creating issue reproducible...
[INFO]: Saving runtime environment...
OpenLane TCL Issue Packager
...
Setting up /work/runs/wokwi/issue_reproducible…
Done.
[INFO]: Reproducible packaged: Please tarball and upload '../work/runs/wokwi/issue_reproducible' if you're going to submit an issue.
...
I've tarballed issue_reproducible
and included it in this journal repo:
- I tried adding
set ::env(SYNTH_STRATEGY) {DELAY 4}
to the end ofconfig.tcl
(it wasn't defined anywhere else), and then when I re-ran the OpenLane flow it seemed to work where it otherwise failed for line 163 (see above)... at least up until it aborts because of the (deliberately) too-small configured die-area. - I then brought back the original line I wanted in the first place (
assign traced_size = heightScale[2:-8];
), exited the docker container, and just ran the conventional TT04 build process:./tt/tt_tool.py --create-user-config && time ./tt/tt_tool.py --harden
-- and it generally worked. - As a result of working on this, I created these branches:
- raybox-zero@yosys-abc-bughunt
- tt04-raybox-zero@yosys-abc-bughunt -- uses the above as its submodule.
- ...and these should probably be deleted after a while.