def test__pnr_drawing_objects_type_check(self): module = self.load_rtl_module_pickle("gates1") pnr = PnR() _dict = pnr.place_and_route(module, animate=False) mod = _dict.keys()[0] self.assertTrue(isinstance(_dict[mod], Drawing_Object))
def test__pnr_drawing_objects_type_check(self): module = self.load_rtl_module_pickle('gates1') pnr = PnR() _dict = pnr.place_and_route(module, animate=False) mod = _dict.keys()[0] self.assertTrue(isinstance(_dict[mod], Drawing_Object))
def test__pnr_drawing_objects_feedback_vertices_1(self): module = self.load_rtl_module_pickle('feedback_1') pnr = PnR() pnr.place_and_route(module, animate=False) names = self.get_block_names(pnr.G) # main check self.assertEquals(len(names), 3) self.assertEquals(names[0], ['in1']) self.assertEquals(names[1], ['_B_U1_out2_U1_in2_2', 'U1']) self.assertEquals(names[2], ['out1'])
def test__pnr_drawing_objects_feedback_vertices_1(self): module = self.load_rtl_module_pickle('feedback_1') pnr = PnR() pnr.place_and_route(module, animate=False) names = self.get_block_names(pnr.G) # main check self.assertEquals( len(names), 3 ) self.assertEquals( names[0], ['in1'] ) self.assertEquals( names[1], ['_B_U1_out2_U1_in2_2', 'U1'] ) self.assertEquals( names[2], ['out1'] )
def test__pnr_reorderer_easy(self): module = self.load_rtl_module_pickle('gates1') pnr = PnR() pnr.place_and_route(module, animate=False) names = self.get_block_names(pnr.G) # main check self.assertEquals( pnr.G.get_crossover_count(), 0 ) self.assertEquals( len(names), 3 ) self.assertEquals( names[0], 'in1:in2:in3:in4'.split(':') ) self.assertEquals( names[1], ['U1', 'U2'] ) self.assertEquals( names[2], ['out1', 'out2'] )
def test__pnr_reorderer_easy(self): module = self.load_rtl_module_pickle('gates1') pnr = PnR() pnr.place_and_route(module, animate=False) names = self.get_block_names(pnr.G) # main check self.assertEquals(pnr.G.get_crossover_count(), 0) self.assertEquals(len(names), 3) self.assertEquals(names[0], 'in1:in2:in3:in4'.split(':')) self.assertEquals(names[1], ['U1', 'U2']) self.assertEquals(names[2], ['out1', 'out2'])
def test__pnr_drawing_objects_easy(self): module = self.load_rtl_module_pickle('gates1') pnr = PnR() _dict = pnr.place_and_route(module, animate=False) expected = [ 'U1', 'U2', 'conn_0', 'conn_1', 'conn_2', 'conn_3', 'conn_4', 'conn_5', 'in1', 'in2', 'in3', 'in4', 'out1', 'out2' ] objects = _dict.keys() objects.sort() self.assertEquals(objects, expected)
def test__pnr_reorderer_snake(self): module = self.load_rtl_module_pickle('snake_1') pnr = PnR() pnr.place_and_route(module, animate=False) names = self.get_block_names(pnr.G) # main check self.assertEquals( len(names), 7 ) self.assertEquals( pnr.G.get_crossover_count(), 3 ) self.assertEquals( names[0], 'in1'.split(':') ) self.assertEquals( names[1], ['U1']) self.assertEquals( names[2], ['U2', 'U3'] ) self.assertEquals( names[3], ['U4', '_U_U2_out1_U7_in2_4', 'U5'] ) self.assertEquals( names[4], ['U6', 'U7'] ) self.assertEquals( names[5], ['U8'] ) self.assertEquals( names[6], ['out1'] )
def test__pnr_reorderer_snake(self): module = self.load_rtl_module_pickle('snake_1') pnr = PnR() pnr.place_and_route(module, animate=False) names = self.get_block_names(pnr.G) # main check self.assertEquals(len(names), 7) self.assertEquals(pnr.G.get_crossover_count(), 3) self.assertEquals(names[0], 'in1'.split(':')) self.assertEquals(names[1], ['U1']) self.assertEquals(names[2], ['U2', 'U3']) self.assertEquals(names[3], ['U4', '_U_U2_out1_U7_in2_4', 'U5']) self.assertEquals(names[4], ['U6', 'U7']) self.assertEquals(names[5], ['U8']) self.assertEquals(names[6], ['out1'])
def test__pnr_drawing_objects_easy(self): module = self.load_rtl_module_pickle("gates1") pnr = PnR() _dict = pnr.place_and_route(module, animate=False) expected = [ "U1", "U2", "conn_0", "conn_1", "conn_2", "conn_3", "conn_4", "conn_5", "in1", "in2", "in3", "in4", "out1", "out2", ] objects = _dict.keys() objects.sort() self.assertEquals(objects, expected)
def load_module(self, module_name): module = self.load_rtl_module_pickle(module_name) pnr = PnR() pnr.module = module pnr._build_graph() return pnr