Modified the foundry_install.py script (again) to remove the alternative version string parsing routine (which is in the module "packaging" which is not, apparently, found in all standard python distributions) and replace it once and for all with a couple of simple subroutines based on regular expressions. Also: Updated the references to capture the new commit numbers for the sky130_fd_io library (non-mask-level modifications to I/O cell layouts for improved circuit extraction) and the sky130_fd_pr library (expansion of the list of corner types defined in sky130.lib.spice to include all combinations of transistor corners (t, s, f) and resistor/capacitor corners (l, h, and nominal), submitted by Ahmed Reda).
diff --git a/common/foundry_install.py b/common/foundry_install.py index b551b40..34e3a46 100755 --- a/common/foundry_install.py +++ b/common/foundry_install.py
@@ -251,8 +251,6 @@ # %l : substitute the library name # %% : substitute the percent character verbatim -from packaging import version - #---------------------------------------------------------------------------- #---------------------------------------------------------------------------- @@ -307,6 +305,64 @@ #---------------------------------------------------------------------------- #---------------------------------------------------------------------------- +def parse_version_number(vstring): + verex1 = re.compile('[^0-9]*([0-9]+)') + verex2 = re.compile('[^0-9]*([0-9]+)[^0-9]*([0-9]+)') + verex3 = re.compile('[^0-9]*([0-9]+)[^0-9]*([0-9]+)[^0-9]*([0-9]+)') + major = 0 + minor = 0 + revision = 0 + try: + vnums = verex3.match(vstring) + except: + try: + vnums = verex2.match(vstring) + except: + try: + vnums = verex1.match(vstring) + except: + print('Error: String ' + vstring + ' cannot be parsed as ' + + 'a version number.') + else: + major = int(vnums.group(1)) + else: + major = int(vnums.group(1)) + minor = int(vnums.group(2)) + else: + major = int(vnums.group(1)) + minor = int(vnums.group(2)) + revision = int(vnums.group(3)) + + return [major, minor, revision] + +#---------------------------------------------------------------------------- +#---------------------------------------------------------------------------- + +def version_compare(vlist1, vlist2): + major1 = vlist1[0] + major2 = vlist2[0] + minor1 = vlist1[1] + minor2 = vlist2[1] + revision1 = vlist1[2] + revision2 = vlist2[2] + if major1 > major2: + return True + elif major1 < major2: + return False + else: + if minor1 > minor2: + return True + elif minor1 < minor2: + return False + else: + if revision1 > revision2: + return True + else: + return False + +#---------------------------------------------------------------------------- +#---------------------------------------------------------------------------- + def substitute(pathname, library): if library: # Do %l substitution @@ -324,7 +380,8 @@ else: for vlib in vlibs[1:]: vtest = vlib[len(vglob)-1:] - if version.parse(vtest) > version.parse(vstr): + if version_compare(parse_version_number(vtest), + parse_version_number(vstr)): vstr = vtest newpathname = re.sub('%v', vstr, newpathname)
diff --git a/gf180mcu/gf180mcu.json b/gf180mcu/gf180mcu.json index 0829555..d6d30a6 100644 --- a/gf180mcu/gf180mcu.json +++ b/gf180mcu/gf180mcu.json
@@ -89,8 +89,8 @@ "magic": "MAGIC_COMMIT" }, "reference": { - "open_pdks": "8c312fd9be7c9a9a2821c0821d1421c00e13d139", - "magic": "b7942cffe6de3bac78bef3ee745097ecd72c689f", + "open_pdks": "c10a581884a4373c1a48b18ea3fc02c19d8d5c88", + "magic": "4445663cb1b2de1eb9818cfe89f60ed7659335f3", "gf180mcu_pdk": "a897aa30369d3bcec87d9d50ce9b01f320f854ef", "gf180mcu_fd_pr": "a11222d681f2134ab28e97f97b9b99b6af188f88", "gf180mcu_fd_pv": "e9410df04da5b64a1053aa6e5180dc144b8a12a2",
diff --git a/sky130/sky130.json b/sky130/sky130.json index b69d8f9..4800903 100644 --- a/sky130/sky130.json +++ b/sky130/sky130.json
@@ -94,10 +94,10 @@ "magic": "MAGIC_COMMIT" }, "reference": { - "open_pdks": "a67574f86dc944797c17229e94fd8fc9d6fbf949", - "magic": "dc87a8c6936e89a557a3a84e6acc4c8321b9079e", - "sky130_fd_pr": "514d4dc1d67632015e1de2cb7de60e21653cd94c", - "sky130_fd_io": "d3b662d017ce4fb5d4e3c3922ac81f744111e010", + "open_pdks": "c10a581884a4373c1a48b18ea3fc02c19d8d5c88", + "magic": "4445663cb1b2de1eb9818cfe89f60ed7659335f3", + "sky130_fd_pr": "1232782c1b9fab3aacda74d67ce7c92bf7da8105", + "sky130_fd_io": "b9c10d039816c4026f9a10cf8a200b9b5caa1b63", "sky130_fd_sc_hs": "9a855e97aa75f8a14be7eadc365c28d50045d5fc", "sky130_fd_sc_ms": "26d0047c0e2dbe28fe4950f171411f6e8b3d0564", "sky130_fd_sc_ls": "8e7040bfc58a17386e3d900c0e3b9c9163545c4a",