Modified the foundry_install.py script to distinguish between a PDK name used in the directory path and the PDK name used as the root name for files like the magic .tech file; this arose as a consequence of IHP sometimes prefixing the PDK name with "ihp-" and sometimes not. This disambiguates the names. Also: updated the sky130 PDK magic tech file to include a GDS layer for LI layer blockage, which doesn't exist in sky130. This allows LI to be blocked when running fill generation in magic.
diff --git a/common/foundry_install.py b/common/foundry_install.py index 497a908..a72f522 100755 --- a/common/foundry_install.py +++ b/common/foundry_install.py
@@ -776,6 +776,28 @@ optionlist.remove(option) + # Once the PDK tools have been installed, check the name of the tech file + # and use this for "pdkname" because it may not be the same as the last + # last path component. + + print('Searching for magic startup script.') + magic_techfile = targetdir + mag_current + pdkname + '.magicrc' + if not os.path.isfile(magic_techfile): + magic_techdir = targetdir + mag_current + magic_techfile = glob.glob(magic_techdir + '*.magicrc') + if magic_techfile: + pdkpathname = os.path.splitext(magic_techfile)[0] + if pdkpathname != pdkpath: + print('Directory path name is not the same as the tech name') + print('Changing the tech name from ' + pdkpath + ' to ' + pdkpathname) + pdkpath = pdkpathname + else: + print('Found magic tech file at ' + magic_techfile) + else: + print('Error: No magic tech file found in ' + magic_techdir) + else: + print('Found magic tech file at ' + magic_techfile) + # Do an initial pass through all of the options and determine what is being # installed, so that we know in advance which file formats are missing and # need to be generated. @@ -1814,8 +1836,9 @@ elif not have_mag_8_2: print('The installer is not able to run magic.') else: - print("Master PDK magic startup file not found. Did you install") - print("PDK tech files before PDK vendor files?") + print("Master PDK magic startup file not found.") + print('(' + targetdir + mag_current + pdkname + '.magicrc)') + print("Did you install PDK tech files before PDK vendor files?") if have_lefanno: # LEF files were used for annotation. If "compile" or "compile-only"
diff --git a/sky130/magic/sky130.tech b/sky130/magic/sky130.tech index c11341b..15a9893 100644 --- a/sky130/magic/sky130.tech +++ b/sky130/magic/sky130.tech
@@ -1488,6 +1488,9 @@ layer FILLOBSFOM obsactive calma 22 24 + layer FILLOBSLI fillblock,obsli + calma 67 10 + layer FILLOBSM1 fillblock,obsm1 calma 62 24 @@ -2424,7 +2427,6 @@ ignore HVNTM ignore POLYMOD ignore LOWTAPDENSITY - ignore MET5BLOCK ignore OUTLINE ignore POLYCUT ignore POLYGATE @@ -3992,25 +3994,29 @@ or obspoly labels FILLOBSFOM,FILLOBSPOLY - layer obsm1 FILLOBSM1 + layer obsli LIBLOCK + and-not LI + labels LIBLOCK + + layer obsm1 FILLOBSM1,MET1BLOCK and-not MET1 - labels FILLOBSM1 + labels FILLOBSM1,MET1BLOCK - layer obsm2 FILLOBSM2 + layer obsm2 FILLOBSM2,MET2BLOCK and-not MET2 - labels FILLOBSM2 + labels FILLOBSM2,MET2BLOCK - layer obsm3 FILLOBSM3 + layer obsm3 FILLOBSM3,MET3BLOCK and-not MET3 - labels FILLOBSM3 + labels FILLOBSM3,MET3BLOCK - layer obsm4 FILLOBSM4 + layer obsm4 FILLOBSM4,MET4BLOCK and-not MET4 - labels FILLOBSM4 + labels FILLOBSM4,MET4BLOCK - layer obsm5 FILLOBSM5 + layer obsm5 FILLOBSM5,MET5BLOCK and-not MET5 - labels FILLOBSM5 + labels FILLOBSM5,MET5BLOCK # MOS Varactor @@ -4104,7 +4110,6 @@ calma POLYGATE 66 9 calma DIFFCUT 65 14 calma HVNWELLID 81 63 - calma MET5BLOCK 72 10 calma PADDIFFID 81 6 calma PADMETALID 81 8 calma PADCENTERID 81 20 @@ -4234,6 +4239,16 @@ calma MET5FILLALT 72 99 #endif + # Alternate layer purpose used for obstruction (fill block) + calma LIBLOCK 67 10 + calma MET1BLOCK 68 10 + calma MET2BLOCK 69 10 + calma MET3BLOCK 70 10 +#ifdef METAL5 + calma MET4BLOCK 71 10 + calma MET5BLOCK 72 10 +#endif + #----------------------------------------------------------------------- style rdlimport