示例#1
0
    def sch(self):
        """Convert a Network object into a Schematic object."""

        if hasattr(self, '_sch'):
            return self._sch

        netlist = self.netlist()
        sch = Schematic()
        for net in netlist.split('\n'):
            sch.add(net)
        self._sch = sch
        return sch
示例#2
0
文件: netlist.py 项目: mwalde/lcapy
    def sch(self):

        if hasattr(self, '_sch'):
            return self._sch

        sch = Schematic()

        netlist = self.netlist()
        for net in netlist.split('\n'):
            sch.add(net)

        self._sch = sch
        return sch
示例#3
0
    def sch(self):
        """Generate schematic of subnetlist."""

        if hasattr(self, '_sch'):
            return self._sch

        sch = Schematic()

        netlist = self._netlist.netlist()
        for net in netlist.split('\n'):
            if net.startswith(self.namespace):
                sch.add(net)

        self._sch = sch
        return sch