-
Notifications
You must be signed in to change notification settings - Fork 295
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
Flow: Use Yosys/abc native functions for dont_use #1807
base: master
Are you sure you want to change the base?
Conversation
Ready for review? |
Not yet, ASAP7 needs fixing |
I went down a bit of a rabbit hole. It appears that But, there is also a step which does a merging of the liberty files. I wondered if this step is still required, and as far as I can tell it is. The main step that requires all the
abc does read the ASAP7 BUFINV liberty, but it wasn't last, and it complains about all the other libraries not having a buffer. Weirdly enough, it looks like abc supports specifically 1-2 lib files.
But if I try using any more than 2 files it prints the usage message instead. So the conclusion is that while we can eliminate modifying the It will have to stay this way until abc adds support for reading >2 liberty files. It is also problematic that yosys allows passing of multiple liberty files to abc because it is very misleading. |
@QuantamHD perhaps you can ask Alan about this abc behavior. |
5e6f066
to
65cdeba
Compare
65cdeba
to
aac2774
Compare
* Change the Makefile target for `DONT_USE_LIBS` to `DECOMPRESSED_LIBS` * Removes the call to markDontUse.py, replaces it with either gunzip or ln * Switch yosys/abc to use the "dont use" flags available * Switch all uses of `DONT_USE_SC_LIB` to `DECOMPRESSED_SC_LIB` * Add missing `DFF_LIB_FILE` var to asap7 Signed-off-by: Austin Rovinski <[email protected]>
48f8a68
to
9cf7077
Compare
$(DECOMPRESSED_LIBS): $$(filter %$$(@F) %$$(@F).gz,$(LIB_FILES)) | ||
mkdir -p $(OBJECTS_DIR)/lib | ||
if [[ $^ == *.gz ]]; then \ | ||
gunzip -c $^ > $@; \ | ||
else \ | ||
ln -s $$(realpath --relative-to=$(dir $@) $^) $@; \ | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is one additional issue here.
You still need to use the mark don't use script to ensure the yosys call to map dffs doesn't use any FFs that are marked as don't use.
Mark don't use also does some additional cleanup which has caused ABC to crash before on other PDKs.
In order to actually get rid of this, you will need:
- yosys support for adding don't use to the dff call in that script (otherwise it's a loss of functionality).
- abc and yosys some improvements to their liberty parsers to not choke on pdks. https://github.com/siliconcompiler/siliconcompiler/blob/55d8ff05d42f55ac45970641a51f0817a9918b3f/siliconcompiler/tools/yosys/prepareLib.py#L43 https://github.com/siliconcompiler/siliconcompiler/blob/55d8ff05d42f55ac45970641a51f0817a9918b3f/siliconcompiler/tools/yosys/prepareLib.py#L51 https://github.com/siliconcompiler/siliconcompiler/blob/55d8ff05d42f55ac45970641a51f0817a9918b3f/siliconcompiler/tools/yosys/prepareLib.py#L58
@@ -53,7 +53,7 @@ if {[info exist ::env(LATCH_MAP_FILE)]} { | |||
if {[info exist ::env(DFF_LIB_FILE)]} { | |||
dfflibmap -liberty $::env(DFF_LIB_FILE) | |||
} else { | |||
dfflibmap -liberty $::env(DONT_USE_SC_LIB) | |||
dfflibmap -liberty $::env(DECOMPRESSED_SC_LIB) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs dont_use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opened YosysHQ/yosys#4219 to fix, but it may take a bit to get approved then upstreamed.
I opened YosysHQ/yosys#4219 to fix the dont_use issue with I also see an easy path to supporting multiple libs in |
I think for right now because of everything @gadfort mentioned I am going to revert this PR to only adding the |
I've decided to break this PR down into smaller pieces and only merge the ones that make sense. |
DONT_USE_LIBS
toDECOMPRESSED_LIBS
DONT_USE_SC_LIB
toSC_LIB
DFF_LIB_FILE
var to asap7Closes #1502