Quad Package Generator¶
Package name: jsl/landpatterns/quad
Generate landpatterns for packages with pins on 4-sides
This package contains a general purpose generator for creating square/rectangular packages that have pins along the 4 external edges of the package shape.
The generators defined here are parameterized to support multiple different types of packages.
TODO - add diagram here of the package - Explain west, south, east, north with respect to the diagram.
Summary¶
Data Types¶
Quad-Package¶
Base Quad Package Definition
Constructors¶
Function | Description |
---|---|
Quad-Package | Constructor for defstruct Quad-Package |
QuadGridPlanner¶
Quad Grid Planner
Functions¶
Function | Description |
---|---|
QuadGridPlanner | Constructor for the Quad Grid Planner |
get-params | Retrieve the appropriate lead profile parameters depending on column |
Quad-Lead-Profile¶
Quad Package Lead Span Definition
Functions¶
Function | Description |
---|---|
select-quad-numbering | Select Numbering Scheme for QFN lead configuration |
Quad-Lead-Profile (+ 3) | Construct a Quad-Lead Profile |
General Definitions¶
Variable | Description |
---|---|
QUAD-NUM-COLUMNS |
Definitions¶
Quad-Package¶
Base Quad Package Definition
public defstruct Quad-Package <: Package
lead-profile: Quad-Lead-Profile
thermal-lead?: False|Shape|ThermalPad
-
lead-profile: Quad-Lead-Profile
- Lead Profiles for All Edges of the Quad Package -
thermal-lead?: False|Shape|ThermalPad
- Optional thermal lead for the package.
The user is expected to inherit from this base implementation to create various quad packages like QFN, QFP, etc.
Constructors¶
Quad-Package¶
Constructor for defstruct Quad-Package
public defn Quad-Package ( -- num-leads:Int, lead-profile:Quad-Lead-Profile, thermal-lead?:False|Shape|ThermalPad, package-body:PackageBody, pad-planner:PadPlanner = ?, lead-numbering:Numbering = ?, density-level:DensityLevel = ?)
QuadGridPlanner¶
Quad Grid Planner
public defstruct QuadGridPlanner <: GridPlanner
param-sets: [Lead-Profile-Params, Lead-Profile-Params]
row-sets: Int|Tuple<Int>
-
param-sets: [Lead-Profile-Params, Lead-Profile-Params]
- Lead Profile Parameter Sets The quad package is assumed to support different Lead-Profiles on the Y-span (-X and +X column) and X-span (-Y and +Y columns). This value is expected to consist of the lead params in the following order: [Y-span, X-span] -
row-sets: Int|Tuple<Int>
- Row Sets for the columns of the grid. This value can optionally be a single number of rows which is applied to all columns. This is the most common for regular square quad packages. This value can also be aTuple
of integers identifying unique numbers of rows per column. This is most useful for rectangular quad packages with uneven numbers of pads on each lead span.
This grid planner supports Quad Package components like QFN, QFP, etc
The idea is that this constructs a 4-Column grid where:
1. Column 0 is in -X
half plane and orders ascending for +Y to -Y
2. Column 1 is in the -Y
half-plane and is rotated 90 degrees
3. Column 2 is in the +X
half plane and is rotated 180 degrees
4. Column 3 is in the +Y
half-plane and is rotated 270 degrees
This creates the typical numbering scheme for ICs:
Left-Row Col 0 Col 2 Right-Row
Col 3 -> 16 15 14 13
0 1 12 3
1 2 11 2
2 3 10 1
3 4 9 0
Col 1 -> 5 6 7 8
Notice that the row indices are directed down the edge of the package and result in the same flipped on the left and right side pattern as in a dual-package.
Functions¶
QuadGridPlanner¶
Constructor for the Quad Grid Planner
public defn QuadGridPlanner ( -- param-sets:[Lead-Profile-Params, Lead-Profile-Params], row-sets:Int|Tuple<Int>) -> QuadGridPlanner
- Returns
QuadGridPlanner
get-params¶
Retrieve the appropriate lead profile parameters depending on column
public defn get-params (g:QuadGridPlanner, c:Int) -> Lead-Profile-Params
c: Int
- Column index as a zero-indexed value.- Returns
Lead-Profile-Params
Quad-Lead-Profile¶
Quad Package Lead Span Definition
public defstruct Quad-Lead-Profile <: Equalable & Hashable
x-count: Maybe<Int>
x-leads: Lead-Profile
y-count: Maybe<Int>
y-leads: Lead-Profile
-
x-count: Maybe<Int>
-
x-leads: Lead-Profile
-
y-count: Maybe<Int>
-
y-leads: Lead-Profile
This is a tool for defining the Lead-Profile
for the
leads on the E/W (X) Edges and the N/S (Y) Edges of the
quad package component.
This type allows the user to optionally select the
number of pins on either the X edges, the Y edges,
or on both. These numbers must still be consistent
with the num-leads
parameter of the package.
See select-quad-numbering for more information.
Functions¶
select-quad-numbering¶
Select Numbering Scheme for QFN lead configuration
public defn select-quad-numbering (num-leads:Int, pf:Quad-Lead-Profile) -> Numbering
num-leads: Int
- Total number of leads in the desired package (not including thermal)- Returns
Numbering
- Throws
ValueError
- If the lead configurations are invalid - such as one side having less than or equal to 0 leads.
For standard square QFN packages, the Column-Major-Numbering
is sufficient to enumerate the pad ids for a QFN. This gets selected if
x-count
and y-count
are both None
.
For non-standard QFNs that have uneven numbers of leads of each side we must use a different numbering scheme. This function will use the configuration in the Quad-Lead-Profile to generate an appropriate Uneven-Column-Major-Numbering for the asymmetric pin edges of a non-standard QFN.
If x-count
is an Int
and y-count
is None - then we will attempt to use the
num-leads
value to solve for what y-count
should be assuming the N/S edge of
leads is equal on either side. Vice versa if x-count
is None
and y-count
is an
Int
.
Quad-Lead-Profile¶
Construct a Quad-Lead Profile
public defn Quad-Lead-Profile ( -- x-span:Toleranced, x-pitch:Double, x-lead:SMT-Lead, y-span:Toleranced, y-pitch:Double, y-lead:SMT-Lead, x-count:Int = ?, y-count:Int = ?) -> Quad-Lead-Profile
x-span: Toleranced
- Center to center distance between the X-dimension leads in mm.x-pitch: Double
- Center to center distance between leads in mm.x-lead: SMT-Lead
- Lead Configuration data for generating the pad of the X leadsy-span: Toleranced
- Center to center distance between the Y-dimension leads in mm.y-pitch: Double
- Center to center distance between leads in mm.y-lead: SMT-Lead
- Lead Configuration data for generating the pad of the Y leadsx-count: Int
- Number of leads for the X-dimension leads. This is the number of leads on the E/W sides of the quad package. If this value is not provided, then we will attempt to guess based on other parameters.y-count: Int
- Number of leads for the Y-dimension leads. This is the number of leads on the N/S sides of the quad package. If this value is not provided, then we will attempt to guess based on other parameters.- Returns
Quad-Lead-Profile
The quad-lead profile allows the user to optionally select different lead-span configurations for the X leads vs the Y leads.
The X leads are the dual row of pads that straddle the Y axis. The Y leads are the dual row of pads that straddle the X axis.
Quad-Lead-Profile¶
public defn Quad-Lead-Profile ( -- span:Toleranced, pitch:Double, lead:SMT-Lead) -> Quad-Lead-Profile
- Returns
Quad-Lead-Profile
Quad-Lead-Profile¶
Construct a Quad Profile from two separate Lead-Profile
objects.
public defn Quad-Lead-Profile ( -- x-leads:Lead-Profile, y-leads:Lead-Profile, x-count:Int = ?, y-count:Int = ?) -> Quad-Lead-Profile
x-leads: Lead-Profile
- Lead Profile for the X leads (E/W edges)y-leads: Lead-Profile
- Lead Profile for the Y leads (N/S edges)x-count: Int
- Number of leads for the X-dimension leads. This is the number of leads on the E/W sides of the quad package. If this value is not provided, then we will attempt to guess based on other parameters.y-count: Int
- Number of leads for the Y-dimension leads. This is the number of leads on the N/S sides of the quad package. If this value is not provided, then we will attempt to guess based on other parameters.- Returns
Quad-Lead-Profile
Quad-Lead-Profile¶
Construct a symmetric quad lead profile from a given Lead-Profile
object
public defn Quad-Lead-Profile ( -- profile:Lead-Profile) -> Quad-Lead-Profile
profile: Lead-Profile
- Lead Profile to apply to all edges of the quad package.- Returns
Quad-Lead-Profile
General Definitions¶
QUAD-NUM-COLUMNS¶
public val QUAD-NUM-COLUMNS
Related Packages¶
Forwarded by packages: jsl/landpatterns/framework, jsl/landpatterns