Skip to content

jsl/pin-assignment/circuit-pool

Package name: jsl/pin-assignment/circuit-pool

Summary

Data Types

CircuitTemplate

Circuit Template provides Support Features for the Pool

Functions

Function Description
create-circuit-pool (+ 1) Create a Circuit Pool Instantiable from a Template
CircuitTemplate (+ 1) Construct a Circuit Template for a single Bundle Type.
make-circuit-pool Generator to construct the implementation of a Circuit Pool

BundleStack

BundleStack is a type for informing how many bundles are available in an instance.

Constructors

Function Description
BundleStack Constructor for defstruct BundleStack

Functions

Function Description
CircuitTemplate Construct a Circuit Template for multiple BundleStacks

Definitions

CircuitTemplate

Circuit Template provides Support Features for the Pool

public defstruct CircuitTemplate
    comp: Instantiable
    name: String
    stack: Collection<BundleStack>

  • comp: Instantiable - Instantiable that will provide our supports for the pool

  • name: String - Identifier name - primarily for differentiating multiple component types in a mixed pool

  • stack: Collection<BundleStack> - Collection of BundleStack to describe what supports are provided. We will use this list to unpack and consolidate all of the supports available from the component instance.

TODO - In the future, we add the ability to introspect an instance for the bundle types and the number of supports. But for now we need to explicitly describe the bundle and number of supports.

Functions

create-circuit-pool

Create a Circuit Pool Instantiable from a Template

public defn create-circuit-pool (template:CircuitTemplate, num-insts:Int) -> Instantiable

  • template: CircuitTemplate - This defines the Instantiable that we will instantiate and the number of supports that each instance possesses. We use this information to construct the consolidated supports
  • num-insts: Int - Number of instances of the template to construct.
  • Returns Instantiable - A pcb-module definition that can be instaniated to create a pool

This function will use make-circuit-pool to construct an instantiable module that will consolidate the supports from num-insts number of template circuits into one module.

This allows for the supports across multiple packages to be used interchangeably in a pin assignment problem.

create-circuit-pool

Create a Circuit Pool Instantiablel from a heterogenous mixture of Templates

public defn create-circuit-pool (templates:KeyValue<CircuitTemplate, Int> ...) -> Instantiable

  • templates: KeyValue<CircuitTemplate, Int> - A KeyValue set of Template and Number of Instances of that template to create. The user can pass as many of these as they like.
  • Returns Instantiable - A pcb-module definition that can be instaniated to create a pool

This function will use make-circuit-pool to construct an instantiable module that will consolidate the supports from a mix of different types of templates.

For example, you might want to create a pool of AND gates from quad and dual packages to minimize space and maximize utilization.

CircuitTemplate

Construct a Circuit Template for a single Bundle Type.

public defn CircuitTemplate (comp:Instantiable, b:Bundle, num-supports:Int -- name = ?) -> CircuitTemplate

  • Returns CircuitTemplate

CircuitTemplate

Construct a Circuit Template for multiple BundleStacks

public defn CircuitTemplate (comp:Instantiable, bs:Seqable<BundleStack> -- name = ?) -> CircuitTemplate

  • Returns CircuitTemplate

make-circuit-pool

Generator to construct the implementation of a Circuit Pool

public defn make-circuit-pool (template:CircuitTemplate, num-insts:Int)

  • template: CircuitTemplate - This defines the Instantiable that we will instantiate and the number of supports that each instance possesses. We use this information to construct the consolidated supports
  • num-insts: Int - Number of instances of the template to construct.

This function is intended to be called from a pcb-module context.

In that pcb-module context, an InstanceArray named pool is created from the CircuitTemplate. This function will consolidate all of the supports statements from each instance of the pool array and make them available on this module.

BundleStack

BundleStack is a type for informing how many bundles are available in an instance.

public defstruct BundleStack
    b: Bundle
    num-supports: Int

  • b: Bundle - Bundle Type that this instantiable provides.

  • num-supports: Int - Number of supports for the b Bundle in this instantiable.

The idea would be that you might have a component like a quad AND gate IC and you want to communicate how many gate(2) bundles you can extract from that IC instance.

TODO - In the future, we will add the ability to introspect an instance for the bundle types and the number of supports. But for now we need to explicitly describe the bundle and number of supports.

Constructors

BundleStack

Constructor for defstruct BundleStack

public defn BundleStack (b:Bundle, num-supports:Int)

Functions

CircuitTemplate

Construct a Circuit Template for multiple BundleStacks

public defn CircuitTemplate (comp:Instantiable, bs:Seqable<BundleStack> -- name = ?) -> CircuitTemplate

  • Returns CircuitTemplate

Related Packages

Forwarded by package: jsl/pin-assignment