From 49fffcbc921a4c852cf7e363279cdc6f34f16d35 Mon Sep 17 00:00:00 2001 From: jsowash Date: Thu, 8 Aug 2019 15:49:23 -0700 Subject: [PATCH] Added way to determine length of en pin with wmask in write_driver_array and shortened en to width of driver. --- compiler/modules/write_driver_array.py | 18 ++++++++++++------ .../tests/10_write_driver_array_wmask_test.py | 8 ++++++-- .../scn4m_subm/gds_lib/write_driver.gds | Bin 10204 -> 10204 bytes .../scn4m_subm/mag_lib/write_driver.mag | 6 +++--- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/compiler/modules/write_driver_array.py b/compiler/modules/write_driver_array.py index 64b836ba..7f7aa00a 100644 --- a/compiler/modules/write_driver_array.py +++ b/compiler/modules/write_driver_array.py @@ -107,12 +107,12 @@ class write_driver_array(design.design): def place_write_array(self): if self.bitcell.width > self.driver.width: - driver_spacing = self.bitcell.width + self.driver_spacing = self.bitcell.width else: - driver_spacing = self.driver.width + self.driver_spacing = self.driver.width for i in range(0,self.columns,self.words_per_row): index = int(i/self.words_per_row) - base = vector(i * driver_spacing, 0) + base = vector(i * self.driver_spacing, 0) self.driver_insts[index].place(base) @@ -151,12 +151,18 @@ class write_driver_array(design.design): if self.write_size is not None: for bit in range(self.num_wmasks): en_pin = self.driver_insts[bit*self.write_size].get_pin("en") - # modifier to stretch enable pin for column mux - modifier = (self.words_per_row-1) + 0.65 + # Determine width of wmask modified en_pin with/without col mux + if (self.words_per_row == 1): + wmask_en_len = (self.write_size * self.driver_spacing) + en_gap = self.driver_spacing - en_pin.width() + else: + wmask_en_len = 2*(self.write_size * self.driver_spacing) + en_gap = self.driver_spacing + self.add_layout_pin(text="en_{0}".format(bit), layer=en_pin.layer, offset=en_pin.ll(), - width=modifier*self.write_size*en_pin.width(), + width=wmask_en_len-en_gap, height=en_pin.height()) else: self.add_layout_pin(text="en", diff --git a/compiler/tests/10_write_driver_array_wmask_test.py b/compiler/tests/10_write_driver_array_wmask_test.py index e0f0285e..0a831572 100644 --- a/compiler/tests/10_write_driver_array_wmask_test.py +++ b/compiler/tests/10_write_driver_array_wmask_test.py @@ -23,8 +23,12 @@ class write_driver_test(openram_test): globals.init_openram("config_{0}".format(OPTS.tech_name)) # check write driver array for single port - debug.info(2, "Testing write_driver_array for columns=8, word_size=8, write_size=2") - a = factory.create(module_type="write_driver_array", columns=8, word_size=8, write_size=2) + debug.info(2, "Testing write_driver_array for columns=8, word_size=8, write_size=4") + a = factory.create(module_type="write_driver_array", columns=8, word_size=8, write_size=4) + self.local_check(a) + + debug.info(2, "Testing write_driver_array for columns=16, word_size=16, write_size=2") + a = factory.create(module_type="write_driver_array", columns=16, word_size=16, write_size=2) self.local_check(a) debug.info(2, "Testing write_driver_array for columns=16, word_size=8, write_size=4") diff --git a/technology/scn4m_subm/gds_lib/write_driver.gds b/technology/scn4m_subm/gds_lib/write_driver.gds index 6976213c7e63be2ca878e03fb280e2d0a2748c57..8223c795bae070e4d734e567c739a4440f0194ac 100644 GIT binary patch delta 157 zcmccPf5%^mfsKKQftf*uk%^(4fddHn88jJ0;cP7izKKfuf*67ulhTxxm?9V$gbpw; zNLV0f(FY6+AaMx2`IYicrpeW6yo;}?G3xLzFtG75F&Hwii7_!SFz^U4GcfRaFffP& VFtACorRFiP2r@9Rumdp*0|41!6+Hj| delta 136 zcmccPf5%^mfsKKQftf*uk%^(4fddG+8B`fGk=VKumGlKM1UDw7DJwAmfzSa41_=uU zE&2c?%D@1jH@{Ne$uxPpIxi371O^7-4hA+!w$!}Id1_LNH>fePu`@8RurL4sBp4NZ diff --git a/technology/scn4m_subm/mag_lib/write_driver.mag b/technology/scn4m_subm/mag_lib/write_driver.mag index b3bae978..0aa48197 100644 --- a/technology/scn4m_subm/mag_lib/write_driver.mag +++ b/technology/scn4m_subm/mag_lib/write_driver.mag @@ -1,6 +1,6 @@ magic tech scmos -timestamp 1565289461 +timestamp 1565304081 << nwell >> rect -3 101 37 138 rect -3 0 37 51 @@ -177,7 +177,7 @@ rect 27 45 31 60 rect 3 35 7 38 rect 19 35 23 38 rect 7 31 19 35 -rect 0 24 7 28 +rect 3 24 7 28 rect 11 24 31 28 << m2contact >> rect 10 193 14 197 @@ -198,7 +198,6 @@ rect 15 0 19 6 rect 0 0 34 203 << labels >> rlabel metal2 15 1 15 1 1 din -rlabel metal1 2 25 2 25 3 en rlabel m2contact 21 66 21 66 1 gnd rlabel m2contact 28 88 28 88 1 gnd rlabel m2contact 21 33 21 33 1 vdd @@ -206,4 +205,5 @@ rlabel m2contact 18 120 18 120 1 vdd rlabel metal2 12 201 12 201 5 bl rlabel metal2 22 201 22 201 5 br rlabel m2contact 14 161 14 161 1 gnd +rlabel metal1 17 26 17 26 1 en << end >>