def __init__(self, name): design.__init__(self, "top") # Instantiate a GDS cell with the design gds_file = "{0}/{1}.gds".format( os.path.dirname(os.path.realpath(__file__)), name) cell = gds_cell(name, gds_file) self.add_inst(name=name, mod=cell, offset=[0, 0]) self.connect_inst([]) layer_stack = ("metal1", "via1", "metal2") r = router(layer_stack, self, gds_file) connections = [('out_0_2', 'a_0_0'), ('out_0_3', 'b_0_0'), ('out_0_0', 'a_0_1'), ('out_1_2', 'a_1_0'), ('out_1_3', 'b_1_0'), ('out_1_0', 'a_1_1'), ('out_2_1', 'a_2_0'), ('out_2_2', 'b_2_0'), ('out_3_1', 'a_3_0'), ('out_3_2', 'b_3_0'), ('out_4_6', 'a_4_0'), ('out_4_7', 'b_4_0'), ('out_4_8', 'a_4_2'), ('out_4_9', 'b_4_2'), ('out_4_10', 'a_4_4'), ('out_4_11', 'b_4_4'), ('out_4_0', 'a_4_1'), ('out_4_2', 'b_4_1'), ('out_4_4', 'a_4_5'), ('out_4_1', 'a_4_3'), ('out_4_5', 'b_4_3')] for (src, tgt) in connections: self.assertTrue(r.route(src=src, dest=tgt))
def __init__(self, name): design.__init__(self, "top") # Instantiate a GDS cell with the design gds_file = "{0}/{1}.gds".format( os.path.dirname(os.path.realpath(__file__)), name) cell = gds_cell(name, gds_file) self.add_inst(name=name, mod=cell, offset=[0, 0]) self.connect_inst([]) r = router(gds_file) layer_stack = ("metal1", "via1", "metal2") # This should be infeasible because it is blocked without a detour. self.assertFalse( r.route(self, layer_stack, src="A", dest="B", detour_scale=1)) # This should be feasible because we allow it to detour self.assertTrue( r.route(self, layer_stack, src="A", dest="B", detour_scale=3))
def __init__(self, name): design.__init__(self, "top") # Instantiate a GDS cell with the design gds_file = "{0}/{1}.gds".format( os.path.dirname(os.path.realpath(__file__)), name) cell = gds_cell(name, gds_file) self.add_inst(name=name, mod=cell, offset=[0, 0]) self.connect_inst([]) layer_stack = ("metal1", "via1", "metal2") r = router(layer_stack, self, gds_file) self.assertTrue(r.route(src="A", dest="B"))
def __init__(self, name): design.__init__(self, "top") # Instantiate a GDS cell with the design gds_file = "{0}/{1}.gds".format( os.path.dirname(os.path.realpath(__file__)), name) cell = gds_cell(name, gds_file) self.add_inst(name=name, mod=cell, offset=[0, 0]) self.connect_inst([]) layer_stack = ("metal1", "via1", "metal2") r = router(layer_stack, self, gds_file) # these are user coordinates and layers src_pin = [[0.52, 4.099], 11] tgt_pin = [[3.533, 1.087], 11] #r.route(layer_stack,src="A",dest="B") self.assertTrue(r.route(src=src_pin, dest=tgt_pin))