Pullups¶
Package name: jsl/circuits/Pullups
This module defines functions for creating pullup and pulldown resistors.
Create a pullup resistor from a pin to a power rail:¶
val pullup-miim = create-resistor(resistance = 4.7e3, precision = (1 %))
insert-pullup(mng-bus.mdio, rail-3v3, elem-type = pullup-miim)
Summary¶
General Definitions¶
| Function | Description |
|---|---|
| insert-pulldown | Construct a pulldown instance from an Instantiable |
| add-pulldown | Add connections for a pulldown to a net or power rail. |
| insert-pullup | Construct a pullup instance from an Instantiable |
| add-pullup | Add connections for a pullup to a net or power rail |
Definitions¶
General Definitions¶
insert-pulldown¶
Construct a pulldown instance from an Instantiable
public defn insert-pulldown (sig:JITXObject, rail:JITXObject -- elem-type:Instantiable|Double = ?, inst-name?:String|Symbol = ?, qb:ResistorQuery = ?, make-public:True|False = ?) -> Instance
sig: JITXObject- Port or net that we wish to add a pullup to.rail: JITXObject- Port or Net to provide the voltage rail to pull the signal to. If this rail is apowerbundle, then the signal is pulled torail.V-.elem-type: Instantiable|Double- This function will instantiate a component of this type. Alternatively, the user can provide a resistance value, and a resistor of that value will be created using the JITX query API. By default - this function will create a 10k 1% resistor by default.inst-name?: String|Symbol- Optional name of the created instance. If no name is provided, we will use the Ref name of thesigargument. For example,netsw.C.IRQ_Nwill be converted toIRQ_N-pu.qb: ResistorQuery- Optional Resistor query builder for the selection of the pullup resistor in the case thatelem-type?is aDouble. By default,get-default-resistor-query()is consulted if the user doesn't provide a query builder.make-public: True|False- Determines if the created resistor instance will be defined with thepublicaccess modifier or not. By default, the component is defined asprivate- Returns
Instance
This function expects to be called from a pcb-module context.
See add-pulldown for more info.
add-pulldown¶
Add connections for a pulldown to a net or power rail.
public defn add-pulldown (elem:JITXObject, sig:JITXObject, rail:JITXObject)
elem: JITXObject- Instance supporting standard two-pin interfacesig: JITXObject- Signal that we want to add a pulldown resistor to.rail: JITXObject- Power Rail as either apowerbundle,SinglePinorNet. For apowerbundle, therail.V-port will be used.
insert-pullup¶
Construct a pullup instance from an Instantiable
public defn insert-pullup (sig:JITXObject, rail:JITXObject -- elem-type:Instantiable|Double = ?, inst-name?:String|Symbol = ?, qb:ResistorQuery = ?, make-public:True|False = ?) -> Instance
sig: JITXObject- Port or net that we wish to add a pullup to.rail: JITXObject- Port or Net to provide the voltage rail to pull the signal to. If this is apowerbundle, then this function will pull to therail.V+signal.elem-type: Instantiable|Double- Optional value to control the instance definition. If this value is anInstantiable- we will instantiate it directly. Alternatively, the user can provide a resistance value as aDouble, and a resistor of that value will be created using the JITX query API. By default - this function will create a 10k resistor for the pullup.inst-name?: String|Symbol- Name of the created instance. If no name is provided, we will use the Ref of thesigargument. For example,netsw.C.IRQ_Nwill be converted toIRQ_N-pu.qb: ResistorQuery- Optional Resistor query builder for the selection of the pullup resistor in the case thatelem-type?is aDouble. By default,get-default-resistor-query()is consulted if the user doesn't provide a query builder.make-public: True|False- Determines if the created resistor instance will be defined with thepublicaccess modifier or not. By default, the component is defined asprivate- Returns
Instance
This function expects to be called from a pcb-module context.
See add-pullup for more info.
add-pullup¶
Add connections for a pullup to a net or power rail
public defn add-pullup (elem:JITXObject, sig:JITXObject, rail:JITXObject)
elem: JITXObject- Instance supporting standard two-pin interfacesig: JITXObject- Signal that we want to add a pullup resistor to.rail: JITXObject- Power Rail as either apowerbundle,SinglePinor a Net. For apowerbundle, therail.V+port will be used.
Related Packages¶
Forwarded by package: jsl/circuits