Skip to content

jsl/circuits/ConfigStrap

Package name: jsl/circuits/ConfigStrap

Configuration Strap Module

This package contains a module generator that can be used to define a series of configuration straps.

Summary

Data Types

ArrayPacking

Multis

Function Description
pack-array This function implements the packing algorithm for a ArrayPacking type.

Functions

Function Description
ConfigStrap Construct a configuration strap sub-circuit.

LongitudinalPacking

Longitudinal Packing for Configuration Component Arrays

Constructors

Function Description
LongitudinalPacking (+ 1) Constructor for defstruct LongitudinalPacking

General Definitions

Function Description
config-strap-bus Configuration Bus Bundle
set-straps-config Configuration Strap BOM Configuration Setter

Definitions

ArrayPacking

public deftype ArrayPacking

Multis

pack-array

This function implements the packing algorithm for a ArrayPacking type.

public defmulti pack-array (ap:ArrayPacking, hi-comps:JITXObject, lo-comps:JITXObject)

This function will look at the passed components or arrays of components and then structure the array according to some heuristic.

Functions

ConfigStrap

Construct a configuration strap sub-circuit.

public defn ConfigStrap ( -- num-elems:Int, comp:Instantiable, lo-comp:Instantiable = ?, pack?:Maybe<ArrayPacking> = ?, name?:String = ?) -> Instantiable

  • num-elems: Int - Number of configuration strap channels to create. Must be greater than 0.
  • comp: Instantiable - Component to instantiate for the divider. This component is expected to follow typical 2-pin convention of providing ports p[1] and p[2].
  • lo-comp: Instantiable - Optional component for instantiating the low-side of the divider. If lo is not provided then comp is used for both the high and low side of the divider.
  • pack?: Maybe<ArrayPacking> - Optional Component Array Packing Generator. By default, this value is a LongitudinalPacking. If the user passes None() then no place statements for the components in the array are created.
  • name?: String - Optional name for the configuration strap definition
  • Returns Instantiable - This function creates a pcb-module within a closure and then returns the constructed pcb-module.

With complex ICs, one or more pins may be exposed as "Configuration Straps." The idea is that the IC will check the status of these pins are boot time and depending on whether those pins are pulled high or low, this will change the behavior of the chip.

This module provides a configurable means of defining a set of config strap resistors using pin assignment for optimal layout.

The configuration strap resistors are typically created as a high-side resistor in series with a low side resistor, like a voltage divider. The middle node is the configuration node and depending on whether the high-side or low side is populated, it will be pulled to one side or another.

This module exposes the array of high side and low side components as public in hi-comps and lo-comps arrays.

This module exposes a support for a config-strap-bus bundle of length num-elems that can be used

LongitudinalPacking

Longitudinal Packing for Configuration Component Arrays

public defstruct LongitudinalPacking <: ArrayPacking :
    margin: Double

  • margin: Double - Set the extra distance between components in the packing array.

This packing type will place the components in the following structure:

H0 H1 H2 ... L0 L1 L2

This will typically place the VDD rail on one side and ground rail on the other for easier connecting.

Constructors

LongitudinalPacking

Constructor for defstruct LongitudinalPacking

public defn LongitudinalPacking (margin:Double)

LongitudinalPacking

Constructor for defstruct LongitudinalPacking

public defn LongitudinalPacking ( -- margin:Double = ?)

General Definitions

config-strap-bus

Configuration Bus Bundle

public pcb-bundle config-strap-bus (num-elems:Int)

This bundle is what is used to access the pin assignment supports for the ConfigStrap module.

set-straps-config

Configuration Strap BOM Configuration Setter

public defn set-straps-config (straps:JITXObject, cfg:Int)

  • straps: JITXObject - ConfigStrap instance to configure.
  • cfg: Int - Value to assign as binary to the configuration strap object. We will set the high/low components to InBom or MarkedDNP depending on the binary state of each bit.

This function is a generator and expects to be called from within a pcb-module context.

Related Packages

Forwarded by package: jsl/circuits