cbadc.circuit.CircuitElement

class cbadc.circuit.CircuitElement(instance_name: str, terminals: List[Terminal], *args, comments: List[str] = [], model: DeviceModel = None, **kwargs)[source]

Bases: object

Circuit element base class

Parameters
  • component_type (ComponentType) – The type of the component

  • terminals (List[Terminal]) – The terminals of the component

  • instance_name (str, optional) – The instance name of the component, by default ‘’

  • comments (List[str], optional) – Comments to add to the component, by default []

  • model (DeviceModel, optional) – The model to use for the component, by default None

  • library (str, optional) – The library to use for the component, by default ‘’

  • include (str, optional) – The include file to use for the component, by default ‘’

Methods

__init__(instance_name, terminals, *args[, ...])

add_terminal(terminal[, index])

Add a terminal to the component

add_terminals(terminals)

Add multiple terminals to the component

get_ngspice(connections)

Get the ngspice call for the component

get_spectre(connections)

Get the spectre call for the component

get_terminals()

Get the terminals of the component

Attributes

instance_name

comments

model

add_terminal(terminal: Terminal, index: int = -1)[source]

Add a terminal to the component

Parameters
  • terminal (Terminal) – The terminal to add

  • index (int, optional) – The index to add the terminal at, by default -1, i.e., at the end

add_terminals(terminals: List[Terminal])[source]

Add multiple terminals to the component

Parameters

terminals (List[Terminal]) – The terminals to add

get_ngspice(connections: Dict[Terminal, Port])[source]

Get the ngspice call for the component

get_spectre(connections: Dict[Terminal, Port])[source]

Get the spectre call for the component

get_terminals() List[Terminal][source]

Get the terminals of the component