def setUp(self): self.db, lib = helper.createSimpleDB() block = helper.create1LevelBlock(self.db, lib, self.db.getChip()) inst = block.getInsts()[0] self.n1 = inst.findITerm('a').getNet() self.n2 = inst.findITerm('b').getNet() self.n3 = inst.findITerm('o').getNet()
def setUp(self): self.db, self.lib = helper.createSimpleDB() self.block = helper.create1LevelBlock(self.db, self.lib, self.db.getChip()) self.master_mod = odb.dbModule_create(self.block, "master_mod") self.parent_mod = odb.dbModule_create(self.block, "parent_mod") self.i1 = odb.dbModInst_create(self.parent_mod, self.master_mod, "i1") self.inst1 = self.block.findInst("inst")
def test_destroy_block(self): #creating a child block to parent block _block = helper.create1LevelBlock(self.db, self.db.getLibs()[0], self.parentBlock) self.assertEqual(len(self.parentBlock.getChildren()), 2) _block.destroy(_block) self.assertEqual(len(self.parentBlock.getChildren()), 1) odb.dbBlock_destroy(self.parentBlock)
def setUp(self): self.db, self.lib = helper.createSimpleDB() self.block = helper.create1LevelBlock(self.db, self.lib, self.db.getChip()) self.group = odb.dbGroup_create(self.block,"group") self.domain = odb.dbGroup_create(self.block,"domain",0,0,100,100) self.child = odb.dbGroup_create(self.block,"child") self.master_mod = odb.dbModule_create(self.block,"master_mod") self.parent_mod = odb.dbModule_create(self.block,"parent_mod") self.i1 = odb.dbModInst_create(self.parent_mod,self.master_mod,"i1") self.inst1 = self.block.findInst("inst") self.n1 = self.block.findNet("n1")