skidl.network module¶
Object for handling series and parallel networks of two-pin parts, nets, and pins.
This module provides the Network class which allows electronic components to be connected in series and parallel using operators like ‘&’ and ‘|’. This enables a concise, algebraic notation for creating complex circuits.
- class skidl.network.Network(*objs)[source]¶
Bases:
list
A container for arranging pins, nets, and parts in series and parallel.
The Network class extends the list type to store input and output ports which can be connected to form series and parallel arrangements using the ‘&’ and ‘|’ operators. A Network can have up to two ports representing its input and output.
- skidl.network.tee(ntwk)[source]¶
Create a network “tee” by returning the first terminal of a Network object.
This function allows for the creation of branch points in networks, enabling more complex circuit topologies beyond simple series and parallel arrangements.
- Parameters:
ntwk – Object to be converted to a Network if not already.
- Returns:
The first terminal (input port) of the Network.
- Return type:
Port
Example
vi & r1 & r2 & tee(r3 & r4 & gnd) & r5 & gnd
- This creates:
- vi—r1—r2-+-r5—gnd
r3—r4—gnd