Peter Herrmann
10/28/2023, 6:11 AM023-10-28 01:06:02 - [INFO] - {{STEP UPDATE}} Executing Check 2 of 12: Makefile
2023-10-28 01:06:02 - [INFO] - {{MAKEFILE CHECK PASSED}} Makefile valid.
2023-10-28 01:06:02 - [INFO] - {{STEP UPDATE}} Executing Check 3 of 12: Consistency
2023-10-28 01:19:00 - [INFO] - PORTS CHECK PASSED: Netlist user_project_wrapper ports match the golden wrapper ports
2023-10-28 01:19:00 - [INFO] - COMPLEXITY CHECK PASSED: Netlist user_project_wrapper contains at least 1 instances (309658 instances).
2023-10-28 01:19:00 - [INFO] - MODELING CHECK PASSED: Netlist user_project_wrapper is structural.
2023-10-28 01:19:00 - [INFO] - LAYOUT CHECK PASSED: The GDS layout for user_project_wrapper matches the provided structural netlist.
2023-10-28 01:19:01 - [INFO] - POWER CONNECTIONS CHECK PASSED: All instances in user_project_wrapper are connected to power
2023-10-28 01:19:01 - [INFO] - PORT TYPES CHECK PASSED: Netlist user_project_wrapper port types match the golden wrapper port types.
2023-10-28 01:19:01 - [INFO] - {{NETLIST CONSISTENCY CHECK PASSED}} user_project_wrapper netlist passed all consistency checks.
2023-10-28 01:19:01 - [INFO] - {{CONSISTENCY CHECK PASSED}} The user netlist and the top netlist are valid.
2023-10-28 01:19:01 - [INFO] - {{STEP UPDATE}} Executing Check 4 of 12: XOR
2023-10-28 01:19:52 - [INFO] - {{XOR CHECK UPDATE}} Total XOR differences: 0, for more details view /home/prherrma/runners/r0/_work/tapeout-ci-2311/tapeout-ci-2311/mpw_precheck_result/outputs/user_project_wrapper.xor.gds
2023-10-28 01:19:52 - [INFO] - {{XOR CHECK PASSED}} The GDS file has no XOR violations.
2023-10-28 01:19:52 - [INFO] - {{STEP UPDATE}} Executing Check 5 of 12: Magic DRC
Mitch Bailey
10/28/2023, 6:20 AMMitch Bailey
10/28/2023, 6:23 AM$PDK_ROOT/$PDK/libs.ref/sky130_sram_macros
. Are you using custom sram configurations?Mitch Bailey
10/28/2023, 6:28 AMmpw_precheck/checks/drc_checks/magic/magic_gds_drc_check.py
Peter Herrmann
10/28/2023, 6:34 AMPeter Herrmann
10/28/2023, 6:35 AM"VERILOG_INCLUDE_DIRS": ["dir::../../openlane/macros"],
"VERILOG_FILES_BLACKBOX": ["dir::../../openlane/macros/sky130_sram_2kbyte_1rw1r_32x512_8.v"],
"EXTRA_LEFS": ["dir::../../openlane/macros/sky130_sram_2kbyte_1rw1r_32x512_8.lef"],
"EXTRA_LIBS": ["dir::../../openlane/macros/sky130_sram_2kbyte_1rw1r_32x512_8_TT_1p8V_25C.lib"],
"EXTRA_GDS_FILES": ["dir::../../openlane/macros/sky130_sram_2kbyte_1rw1r_32x512_8.gds"],
Mitch Bailey
10/28/2023, 6:51 AM/openlane/pdks/sky130A/libs.ref/sky130_sram_macros
to access the data from the pdk directly without having to copy everything to your directory. (or sky130B if that’s what you’re using.)
Looks like you might also be able to use this whether or not you’re using docker.
pdk_dir::libs.ref/sky130_sram_macros
Peter Herrmann
10/28/2023, 2:37 PMWarning: : Timing constructs found in the RTL. Please remove them or wrap them around an ifdef. It heavily unrecommended to rely on timing constructs for synthesis.
Warning: : 5 errors found by linter
Even if I were to suppress linter errors, STA fails with the following:
Error while reading /home/prherrma/runners/r0/_work/pdk/sky130A/libs.ref/sky130_sram_macros/verilog/sky130_sram_2kbyte_1rw1r_32x512_8.v:
Make sure that this a gate-level netlist not an RTL file
You can add the following comment '/// sta-blackbox' in the file to skip it and blackbox the modules inside if needed.
I could easily get around this by modifying the blackbox file (adding /// sta-blackbox
), but I don't think I can get away with modifying the PDK version. Is it necessary to use the PDK version of the verilog blackbox to get the SRAM abstraction for Magic DRC or are the .def, .lef, and .gds sufficent? I may also just be looking at this the completely wrong way.Mitch Bailey
10/28/2023, 3:04 PMVERILOG_FILES_BLACKBOX
in your config.json
file.Peter Herrmann
10/28/2023, 3:08 PM/// sta-blackbox
comment in the file.
Kind of a catch-22 between STA failing because this flag isn't in the PDK verilog file, and the DRC hanging because I'm not using the PDK verilog file, and I don't see how to get around it.Peter Herrmann
10/29/2023, 7:01 AMconfigs.json
:
"VERILOG_FILES_BLACKBOX": "pdk_dir::libs.ref/sky130_sram_macros/verilog/sky130_sram_2kbyte_1rw1r_32x512_8.v",
"EXTRA_LEFS": "pdk_dir::libs.ref/sky130_sram_macros/lef/sky130_sram_2kbyte_1rw1r_32x512_8.lef",
"EXTRA_LIBS": "pdk_dir::libs.ref/sky130_sram_macros/lib/sky130_sram_2kbyte_1rw1r_32x512_8_TT_1p8V_25C.lib",
"EXTRA_GDS_FILES": "pdk_dir::libs.ref/sky130_sram_macros/gds/sky130_sram_2kbyte_1rw1r_32x512_8.gds",
Then STA fails with:
Make sure that this a gate-level netlist not an RTL file
You can add the following comment '/// sta-blackbox' in the file to skip it and blackbox the modules inside if needed.
If I add /// sta-blackbox
as the error message suggests, then the flow completes, but it hangs forever during Magic DRC check for the MPW precheck.Mitch Bailey
10/29/2023, 7:09 AMprecheck/<tag>/logs/magic_drc_check.log
file?Peter Herrmann
10/30/2023, 1:54 AMMitch Bailey
10/30/2023, 3:10 AMmpw_precheck/checks/drc_checks/magic/magic_drc_check.tcl
if { $HAS_SRAM } {
gds noduplicates yes
puts "Detected an SRAM module"
foreach x $SRAM_MODULES {
puts "Pre-loading a maglef of the SRAM block: ${x}"
load $PDK_PATH/libs.ref/sky130_sram_macros/maglef/${x}.mag
}
}
gds read $GDS_UT_PATH
So there’s an Detected an SRAM module
message in your log, but no Pre-loading a maglef…
messages.Mitch Bailey
10/30/2023, 3:11 AMPeter Herrmann
10/30/2023, 3:11 AMPeter Herrmann
10/30/2023, 9:27 PMmpw_precheck/checks/drc_checks/magic/magic_drc_check.tcl
in the runner's local code). After 2 hours the Magic DRC check is using 150 GB of RAM, and I don't see "Pre-loading a maglef of the SRAM block:" in the log.Peter Herrmann
10/30/2023, 9:57 PM/home/prherrma/runners/r1/_work/tapeout-ci-2311/tapeout-ci-2311/mpw_precheck/checks/drc_checks/magic/magic_drc_check.tcl
)Mitch Bailey
10/30/2023, 11:25 PMputs "Detected an SRAM module $SRAM_MODULES"
Peter Herrmann
10/31/2023, 1:43 AMputs "Detected an SRAM module: $SRAM_MODULES"
, I just get the following:
Loading "/home/prherrma/runners/r0/_work/tapeout-ci-2311/tapeout-ci-2311/mpw_precheck/checks/drc_checks/magic/magic_drc_check.tcl" from command line.
Detected an SRAM module:
Warning: Calma reading is not undoable! I hope that's OK.
So it looks like HAS_SRAM
is set but somehow SRAM_MODULES
is empty.Mitch Bailey
10/31/2023, 2:04 AMPDK_ROOT
, PDK
and PDKPATH
variables?Mitch Bailey
10/31/2023, 2:09 AMchecks/drc_checks/magic/magic_gds_drc_check.py
+++ b/checks/drc_checks/magic/magic_gds_drc_check.py
@@ -60,11 +60,14 @@ def magic_gds_drc_check(gds_ut_path, design_name, pdk_path, output_directory):
sram_maglef_files_generator = Path(pdk_path / 'libs.ref/sky130_sram_macros/maglef').glob('*.mag')
for installed_sram in sram_maglef_files_generator:
installed_sram_modules_names.append(installed_sram.stem)
+ print(f"DEBUG: generator {sram_maglef_files_generator}")
+ print(f"DEBUG: installed sram {installed_sram_modules_names}")
sram_modules_in_gds = []
for sram in installed_sram_modules_names:
if check_if_binary_has(sram, gds_ut_path):
sram_modules_in_gds.append(sram) # only the name of the module
+ print(f"DEBUG: detected sram {sram_modules_in_gds}")
magicrc_file_path = parent_directory.parent.parent / 'tech-files' / 'sky130A.magicrc'
magic_drc_tcl_path = parent_directory / 'magic_drc_check.tcl'
design_magic_drc_mag_file_path = outputs_directory / f"{design_name}.magic.drc.mag"
I suspect it might be a missing PDKPATH
variable, but if it’s set, can you add the debugging statements above and share the results?Peter Herrmann
10/31/2023, 2:28 AMPDK_ROOT: /home/prherrma/runners/r1/_work/pdk
PDK: sky130A
PDKPATH: /home/prherrma/runners/r1/_work/pdk/sky130A
Doing a run with those print debugs nowMitch Bailey
10/31/2023, 2:38 AM$PDK_ROOT/$PDK/libs.ref/sky130_sram_macros
?Peter Herrmann
10/31/2023, 2:40 AMroot@build_server:/home/prherrma/runners/r1/_work/pdk/sky130A# tree -f | grep "sky130_sram_2kbyte_1rw1r_32x512_8"
│ │ ├── ./libs.ref/sky130_sram_macros/gds/sky130_sram_2kbyte_1rw1r_32x512_8.gds
│ │ ├── ./libs.ref/sky130_sram_macros/lef/sky130_sram_2kbyte_1rw1r_32x512_8.lef
│ │ ├── ./libs.ref/sky130_sram_macros/lib/sky130_sram_2kbyte_1rw1r_32x512_8_TT_1p8V_25C.lib
│ │ ├── ./libs.ref/sky130_sram_macros/spice/sky130_sram_2kbyte_1rw1r_32x512_8.spice
│ ├── ./libs.ref/sky130_sram_macros/verilog/sky130_sram_2kbyte_1rw1r_32x512_8.v
Peter Herrmann
10/31/2023, 4:07 AMDEBUG: generator <generator object Path.glob at 0x7f22db920040>
DEBUG: installed sram []
DEBUG: detected sram []
Mitch Bailey
10/31/2023, 4:21 AMDEBUG: generator <generator object Path.glob at 0x7fd37ab11930>
DEBUG: installed sram ['sky130_sram_2kbyte_1rw1r_32x512_8', 'sky130_sram_1kbyte_1rw1r_8x1024_8', 'sky130_sram_1kbyte_1rw1r_32x256_8', 'sram_1rw1r_32_256_8_sky130']
DEBUG: detected sram ['sky130_sram_2kbyte_1rw1r_32x512_8']
So this is where the problem is. Now we just need to figure out why it’s not finding the maglef directory.
Does
ls $PDK_ROOT/$PDK/libs.ref/sky130_sram_macros/maglef/*.mag
returns this?
<PDK_ROOT>/sky130A/libs.ref/sky130_sram_macros/maglef/sky130_sram_1kbyte_1rw1r_32x256_8.mag
<PDK_ROOT>/sky130A/libs.ref/sky130_sram_macros/maglef/sky130_sram_1kbyte_1rw1r_8x1024_8.mag
<PDK_ROOT>/sky130A/libs.ref/sky130_sram_macros/maglef/sky130_sram_2kbyte_1rw1r_32x512_8.mag
<PDK_ROOT>/sky130A/libs.ref/sky130_sram_macros/maglef/sram_1rw1r_32_256_8_sky130.mag
Mitch Bailey
10/31/2023, 4:22 AMmaglef
directory.Peter Herrmann
10/31/2023, 4:23 AM# ls
gds lef lib spice verilog
Mitch Bailey
10/31/2023, 4:24 AMvolare ls
Or are you not using volare?Peter Herrmann
10/31/2023, 4:39 AMvolare-0.13.0
, as best I can tell.
pdk: ["sky130A"]
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Export Environment Variables
run: |
export WORK_DIR=${GITHUB_WORKSPACE}/../..
echo "PDK_ROOT=${WORK_DIR}/pdk" >> $GITHUB_ENV
echo "PDK=${{ matrix.pdk }}" >> $GITHUB_ENV
echo "PDKPATH=${WORK_DIR}/pdk/${{ matrix.pdk }}" >> $GITHUB_ENV
echo "OPENLANE_ROOT=${WORK_DIR}/caravel_user_project/openlane" >> $GITHUB_ENV
- name: Install Caravel
run: |
make install
- name: Setup Openlane
run: |
make openlane
- name: Build PDK
run: |
make pdk-with-volare
Without the sky130A
symlink, the paths are:
./pdk/volare/sky130/versions/78b7bc32ddb4b6f14f76883c2e2dc5b5de9d1cbc/sky130A/libs.ref/sky130_sram_macros/gds/sky130_sram_2kbyte_1rw1r_32x512_8.gds
./pdk/volare/sky130/versions/78b7bc32ddb4b6f14f76883c2e2dc5b5de9d1cbc/sky130A/libs.ref/sky130_sram_macros/lef/sky130_sram_2kbyte_1rw1r_32x512_8.lef
./pdk/volare/sky130/versions/78b7bc32ddb4b6f14f76883c2e2dc5b5de9d1cbc/sky130A/libs.ref/sky130_sram_macros/lib/sky130_sram_2kbyte_1rw1r_32x512_8_TT_1p8V_25C.lib
./pdk/volare/sky130/versions/78b7bc32ddb4b6f14f76883c2e2dc5b5de9d1cbc/sky130A/libs.ref/sky130_sram_macros/spice/sky130_sram_2kbyte_1rw1r_32x512_8.spice
./pdk/volare/sky130/versions/78b7bc32ddb4b6f14f76883c2e2dc5b5de9d1cbc/sky130A/libs.ref/sky130_sram_macros/verilog/sky130_sram_2kbyte_1rw1r_32x512_8.v
Peter Herrmann
10/31/2023, 5:09 AMifeq ($(PDK),sky130A)
SKYWATER_COMMIT=f70d8ca46961ff92719d8870a18a076370b85f6c
export OPEN_PDKS_COMMIT?=78b7bc32ddb4b6f14f76883c2e2dc5b5de9d1cbc
export OPENLANE_TAG?=2023.07.19
MPW_TAG ?= mpw-9e
I'll update this to OPEN_PDKS_COMMIT?=559a117b163cef2f920f33f30f6f690aa0b47e4c
and report backPeter Herrmann
10/31/2023, 6:06 AMDetected an SRAM module: sky130_sram_2kbyte_1rw1r_32x512_8
Pre-loading a maglef of the SRAM block: sky130_sram_2kbyte_1rw1r_32x512_8
Cell sky130_sram_2kbyte_1rw1r_32x512_8 read from path /home/prherrma/runners/r3/_work/pdk/sky130A/libs.ref/sky130_sram_macros/maglef
DRC check completed!Peter Herrmann
10/31/2023, 6:06 AMMitch Bailey
10/31/2023, 6:07 AM