-
Notifications
You must be signed in to change notification settings - Fork 329
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
Full-chip STA (make caravel-sta
) fails due to changed decap_12 cell references
#377
Comments
Steps I took to recreate this issue: # Start clean:
unset OPENLANE_IMAGE_NAME OPENLANE_RUN_TAG OPENLANE_ROOT OPENLANE_TAG PDK_ROOT PDK MCW_ROOT
# Clone repo and check tag:
git clone --depth=1 https://github.com/efabless/caravel_user_project CUP-decap-test
cd CUP-decap-test
egrep 'MPW_TAG.*2024' Makefile
# => MPW_TAG ?= 2024.09.12-1
git log
# => 5020a223187c1693d5e5dd121e65ab7f6b770620, tags: 2024.09.13-1 and 2024.09.12-1
# Set everything up, and check tags:
make setup
cd caravel; git log; cd ..
# => a317f6d94d117702034babd0f6900395adbce85f, tags: 2024.09.13-1 and 2024.09.12-1
cd mgmt_core_wrapper; git log; cd ..
# => 503eda0790085712ffef7f4ad8934c7daed3237f, tags: mpw-9k/j/i/h, 2024.09.13-1, 2024.09.12-1, 2024.09.03-1
cd dependencies/openlane_src; git log; cd -
# => 30ee1388932eb55a89ad84ee43997bfe3a386421, tag: 2023.07.19-1
cd dependencies/timing-scripts; git log -1; cd -
# => 5b5dab63a257849dbb31881bec6f45439b6bdecb from 2023-10-19. MANY tags, including 2024.09.13-1, 2024.09.12-1 I then included these lines in the "RUN_KLAYOUT_DRC": 0,
"RUN_KLAYOUT_XOR": 0,
"RUN_MAGIC_DRC": 0,
"ROUTING_CORES": 16,
"DECAP_CELL": "sky130_fd_sc_hd__decap_3",
"FILL_CELL": "sky130_fd_sc_hd__fill_2 sky130_fd_sc_hd__fill_1", I also edited Next... # Do hardens:
make user_proj_example
make user_project_wrapper
# Run full-chip STA steps:
make extract-parasitics
make create-spef-mapping
make caravel-sta The last
In this case, the file affected is https://github.com/efabless/caravel-lite/blob/main/verilog/gl/housekeeping_alt.v, but there are others that will come up. |
I did the following to work on a fix for this... TL;DR: I did the following:
Detailed description of what I did...I forked https://github.com/efabless/caravel as https://github.com/amm-efabless/caravel -- NOTE: caravel-lite is generated from caravel, so I decided to go for the source. I then went into my # Throw away old caravel-lite:
rm -rf caravel
# Clone my fork of the full caravel into CUP-decap-test, instead (warning: 17 GB):
git clone [email protected]:amm-efabless/caravel.git caravel
# Try running again to verify full-chip STA still breaks in the same way:
make caravel-sta Now find any GL files that are using array instances by doing
Across the 4 files, we see:
For each of the 4 files in turn:
#!/bin/bash
gnd="${gnd:-VGND}" # Default to VGND
pwr="${pwr:-VPWR}" # Default to VPWR
for i in $(seq -f "%06g" 0 $1); do
cat <<EOH
sky130_ef_sc_hd__decap_12 EF_decap12_$i (.VGND($gnd),
.VNB($gnd),
.VPB($pwr),
.VPWR($pwr));
EOH
done
for i in $(seq -f "%06g" 0 $2); do
cat <<EOH
sky130_ef_sc_hd__fill_4 EF_fill4_$i (.VGND($gnd),
.VNB($gnd),
.VPB($pwr),
.VPWR($pwr));
EOH
done
for i in $(seq -f "%06g" 0 $3); do
cat <<EOH
sky130_ef_sc_hd__fill_8 EF_fill8_$i (.VGND($gnd),
.VNB($gnd),
.VPB($pwr),
.VPWR($pwr));
EOH
done
echo "endmodule" In particular, I ran: pwr=VPWR gnd=VGND ./recap.sh 2308 768 768 >> verilog/gl/housekeeping_alt.v
pwr=VPWR gnd=VGND ./recap.sh 1815 604 604 >> verilog/gl/housekeeping.v
pwr=vccd gnd=vssd ./recap.sh 53703 53702 53702 >> verilog/gl/caravan_core.v
pwr=vccd gnd=vssd ./recap.sh 65364 57192 57192 >> verilog/gl/caravel_core.v I then manually checked each file to make sure they seemed valid. I went back up a directory level into my CUP-decap-test repo and ran There are no errors now, and the full-chip STA results are as expected. I committed the changes in 'caravel' and pushed to my fork: amm-efabless/caravel@324aa7a |
With tag 2024.09.12-1 (which incidentally, at the time of writing, is the same commit as the more-recent 2024.09.13-1), you will get this error if you try to run full-chip STA (i.e. the final
make caravel-sta
step):This occurs since commit efabless/caravel-lite@25a2260 where individual decap_12 cell instances were removed, and Verilog "arrayed instances" were used instead, and thus this sort of pattern was replaced:
...and this sort of pattern is what took its place:
Note the
[2308:0]
. While this is valid Verilog, the tools (which?) don't support it in this format.There are a few caravel & caravel-lite files that are affected by this.
I was able to work around this (for the time being) by just using an older tag when doing
make setup
for my caravel_user_project, i.e.:The text was updated successfully, but these errors were encountered: