OpenROAD-flow-scripts icon indicating copy to clipboard operation
OpenROAD-flow-scripts copied to clipboard

Pass multiple lib files to ABC

Open rovinski opened this issue 1 year ago • 2 comments

Yosys allows for passing though multiple .lib files to ABC since version 0.41. Therefore, external liberty merging is no longer required in any part of the flow. This PR removes liberty merging and updates variable names

  • Change DONT_USE_* variables to PROCESSED_* variables to better reflect their meaning (we stopped modifying dont_use properties in lib files since #1813)
  • Remove the mergeLib rule in Makefile since there are no more users of it
  • Pass multiple libs into the abc options
  • Add a default DFF_LIB_FILE for asap7 because it appears that it was always supposed to have one, but it instead relied on the FF files being merged into the standard cell files

If/when dfflibmap supports reading multiple lib files, we can completely remove DFF_LIB_FILE and PROCESSED_SC_LIB variables. Restructure may lose some support but the underlying abc version would just have to be updated.

rovinski avatar Jul 13 '24 22:07 rovinski

To see what is going on with the failures in projects with BLOCKS, run:

Run 'nuke' here so that submacros are erased too just to run a full test:

make nuke

Now build without the YOSYS_FLAGS that hide the error message we saw in CI:

make DESIGN_CONFIG=designs/asap7/aes-block/config.mk YOSYS_FLAGS= synth

Output:

BC: execution of command ""/home/oyvind/OpenROAD-flow-scripts/tools/install/yosys/bin/yosys-abc" -s -f /tmp/yosys-abc-ymYdUm/abc.script 2>&1" failed: return code 134.

Re-run that last command:

"/home/oyvind/OpenROAD-flow-scripts/tools/install/yosys/bin/yosys-abc" -s -f /tmp/yosys-abc-ymYdUm/abc.script

Output:

[deleted]
yosys-abc: /home/oyvind/OpenROAD-flow-scripts/tools/yosys/abc/src/misc/vec/vecStr.h:356: char abc::Vec_StrEntry(Vec_Str_t *, int): Assertion `i >= 0 && i < p->nSize' failed.
Aborted (core dumped)
cd flow
$ ../tools/install/yosys/bin/yosys -version
Yosys 0.43 (git sha1 ead4718e5, clang++ 16.0.6 -fPIC -Os)
$ ../tools/install/yosys/bin/yosys-abc
UC Berkeley, ABC 1.01 (compiled Jul 14 2024 13:19:17)

oharboe avatar Jul 15 '24 06:07 oharboe

@rovinski Filed https://github.com/berkeley-abc/abc/issues/306

oharboe avatar Jul 15 '24 07:07 oharboe

@rovinski do you plan to continue with this or close?

maliberty avatar Feb 18 '25 02:02 maliberty

I forgot this was open. I think it would be best to close because several things have changed with Yosys since then (dont use lists for several commands, new commands, etc.). If someone wants to investigate, they are welcome.

rovinski avatar Feb 18 '25 08:02 rovinski