How to use the skidl.Network.Network function in skidl

To help you get started, we’ve selected a few skidl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github xesscorp / skidl / skidl / Part.py View on Github external
def __or__(self, obj):
        """Attach a part and another part/pin/net in parallel."""
        from .Network import Network

        return Network(self) | obj
github xesscorp / skidl / skidl / Part.py View on Github external
def __rand__(self, obj):
        """Attach a part and another part/pin/net in serial."""
        from .Network import Network

        return obj & Network(self)
github xesscorp / skidl / skidl / NetPinList.py View on Github external
def create_network(self):
        """Create a network from a list of pins and nets."""

        return Network(*self)  # An error will occur if list has more than 2 items.
github xesscorp / skidl / skidl / Net.py View on Github external
def __ror__(self, obj):
        """Attach a net and another part/pin/net in parallel."""
        from .Network import Network

        return obj | Network(self)
github xesscorp / skidl / skidl / ProtoNet.py View on Github external
def __and__(self, obj):
        """Attach a net and another part/pin/net in serial."""

        return Network(self) & obj
github xesscorp / skidl / skidl / NetPinList.py View on Github external
def __rand__(self, obj):
        """Attach a NetPinList and another part/pin/net in serial."""

        return obj & Network(self)
github xesscorp / skidl / skidl / Network.py View on Github external
def __rand__(self, obj):
        """Combine two networks by placing them in series. (Reverse-ordered operation.)"""

        # Create a network from the first object and then place it in series with the second network.
        return Network(obj) & self
github xesscorp / skidl / skidl / Net.py View on Github external
def __and__(self, obj):
        """Attach a net and another part/pin/net in serial."""
        from .Network import Network

        return Network(self) & obj
github xesscorp / skidl / skidl / Network.py View on Github external
def __init__(self, *objs):
        """Create a Network object from a list of pins, nets, and parts."""
        super(Network, self).__init__()
        for obj in objs:
            try:
                ntwk = obj.create_network()  # Create a Network from each object.
            except AttributeError:
                log_and_raise(
                    logger,
                    TypeError,
                    "Can't create a network from a {} object ({}).".format(
                        type(obj), obj.__name__
                    ),
                )

            # Add the in & out ports of the object network to this network.
            self.extend(ntwk)

            # A Network cannot have more than two ports. But it may have only
github xesscorp / skidl / skidl / NetPinList.py View on Github external
def __and__(self, obj):
        """Attach a NetPinList and another part/pin/net in serial."""

        return Network(self) & obj