[libre-riscv-dev] [Bug 217] create a "ring" system which allows pad locations to be specified conveniently

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Tue Apr 21 17:16:43 BST 2020


https://bugs.libre-soc.org/show_bug.cgi?id=217

--- Comment #77 from Jean-Paul.Chaput at lip6.fr ---
(In reply to Luke Kenneth Casson Leighton from comment #76)
> +        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)
> +
> 
> i managed to walk the instances pins (of the cell's inputs and outputs,
> not what the cell is *connected* to).
> 
> hmm...

The concept you are missing here, is the "Plug". A plug is a logical connector
of an instance.

* Plug belongs to Instance. One Plug per external Net.
* Plug may be connected to a Net in the Cell the instance is in
  (method getNet())
* Plug are connected to the Net of the Cell the instance represent,
  called the "master net" (method: getMasterNet()).
* Plug are derived from Components. When a Plug is connected to a Net,
  is put in it's components. So you may find all that is logically
  connected to the Net with net.getPlugs().
* Of courses Instance also have access to all it's Plugs: inst.getPlugs().

So, from the Plug you can know the Net, the Master Net and the instance.
Form the Net you know the Plugs.
>From the Instance you can know the PLugs.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-riscv-dev mailing list