Skip to content

jsl/landpatterns/numbering

Package name: jsl/landpatterns/numbering

Summary

Data Types

Std-IC-Numbering

Standard IC Numbering

Constructors

Function Description
Std-IC-Numbering Constructor for defstruct Std-IC-Numbering

Grid-Numbering

Create pad Ref sequence for a 2-axis Grid (eg for BGAs)

Functions

Function Description
to-row-range Compute the row range based on the start and end character.
Grid-Numbering
to-row-index Given a Row Letter, convert to an Int offset in 0-index form

Row-Major-Numbering

Row Major Pad Numbering

Functions

Function Description
Row-Major-Numbering

C-A-Numbering

Cathode/Anode Numbering Scheme

Functions

Function Description
C-A-Numbering

LookupTableNumbering

Lookup Table Based Numbering Scheme

Functions

Function Description
LookupTableNumbering

Uneven-Column-Major-Numbering

Uneven (Asymmetric) Column Major Numbering

Constructors

Function Description
Uneven-Column-Major-Numbering Constructor for defstruct Uneven-Column-Major-Numbering

Functions

Function Description
Uneven-Column-Major-Numbering Construct an Uneven Column Structure for Quad Packages
get-total-pads

Numbering

Numbering Scheme for a Set of Pads

Multis

Function Description
to-pad-id Convert the row and column indices into a pad number or reference

Column-Major-Numbering

Column Major Pad Numbering

Functions

Function Description
Column-Major-Numbering

General Definitions

Variable Description
DEF-ROW-OMITS

Definitions

Std-IC-Numbering

Standard IC Numbering

public defstruct Std-IC-Numbering <: Numbering :
    num-pads: Int

  • num-pads: Int

TODO: Figure here

Constructors

Std-IC-Numbering

Constructor for defstruct Std-IC-Numbering

public defn Std-IC-Numbering (num-pads:Int)

Grid-Numbering

Create pad Ref sequence for a 2-axis Grid (eg for BGAs)

public defstruct Grid-Numbering <: Numbering :
    columns: Int
    omit-cols: Tuple<Int>
    omit-rows: String
    pad-lookup: Tuple<Ref>
    rows: Int
    start-col: Int
    start-row: Int

  • columns: Int - Number of Columns in the Grid

  • omit-cols: Tuple<Int> - List of column identifiers which will be omitted. By default, this tuple is empty meaning that all columns are used. The user can pass a black list of column ids as integers. For example, if the user provides [3, 7], then the column sequence would be: 0, 1, 2, 4, 5, 6, 8, ...

  • omit-rows: String - List of letters to not uses as the row id in the generated pad reference. By default this is set to "IOQSXZ" by IPC7351B. For example, this means that the row sequence will consist of: ... G, H, J ... Where I is absent

  • pad-lookup: Tuple<Ref> - Lookup table for converting row/column indices to a Ref. This lookup is pre-computed based on the rows/columns/etc

  • rows: Int - Number of Rows in the Grid

  • start-col: Int - Set the starting column offset/ Default is 0, which is typically the first column index.

  • start-row: Int - Set the starting row offset. Default is 0, which is typically maps to 'A' unless the omit-rows contains 'A'.

The created references use a IndexRef consisting of a letter for the row indicator and a number index for the column. For example: row=1, column=1 => A[1] row=2, column=7 => B[7] row=21, column=3 => AA[3]

Note that the final example assumes the default omit character sequence.

The start-row and start-col parameters are used to offset the numbering generation. For example - lets say you wanted to have a 5x5 grid but start with row 'C' and column 5, Setting start-row = 2 and start-col = 4 (zero-indexed). This results in a grid with rows C, D, E, F, G and columns 5, 6, 7, 8, 9.

Functions

to-row-range

Compute the row range based on the start and end character.

public defn to-row-range (grid:Grid-Numbering, start:Char|String, end:Char|String) -> Range

  • grid: Grid-Numbering - Grid Numbering Scheme
  • start: Char|String - First row as a character or sequence of characters.
  • end: Char|String - Inclusive end row as a character or sequence of characters.
  • Returns Range - The resultant range is a 1-based index to match the PadIsland constructor interface.

This is a utility function for constructing the Range for the row offsets (ie, Int values) from the character values.

Grid-Numbering

public defn Grid-Numbering (rows:Int, columns:Int, start-row:Int = ?, start-col:Int = ?, omit-rows:String = ?, omit-cols:Tuple<Int> = ?) -> Grid-Numbering

  • Returns Grid-Numbering

to-row-index

Given a Row Letter, convert to an Int offset in 0-index form

public defn to-row-index (g:Grid-Numbering, row:Ref|String) -> Int

  • g: Grid-Numbering - Grid Numbering Scheme
  • row: Ref|String - identifies which row we are attempting to convert
  • Returns Int

Row-Major-Numbering

Row Major Pad Numbering

