From: Luke Kenneth Casson Leighton Date: Tue, 21 Apr 2020 16:50:01 +0000 (+0000) Subject: test out plug/net X-Git-Tag: partial-core-ls180-gdsii~129 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ae7bd5e8914fb76ffb23c548c1b3d335ca91ddb2;p=soclayout.git test out plug/net --- diff --git a/experiments7/doAlu16.py b/experiments7/doAlu16.py index ba1424b..591e6b7 100755 --- a/experiments7/doAlu16.py +++ b/experiments7/doAlu16.py @@ -157,22 +157,39 @@ class ALU16(Module): self.create_pins() - if False: - print (dir(self.cell)) - for net in self.cell.getNets(): - print (net.getName()) - print (self.cell.getNet("a(0)")) - print (dir(self.cell.getNet("a(0)"))) - for inst in self.cell.getInstances(): - for net in self.cell.getNets(): - if net.getName() == "a(1)": - icell = inst.getMasterCell() - #if len(list(icell.getInstances())) > 0: - #continue # already placed, do not include it - for net in icell.getNets(): - print ("inst", icell, "has nets", net.getName()) - sys.exit(0) + print (dir(self.cell)) + for net in self.cell.getNets(): + print (net.getName()) + print (self.cell.getNet("a(0)")) + print (dir(self.cell.getNet("a(0)"))) + net = self.cell.getNet("a(2)") + print (list(net.getPlugs())) + for plug in net.getPlugs(): + print (plug, dir(plug)) + components = list(plug.getConnexComponents()) + pc = plug.getCell() + print ("plug cell", pc) + mnet = plug.getMasterNet() + print ("mstnet", mnet) + for inst in self.cell.getInstances(): + for net in self.cell.getNets(): + plug = inst.getPlug(net) + if net.getName() == "a(2)": + print ("net", net, "plug", plug) + #print (list(net.getPlugs())) + continue + icell = inst.getMasterCell() + print (dir(inst)) + print (dir(icell)) + #if len(list(icell.getInstances())) > 0: + #continue # already placed, do not include it + #print (list(icell.getOccurrences())) + for net in icell.getNets(): + print ("inst", icell, "has nets", net.getName()) + plug = inst.getPlug(net) + print ("plug", plug, dir(plug)) + sys.exit(0) if self.editor: self.editor.setCell(self.cell)