Add support for PDK_ROOT in run_standard_drc.py
This script was forgotten in 76760025e18728fb9705a4b2bf10dda0513b5bdd ; the fix done here is identical to the one to check_antenna.py in the referenced commit.
diff --git a/sky130/custom/scripts/run_standard_drc.py b/sky130/custom/scripts/run_standard_drc.py
index 3cb9e7a..f1cb84f 100755
--- a/sky130/custom/scripts/run_standard_drc.py
+++ b/sky130/custom/scripts/run_standard_drc.py
@@ -111,6 +111,9 @@
elif 'PDK_PATH' in myenv:
rcpathroot = myenv['PDKPATH'] + '/libs.tech/magic'
rcfile = glob.glob(rcpathroot + '/*.magicrc')[0]
+ elif 'PDK_ROOT' in myenv and 'PDK' in myenv:
+ rcpathroot = myenv['PDK_ROOT'] + '/' + myenv['PDK'] + '/libs.tech/magic'
+ rcfile = glob.glob(rcpathroot + '/*.magicrc')[0]
else:
print('Error: Cannot get magic rcfile for the technology!')
return