jsl/landpatterns/thermal-vias¶
Package name: jsl/landpatterns/thermal-vias
Thermal Via Grid Generator
This package contains the interface definition for the thermal via grid generator. The idea is that this code is used to construct a via pattern inside a QFN or QFP style package with a thermal lead on the bottom that typically ties to ground. Many times the datasheet may suggest a particular grid pattern or you want need to specify your own pattern to meet your application's requirments.
Grid Example¶
public inst netsw : ethernet_io_lib/components/KSZ9563/module
val tv-g = GridThermalVias(
via-def = therm-via,
grid-def = GridPlanner(
pitch = 1.2,
columns = 6,
rows = 6
)
)
make-via-grid(tv-g, netsw.C.PAD, GND)
TODO -- Add image here showing the constructed planner.
The therm-via
is a reference to a pcb-via
definition. Typically these
vias will need to have via-in-pad = true
. Depending on your fabrication
technology, you may need filled = true
as well.
Summary¶
Data Types¶
ThermalVias¶
Thermal Via Interface
Multis¶
Function | Description |
---|---|
active? | Check if this via grid location is active. |
make-thermal-vias | Generator for creating the thermal vias |
via-def | Via Definition for Populating the Thermal Via Grid. |
Functions¶
Function | Description |
---|---|
create-via-grid-module | Construct a module Instantiable to encapsulate the a thermal via grid. |
make-via-grid | Generate the Via Grid Instance and place it relative to the Component |
GridThermalVias¶
Manual Grid of Thermal Vias
Constructors¶
Function | Description |
---|---|
GridThermalVias (+ 1) | Constructor for defstruct GridThermalVias |
Definitions¶
ThermalVias¶
Thermal Via Interface
public deftype ThermalVias
This interface outlines the functions needed to create a thermal via
grid. The idea is that the make-thermal-vias
function gets called
as a generator inside a pcb-module
definition and targets one of
the pads of a component instantiated in that module.
Multis¶
active?¶
Check if this via grid location is active.
public defmulti active? (x:ThermalVias, row:Int, column:Int) -> True|False
x: ThermalVias
- ThermaVias (self)row: Int
- Zero-based Index into the grid of a via positions.column: Int
- Zero-based Index into the grid of a via positions.- Returns
True|False
- Thermal Via location is Active.
In this context, active
means that there should be a via
at this location. inactive
means that no via should be
placed at this location.
make-thermal-vias¶
Generator for creating the thermal vias
public defmulti make-thermal-vias (tv:ThermalVias, pt:PortInfo -- via-net?:JITXObject = ?) -> False
tv: ThermalVias
- The Thermal Via typept: PortInfo
- PortInfo for a port on apcb-component
which we will inspect for net and pad features. This cannot be apcb-module
port. Note that this a distillation of the portJITXObject
into features of that port because of limitations on how / whereJITXObject
port objects can be used. For example, you can't use the port from componentA
defined in moduleB
in the creation of a new moduleC
.via-net?: JITXObject
- Optional Net argument that we can use to manually set the net that the created vias will be part of. This is primarily to work around issues with module and component hierarchy. It is the user's responsibility to verify that this net and the net of the port will resolve to the same net when flattened.- Returns
False
This function is intended to be called from a pcb-module
context.
via-def¶
Via Definition for Populating the Thermal Via Grid.
public defmulti via-def (tv:ThermalVias) -> Via
- Returns
Via
Functions¶
create-via-grid-module¶
Construct a module Instantiable to encapsulate the a thermal via grid.
public defn create-via-grid-module (tv:ThermalVias, pt-info:PortInfo) -> Instantiable
tv: ThermalVias
- Thermal Via definitionpt-info: PortInfo
- PortInfo for a port of the component that contains the pad that the via grid will be applied to. Note that, we explicitly do not pass theJITXObject
here to prevent a misuse of thepcb-module
construction.- Returns
Instantiable
-pcb-module
definition with a single portvia-conn
that must be connected to the samenet
as the originating port that constructed thept
PortInfo.
This is a useful tool for construct a via grid inside a module. This module
can then be instantiated and placed with respect to a component. This is a
convenient way to lock the via grid relative to a component position without
needing to use place
on the component instance.
make-via-grid¶
Generate the Via Grid Instance and place it relative to the Component
public defn make-via-grid (tv:ThermalVias, pt:JITXObject -- offset:Pose = ?)
tv: ThermalVias
- Thermal Via Definitionpt: JITXObject
- Port on a component whose pad the thermal via grid will live on.offset: Pose
- Optional offset to place the grid with respect to the component
GridThermalVias¶
Manual Grid of Thermal Vias
public defstruct GridThermalVias <: ThermalVias
grid-def: GridPlanner
grid-def: GridPlanner
- Grid Generator This type defines the shape and construction of the grid and provides the pose locations for each via.
This type is used to manually construct a grid of vias for a component. It does not leverage the pad shape for optimization.
Example Grid¶
pcb-module circuit:
...
val tv-g = GridThermalVias(
via-def = therm-via,
grid-def = GridPlanner(
pitch = 1.2,
columns = 6,
rows = 6
)
)
make-thermal-vias(tv-g, netsw.C.PAD)
-
Note that these functions must be called within a pcb-module
-
This generates a
geom
statement with childvia
statementsfor the grid.