gates
Inv_x1 = Parameterize(Inv, p_strength=1, n_strength=1, vt='svt')
module-attribute
A x1 Inverter ready to instantiate
Inv_x2 = Parameterize(Inv, p_strength=2, n_strength=2, vt='svt')
module-attribute
A x2 Inverter ready to instantiate
Inv
Bases: Module
Parametrized (n/p sizing and vt choice) inverter
Examples:
A n/p = 2/3 standard-vt Inverter:
Connecting ports:
>>> self.inv = Parameterize(Inv, n_strength=2, p_strength=3, vt='svt')(
inp=INPUT, out=OUTPUT, p=SUPPLY)
Multiple instances:
>>> Inv_x4 = Parameterize(Inv, n_strength=4, p_strength=4, vt='svt')
>>> self.inverters = [Inv_x4() for i in range(2)] # Create two x4 inverters
Parameters:
Name | Type | Description | Default |
---|---|---|---|
inp |
InputPort
|
Input node |
required |
out |
OutputPort
|
Output node |
required |
p |
SupplyPort
|
Power/gnd port |
required |
Source code in circuitbrew/gates.py
build()
Two transistors
Source code in circuitbrew/gates.py
NorN
Bases: Module
Parametrized (number of inputs) NOR gate
Examples:
A two-input NOR
Connecting ports:
Parameters:
Name | Type | Description | Default |
---|---|---|---|
a |
InputPorts
|
Input nodes (parameterized) |
required |
b |
OutputPort
|
Output node |
required |
p |
SupplyPort
|
Power/gnd port |
required |
Source code in circuitbrew/gates.py
build()
Transistor implementation