Clean up magic config file copying. Add warning for missing files.

This commit is contained in:
Matt Guthaus 2018-10-05 08:36:12 -07:00
parent b3fa6b9d52
commit c0ffa9cc7b
3 changed files with 16 additions and 14 deletions

View File

@ -72,11 +72,10 @@ def write_netgen_script(cell_name, sp_name):
global OPTS global OPTS
if os.path.exists(OPTS.openram_tech + "/mag_lib/setup.tcl"): setup_file = OPTS.openram_tech + "/mag_lib/setup.tcl"
setup_file = OPTS.openram_tech + "/mag_lib/setup.tcl" if os.path.exists(setup_file):
# Copy setup.tcl file into temp dir # Copy setup.tcl file into temp dir
shutil.copy(OPTS.openram_tech + "/mag_lib/setup.tcl", shutil.copy(setup_file, OPTS.openram_temp)
OPTS.openram_temp)
else: else:
setup_file = 'nosetup' setup_file = 'nosetup'
@ -106,8 +105,11 @@ def run_drc(cell_name, gds_name, extract=False):
num_drc_runs += 1 num_drc_runs += 1
# Copy .magicrc file into temp dir # Copy .magicrc file into temp dir
shutil.copy(OPTS.openram_tech + "/mag_lib/.magicrc", magic_file = OPTS.openram_tech + "/mag_lib/setup.tcl"
OPTS.openram_temp) if os.path.exists(magic_file):
shutil.copy(magic_file, OPTS.openram_temp)
else:
debug.warning("Could not locate .magicrc file: {}".format(magic_file))
write_magic_script(cell_name, gds_name, extract) write_magic_script(cell_name, gds_name, extract)

View File

@ -4,10 +4,10 @@ equate class {-circuit1 nfet} {-circuit2 n}
equate class {-circuit1 pfet} {-circuit2 p} equate class {-circuit1 pfet} {-circuit2 p}
# This circuit has symmetries and needs to be flattened to resolve them # This circuit has symmetries and needs to be flattened to resolve them
# or the banks won't pass # or the banks won't pass
flatten class {-circuit1 precharge_array1} flatten class {-circuit1 precharge_array_1}
flatten class {-circuit1 precharge_array2} flatten class {-circuit1 precharge_array_2}
flatten class {-circuit1 precharge_array3} flatten class {-circuit1 precharge_array_3}
flatten class {-circuit1 precharge_array4} flatten class {-circuit1 precharge_array_4}
property {-circuit1 nfet} remove as ad ps pd property {-circuit1 nfet} remove as ad ps pd
property {-circuit1 pfet} remove as ad ps pd property {-circuit1 pfet} remove as ad ps pd
property {-circuit2 n} remove as ad ps pd property {-circuit2 n} remove as ad ps pd

View File

@ -4,10 +4,10 @@ equate class {-circuit1 nfet} {-circuit2 n}
equate class {-circuit1 pfet} {-circuit2 p} equate class {-circuit1 pfet} {-circuit2 p}
# This circuit has symmetries and needs to be flattened to resolve them # This circuit has symmetries and needs to be flattened to resolve them
# or the banks won't pass # or the banks won't pass
flatten class {-circuit1 precharge_array1} flatten class {-circuit1 precharge_array_1}
flatten class {-circuit1 precharge_array2} flatten class {-circuit1 precharge_array_2}
flatten class {-circuit1 precharge_array3} flatten class {-circuit1 precharge_array_3}
flatten class {-circuit1 precharge_array4} flatten class {-circuit1 precharge_array_4}
property {-circuit1 nfet} remove as ad ps pd property {-circuit1 nfet} remove as ad ps pd
property {-circuit1 pfet} remove as ad ps pd property {-circuit1 pfet} remove as ad ps pd
property {-circuit2 n} remove as ad ps pd property {-circuit2 n} remove as ad ps pd