skidl.pin module¶
Handles part pins.
- class skidl.pin.PhantomPin(**attribs)[source]¶
Bases:
Pin
A pin type that exists solely to tie two pinless nets together. It will not participate in generating any netlists.
- class skidl.pin.Pin(**attribs)[source]¶
Bases:
SkidlBaseObject
A class for storing data about pins for a part.
- Parameters:
attribs – Key/value pairs of attributes to add to the library.
- nets¶
The electrical nets this pin is connected to (can be >1).
- part¶
Link to the Part object this pin belongs to.
- func¶
Pin function such as PinType.types.INPUT.
- do_erc¶
When false, the pin is not checked for ERC violations.
- property circuit¶
Return the circuit of the part the pin belongs to.
- connect(*pins_nets_buses)[source]¶
Return the pin after connecting it to one or more nets or pins.
- Parameters:
pins_nets_buses – One or more Pin, Net or Bus objects or lists/tuples of them.
- Returns:
The updated pin with the new connections.
Notes
You can connect nets or pins to a pin like so:
p = Pin() # Create a pin. n = Net() # Create a net. p += net # Connect the net to the pin.
- copy(num_copies=None, **attribs)[source]¶
Return copy or list of copies of a pin including any net connection.
- Parameters:
num_copies – Number of copies to make of pin.
- Keyword Arguments:
attribs – Name/value pairs for setting attributes for the pin.
Notes
An instance of a pin can be copied just by calling it like so:
p = Pin() # Create a pin. p_copy = p() # This is a copy of the pin.
- property drive¶
Get, set and delete the drive strength of this pin.
- property net¶
Return one of the nets the pin is connected to.
- property pins¶
- property ref¶
Return the reference of the part the pin belongs to.
- split_name(delimiters)[source]¶
Use chars in divider to split a pin name and add substrings to aliases.
- property width¶
Return width of a Pin, which is always 1.