Fix temp directory preservation option.

Make labels in freepdk45 replica bitcell lower case.
This commit is contained in:
Matt Guthaus 2018-09-05 10:02:12 -07:00
parent 0f87ba742f
commit 2a27fbc98e
3 changed files with 7 additions and 17 deletions

View File

@ -118,9 +118,6 @@ def init_openram(config_file, is_unit_test=True):
init_paths()
# This depends on the tech, so do it after tech is loaded
init_config()
# Reset the static duplicate name checker for unit tests.
import hierarchy_design
hierarchy_design.hierarchy_design.name_map=[]
@ -257,7 +254,8 @@ def cleanup_paths():
if not OPTS.purge_temp:
debug.info(0,"Preserving temp directory: {}".format(OPTS.openram_temp))
return
if os.path.exists(OPTS.openram_temp):
elif os.path.exists(OPTS.openram_temp):
debug.info(1,"Purging temp directory: {}".format(OPTS.openram_temp))
# This annoyingly means you have to re-cd into the directory each debug iteration
#shutil.rmtree(OPTS.openram_temp, ignore_errors=True)
contents = [os.path.join(OPTS.openram_temp, i) for i in os.listdir(OPTS.openram_temp)]
@ -293,8 +291,6 @@ def setup_paths():
OPTS.openram_temp += "/"
debug.info(1, "Temporary files saved in " + OPTS.openram_temp)
cleanup_paths()
def is_exe(fpath):
@ -316,6 +312,7 @@ def init_paths():
# make the directory if it doesn't exist
try:
debug.info(1,"Creating temp directory: {}".format(OPTS.openram_temp))
os.makedirs(OPTS.openram_temp, 0o750)
except OSError as e:
if e.errno == 17: # errno.EEXIST
@ -331,15 +328,6 @@ def init_paths():
except:
debug.error("Unable to make output directory.",-1)
def init_config():
""" Initialize the SRAM configurations. """
# Create the SRAM configuration
from sram_config import sram_config
OPTS.sram_config = sram_config(OPTS.word_size,
OPTS.num_words,
OPTS.num_banks)
# imports correct technology directories for testing
def import_tech():

View File

@ -262,13 +262,15 @@ class router:
old_ur = ur
ll=ll.scale(self.track_factor)
ur=ur.scale(self.track_factor)
if ll[0]<45 and ll[0]>35 and ll[1]<46 and ll[1]>39:
if ll[0]<45 and ll[0]>35 and ll[1]<5 and ll[1]>-5:
print(ll,ur)
ll = ll.floor()
ur = ur.ceil()
if ll[0]<45 and ll[0]>35 and ll[1]<46 and ll[1]>39:
if ll[0]<45 and ll[0]>35 and ll[1]<5 and ll[1]>-5:
debug.info(0,"Converting [ {0} , {1} ]".format(old_ll,old_ur))
debug.info(0,"Converted [ {0} , {1} ]".format(ll,ur))
pin=self.convert_track_to_shape(ll)
debug.info(0,"Pin {}".format(pin))
return [ll,ur]
def convert_pin_to_tracks(self, pin):