From 2a27fbc98e866954da847e59b13361ca1d3de14b Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Wed, 5 Sep 2018 10:02:12 -0700 Subject: [PATCH] Fix temp directory preservation option. Make labels in freepdk45 replica bitcell lower case. --- compiler/globals.py | 18 +++--------------- compiler/router/router.py | 6 ++++-- .../freepdk45/gds_lib/replica_cell_6t.gds | Bin 20480 -> 20480 bytes 3 files changed, 7 insertions(+), 17 deletions(-) diff --git a/compiler/globals.py b/compiler/globals.py index 3bdc5f92..7a7d0098 100644 --- a/compiler/globals.py +++ b/compiler/globals.py @@ -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 @@ -330,16 +327,7 @@ def init_paths(): os.chmod(OPTS.output_path, 0o750) 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(): diff --git a/compiler/router/router.py b/compiler/router/router.py index 20b8a612..c3ce007d 100644 --- a/compiler/router/router.py +++ b/compiler/router/router.py @@ -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): diff --git a/technology/freepdk45/gds_lib/replica_cell_6t.gds b/technology/freepdk45/gds_lib/replica_cell_6t.gds index 9b301c08ae8f2b857d6cbdef1795cc73b82ea61a..1316c276cdb156fc0f599093fabe56a5310d8684 100644 GIT binary patch delta 961 zcmYLGPe>eB9G*AMj1KrKPE=0P0RjKcQx+1&b%2X5`<_+KpozH^6Q_M{w%9l1cMI=(#?k2EunFyM7k2j+2D``64s$fZ zD&%ktjjkoItWXW@po>P3d_fc8UN{Q6^)1rD>9F}!ATtT(foZ?C~^U7i7MY`jnMQTI z`byiCPcv9&=mEZTk9mDe^`tLq%=5<>!>dsZ)~Jj6Nb`SdeOQH`x`o3O$FpP%o2N*0 zisI55{F6F1Ptw1oGsnG7;{Fi*M>=<`KTHlHG*rfZnq!0Zis@d^cLN8T^yW;FsBucy$Gt*@}4eHvTGGcv|MTUA_#fOcyR2@Jn=fiH0dr zU7~u1>KWa$C+O1FbQAJ4_xwC#-e%zr?G#kcoDfCG6Dl@lOwZ2WWOUR5o^y^>z68z< zh+IWeGf>kw3{8DNw56(WRRe~~Are}1)S7e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