diff --git a/compiler/modules/capped_replica_bitcell_array.py b/compiler/modules/capped_replica_bitcell_array.py index 6293c7c4..c1f9c83f 100644 --- a/compiler/modules/capped_replica_bitcell_array.py +++ b/compiler/modules/capped_replica_bitcell_array.py @@ -256,33 +256,37 @@ class capped_replica_bitcell_array(bitcell_base_array): self.DRC_LVS() - # TODO: I think I gotta offset these to account for the stupid instances not knowing where they are def get_main_array_top(self): - return self.replica_bitcell_array_inst.get_main_array_top() + return self.replica_bitcell_array_inst.by() + self.replica_bitcell_array_inst.get_main_array_top() def get_main_array_bottom(self): - return self.replica_bitcell_array_inst.get_main_array_bottom() + return self.replica_bitcell_array_inst.by() + self.replica_bitcell_array_inst.get_main_array_bottom() def get_main_array_left(self): - return self.replica_bitcell_array_inst.get_main_array_left() + return self.replica_bitcell_array_inst.lx() + self.replica_bitcell_array_inst.get_main_array_left() def get_main_array_right(self): - return self.replica_bitcell_array_inst.get_main_array_right() + return self.replica_bitcell_array_inst.lx() + self.replica_bitcell_array_inst.get_main_array_right() def get_replica_top(self): - return self.replica_bitcell_array_inst.get_replica_top() + return self.replica_bitcell_array_inst.by() + self.replica_bitcell_array_inst.get_replica_top() def get_replica_bottom(self): - return self.replica_bitcell_array_inst.get_replica_bottom() + return self.replica_bitcell_array_inst.by() + self.replica_bitcell_array_inst.get_replica_bottom() def get_replica_left(self): - return self.replica_bitcell_array_inst.get_replica_left() + return self.replica_bitcell_array_inst.lx() + self.replica_bitcell_array_inst.get_replica_left() def get_replica_right(self): - return self.replica_bitcell_array_inst.get_replica_right() + return self.replica_bitcell_array_inst.lx() + self.replica_bitcell_array_inst.get_replica_right() def get_column_offsets(self): - return self.replica_bitcell_array_inst.get_column_offsets() + """ + Return an array of the x offsets of all the regular bits + """ + # must add the offset of the instance + offsets = [self.replica_bitcell_array_inst.lx() + x for x in self.replica_bitcell_array.get_column_offsets()] + return offsets def add_end_caps(self): """ Add dummy cells or end caps around the array """ diff --git a/compiler/modules/local_bitcell_array.py b/compiler/modules/local_bitcell_array.py index 50ab945d..ef7da9af 100644 --- a/compiler/modules/local_bitcell_array.py +++ b/compiler/modules/local_bitcell_array.py @@ -273,7 +273,7 @@ class local_bitcell_array(bitcell_base_array): def get_main_array_right(self): return self.bitcell_array_inst.lx() + self.bitcell_array.get_main_array_right() - def get_column_offsets(self): # TODO: copy this style when fixing getters in capped_replica_bitcell_array.py + def get_column_offsets(self): """ Return an array of the x offsets of all the regular bits """