mirror of https://github.com/VLSIDA/OpenRAM.git
Added max gap size for wmask and edited max gap size for data ff's to take into account m3 spacing.
This commit is contained in:
parent
a78245786c
commit
bbe235074c
|
|
@ -70,9 +70,13 @@ class sram_1bank(sram_base):
|
||||||
wmask_pos = [None]*len(self.all_ports)
|
wmask_pos = [None]*len(self.all_ports)
|
||||||
data_pos = [None]*len(self.all_ports)
|
data_pos = [None]*len(self.all_ports)
|
||||||
|
|
||||||
# This is M2 pitch even though it is on M1 to help stem via spacings on the trunk
|
if self.write_size:
|
||||||
# The M1 pitch is for supply rail spacings
|
max_gap_size = self.m3_pitch*max(self.word_size+1,self.col_addr_size+1) + 2*self.m1_pitch
|
||||||
max_gap_size = self.m2_pitch*max(self.word_size+1,self.col_addr_size+1) + 2*self.m1_pitch
|
max_gap_size_wmask = self.m2_pitch*self.num_wmasks + 2*self.m1_pitch
|
||||||
|
else:
|
||||||
|
# This is M2 pitch even though it is on M1 to help stem via spacings on the trunk
|
||||||
|
# The M1 pitch is for supply rail spacings
|
||||||
|
max_gap_size = self.m2_pitch*max(self.word_size+1,self.col_addr_size+1) + 2*self.m1_pitch
|
||||||
|
|
||||||
# Port 0
|
# Port 0
|
||||||
port = 0
|
port = 0
|
||||||
|
|
@ -81,12 +85,12 @@ class sram_1bank(sram_base):
|
||||||
if self.write_size:
|
if self.write_size:
|
||||||
# Add the write mask flops below the write mask AND array.
|
# Add the write mask flops below the write mask AND array.
|
||||||
wmask_pos[port] = vector(self.bank.bank_array_ll.x,
|
wmask_pos[port] = vector(self.bank.bank_array_ll.x,
|
||||||
-0.5 * max_gap_size - self.dff.height)
|
-max_gap_size_wmask - self.dff.height)
|
||||||
self.wmask_dff_insts[port].place(wmask_pos[port])
|
self.wmask_dff_insts[port].place(wmask_pos[port])
|
||||||
|
|
||||||
# Add the data flops below the write mask flops.
|
# Add the data flops below the write mask flops.
|
||||||
data_pos[port] = vector(self.bank.bank_array_ll.x,
|
data_pos[port] = vector(self.bank.bank_array_ll.x,
|
||||||
-2 * max_gap_size - 2 * self.dff.height)
|
-max_gap_size - max_gap_size_wmask - 2 * self.dff.height)
|
||||||
self.data_dff_insts[port].place(data_pos[port])
|
self.data_dff_insts[port].place(data_pos[port])
|
||||||
else:
|
else:
|
||||||
# Add the data flops below the bank to the right of the lower-left of bank array
|
# Add the data flops below the bank to the right of the lower-left of bank array
|
||||||
|
|
@ -107,7 +111,7 @@ class sram_1bank(sram_base):
|
||||||
if self.col_addr_dff:
|
if self.col_addr_dff:
|
||||||
if self.write_size:
|
if self.write_size:
|
||||||
col_addr_pos[port] = vector(self.bank.bank_array_ll.x - self.col_addr_dff_insts[port].width - self.bank.m2_gap,
|
col_addr_pos[port] = vector(self.bank.bank_array_ll.x - self.col_addr_dff_insts[port].width - self.bank.m2_gap,
|
||||||
-0.5*max_gap_size - self.col_addr_dff_insts[port].height)
|
-max_gap_size_wmask - self.col_addr_dff_insts[port].height)
|
||||||
else:
|
else:
|
||||||
col_addr_pos[port] = vector(self.bank.bank_array_ll.x - self.col_addr_dff_insts[port].width - self.bank.m2_gap,
|
col_addr_pos[port] = vector(self.bank.bank_array_ll.x - self.col_addr_dff_insts[port].width - self.bank.m2_gap,
|
||||||
-max_gap_size - self.col_addr_dff_insts[port].height)
|
-max_gap_size - self.col_addr_dff_insts[port].height)
|
||||||
|
|
@ -135,12 +139,12 @@ class sram_1bank(sram_base):
|
||||||
if self.write_size:
|
if self.write_size:
|
||||||
# Add the write mask flops below the write mask AND array.
|
# Add the write mask flops below the write mask AND array.
|
||||||
wmask_pos[port] = vector(self.bank.bank_array_ur.x - self.data_dff_insts[port].width,
|
wmask_pos[port] = vector(self.bank.bank_array_ur.x - self.data_dff_insts[port].width,
|
||||||
self.bank.height + 0.5*max_gap_size + self.dff.height)
|
self.bank.height + max_gap_size_wmask + self.dff.height)
|
||||||
self.wmask_dff_insts[port].place(wmask_pos[port], mirror="MX")
|
self.wmask_dff_insts[port].place(wmask_pos[port], mirror="MX")
|
||||||
|
|
||||||
# Add the data flops below the write mask flops
|
# Add the data flops below the write mask flops
|
||||||
data_pos[port] = vector(self.bank.bank_array_ur.x - self.data_dff_insts[port].width,
|
data_pos[port] = vector(self.bank.bank_array_ur.x - self.data_dff_insts[port].width,
|
||||||
self.bank.height + 2*max_gap_size + 2*self.dff.height)
|
self.bank.height + max_gap_size_wmask + max_gap_size + 2*self.dff.height)
|
||||||
self.data_dff_insts[port].place(data_pos[port], mirror="MX")
|
self.data_dff_insts[port].place(data_pos[port], mirror="MX")
|
||||||
else:
|
else:
|
||||||
# Add the data flops above the bank to the left of the upper-right of bank array
|
# Add the data flops above the bank to the left of the upper-right of bank array
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue