From 73343aed18f94a76f7d58fbd534397b5e3adc03a Mon Sep 17 00:00:00 2001 From: jeffdi Date: Wed, 1 Dec 2021 21:59:03 -0800 Subject: [PATCH] correcting magicrc file and pdkpath issues --- Makefile | 2 +- scripts/compositor.py | 8 ++++---- scripts/generate_fill.py | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index f2ad340c..5ef8eee4 100644 --- a/Makefile +++ b/Makefile @@ -577,7 +577,7 @@ endif __generate_fill: @mkdir -p ./signoff/build - #@cp -r $(CARAVEL_ROOT)/mag/.magicrc $(shell pwd)/mag + @cp -r $(CARAVEL_ROOT)/mag/.magicrc $(shell pwd)/mag python3 $(CARAVEL_ROOT)/scripts/generate_fill.py $(USER_ID) $(PROJECT) $(shell pwd) -dist 2>&1 | tee ./signoff/build/generate_fill.out #python3 $(CARAVEL_ROOT)/scripts/generate_fill.py $(USER_ID) $(PROJECT) $(shell pwd) -keep 2>&1 | tee ./signoff/build/generate_fill.out diff --git a/scripts/compositor.py b/scripts/compositor.py index 7fee2fac..c5c01398 100755 --- a/scripts/compositor.py +++ b/scripts/compositor.py @@ -147,9 +147,9 @@ if __name__ == '__main__': keepmode = True magpath = mag_dir_path - # rcfile = magpath + '/.magicrc' - pdk_root = os.getenv("PDK_ROOT") - rcfile = pdk_root + '/sky130A/libs.tech/magic/sky130A.magicrc' + rcfile = magpath + '/.magicrc' + # pdk_root = os.getenv("PDK_ROOT") + # rcfile = pdk_root + '/sky130A/libs.tech/magic/sky130A.magicrc' gdspath = gds_dir_path @@ -218,7 +218,7 @@ if __name__ == '__main__': print('Building final GDS file ' + project_with_id + '.gds', flush=True) - mproc = subprocess.run(['PDKPATH='+pdk_root+'/sky130A', 'magic', '-dnull', '-noconsole', + mproc = subprocess.run(['magic', '-dnull', '-noconsole', '-rcfile', rcfile, user_project_path + '/mag/compose_final.tcl'], stdin = subprocess.DEVNULL, stdout = subprocess.PIPE, diff --git a/scripts/generate_fill.py b/scripts/generate_fill.py index 3dee997a..2b0db8ef 100755 --- a/scripts/generate_fill.py +++ b/scripts/generate_fill.py @@ -54,7 +54,7 @@ def makegds(file): myenv = os.environ.copy() myenv['MAGTYPE'] = 'mag' - mproc = subprocess.run(['PDKPATH='+pdk_root+'/sky130A','magic', '-dnull', '-noconsole', + mproc = subprocess.run(['magic', '-dnull', '-noconsole', '-rcfile', rcfile, magpath + '/generate_fill_dist.tcl', filename], stdin = subprocess.DEVNULL, @@ -153,9 +153,9 @@ if __name__ == '__main__': distmode = True magpath = user_project_path + '/mag' - # rcfile = magpath + '/.magicrc' - pdk_root = os.getenv("PDK_ROOT") - rcfile = pdk_root + '/sky130A/libs.tech/magic/sky130A.magicrc' + rcfile = magpath + '/.magicrc' + # pdk_root = os.getenv("PDK_ROOT") + # rcfile = pdk_root + '/sky130A/libs.tech/magic/sky130A.magicrc' if not os.path.isfile(rcfile): rcfile = None @@ -343,7 +343,7 @@ if __name__ == '__main__': # print('This script will generate file ' + project_with_id + '_fill_pattern.gds') print('This script will generate files ' + project_with_id + '_fill_pattern_x_y.gds') print('Now generating fill patterns. This may take. . . quite. . . a while.', flush=True) - mproc = subprocess.run(['PDKPATH='+pdk_root+'/sky130A','magic', '-dnull', '-noconsole', + mproc = subprocess.run(['magic', '-dnull', '-noconsole', '-rcfile', rcfile, magpath + '/generate_fill.tcl'], stdin = subprocess.DEVNULL, stdout = subprocess.PIPE, @@ -377,7 +377,7 @@ if __name__ == '__main__': for file in magfiles: os.remove(file) - mproc = subprocess.run(['PDKPATH='+pdk_root+'/sky130A','magic', '-dnull', '-noconsole', + mproc = subprocess.run(['magic', '-dnull', '-noconsole', '-rcfile', rcfile, magpath + '/generate_fill_final.tcl'], stdin = subprocess.DEVNULL, stdout = subprocess.PIPE,