public defstruct Row-Major-Numbering <: Numbering :
    col-offset: Int
    num-pads: Int
    num-rows: Int
    row-offset: Int

  • col-offset: Int

  • num-pads: Int

  • num-rows: Int

  • row-offset: Int

Example for 2-column grid:

    1    2
    3    4
    5    6
    ...

Functions

Row-Major-Numbering

public defn Row-Major-Numbering (num-pads:Int, num-rows:Int -- row-offset:Int = ?, col-offset:Int = ?) -> Row-Major-Numbering

  • Returns Row-Major-Numbering

C-A-Numbering

Cathode/Anode Numbering Scheme

public deftype C-A-Numbering <: Numbering

This numbering scheme is used for any two-pin component with polarity. This allows us to differentiate the positive (anode, a) from the negative (cathode, c) terminals.

Functions

C-A-Numbering

public defn C-A-Numbering () -> C-A-Numbering

  • Returns C-A-Numbering

LookupTableNumbering

Lookup Table Based Numbering Scheme

public defstruct LookupTableNumbering <: Numbering :
    lookup: Tuple<Tuple<Int|Ref>>

  • lookup: Tuple<Tuple<Int|Ref>> - Lookup Table for Converting (Rows, Columns) -> Int|Ref This table is assumed to be in Row major order.

This numbering scheme to support patterns that are not easily programmatic or more random.

val lead-scheme = LookupTableNumbering(
    lookup = [
    [2, 1]
    [3, 4]
  ]
)
  • Typically, the lookup tables would be

    regular, ie each row would be the same length. But nothing prevents an irregular grid where the rows are not all the same length.

Functions

LookupTableNumbering

public defn LookupTableNumbering (lookup:Tuple<Tuple<Int|Ref>>) -> LookupTableNumbering

  • Returns LookupTableNumbering

Uneven-Column-Major-Numbering

Uneven (Asymmetric) Column Major Numbering

public defstruct Uneven-Column-Major-Numbering <: Numbering :
    columns: Tuple<Int>

  • columns: Tuple<Int>

This provides a mechanism to create a column major numbering scheme where each column may not have the exact same number of rows.

Constructors

Uneven-Column-Major-Numbering

Constructor for defstruct Uneven-Column-Major-Numbering

public defn Uneven-Column-Major-Numbering (columns:Tuple<Int>)

Functions

Uneven-Column-Major-Numbering

Construct an Uneven Column Structure for Quad Packages

public defn Uneven-Column-Major-Numbering (x-count:Int, y-count:Int) -> Uneven-Column-Major-Numbering

  • x-count: Int - Number of leads on the E/W sides of the package
  • y-count: Int - Number of leads on the N/S side of the package.
  • Returns Uneven-Column-Major-Numbering

This will construct a asymmetric column major numbering that expects (2 * x-count) + (2 * y-count) total unique leads in the package.

get-total-pads

public defn get-total-pads (x:Uneven-Column-Major-Numbering) -> Int

  • Returns Int

Numbering

Numbering Scheme for a Set of Pads

public deftype Numbering

The landpattern generators typically use a 2D grid to generate the pads related to a component. This grid is a zero-index row and column setup.

  • For DIP style components (SOP, SOIC, DFN/SON, etc ), there are typically 2 columns and N / 2 rows (where N is the number of pins).
  • For Quad style components (QFP, QFN, etc), there are typically 4 columns and N / 4 rows (where N is the number of pins).
  • For BGA style components, there are typically N pins and X columns by Y rows where X * Y = N (for a Full Matrix). This is only an example to demonstrate the typical row and column configurations. More complex arrangements are possible.

Note that this numbering scheme does not consider the exposed thermal lead/pad to be part of the pin numbering sequence.

Multis

to-pad-id

Convert the row and column indices into a pad number or reference

public defmulti to-pad-id (x:Numbering, row:Int, column:Int) -> Int|Ref

  • x: Numbering - Self
  • row: Int - Zero-based row offset into the pad grid
  • column: Int - Zero-based column offset into the pad grid.
  • Returns Int|Ref - Either an Int or a Ref that determines the pad identifier or name.

Column-Major-Numbering

Column Major Pad Numbering

public defstruct Column-Major-Numbering <: Numbering :
    col-offset: Int
    col-skip: Int
    num-columns: Int
    num-pads: Int
    row-offset: Int
    row-skip: Int

  • col-offset: Int

  • col-skip: Int

  • num-columns: Int

  • num-pads: Int

  • row-offset: Int

  • row-skip: Int

Example for 2-column grid:

  1   5
  2   6
  3   7
  4   8

Functions

Column-Major-Numbering

public defn Column-Major-Numbering (num-pads:Int, num-columns:Int -- row-offset:Int = ?, col-offset:Int = ?, col-skip:Int = ?, row-skip:Int = ?) -> Column-Major-Numbering

  • Returns Column-Major-Numbering

General Definitions

DEF-ROW-OMITS

public val DEF-ROW-OMITS

Related Packages

Forwarded by packages: jsl/landpatterns/framework, jsl/landpatterns