jsl/via-structures¶
Package name: jsl/via-structures
Summary¶
Data Types¶
ViaStructureDef¶
Via Structure Definition Interface
Multis¶
Functions¶
Function | Description |
---|---|
add-std-insertion-points | Add two insertion points, at (0.0, +R) pointed UP and (0.0, -R) pointed DOWN |
ViaSignalType¶
Via Signal Identifier Enum
Multis¶
Function | Description |
---|---|
signal-type |
AntiPad¶
AntiPad Definition Interface
Multis¶
Function | Description |
---|---|
anti-pads | |
add-anti-pad | |
make-anti-pad | Generator for an AntiPad Definition |
Functions¶
Function | Description |
---|---|
DifferentialViaStructure | Constructor for the Differential Pair Via Structure |
SingleViaStructure | Constructor for Single-Ended Via Structure Definitions |
ViaGroundCage¶
Via Ground Cage Interface
Multis¶
Function | Description |
---|---|
ground-cages | |
make-ground-cage | Generator for the Ground Cage |
add-ground-cage | |
via-def |
Functions¶
Function | Description |
---|---|
DifferentialViaStructure | Constructor for the Differential Pair Via Structure |
SingleViaStructure | Constructor for Single-Ended Via Structure Definitions |
PolarViaGroundCage¶
Polar Via Ground Cage
Functions¶
Function | Description |
---|---|
PolarViaGroundCage | Polar Via Ground Cage Constructor |
InvalidLayerIndicesError¶
Exception for Invalid LayerIndex Configurations
Constructors¶
Function | Description |
---|---|
InvalidLayerIndicesError | Constructor for defstruct InvalidLayerIndicesError |
InvalidSkipIndexError¶
Exception for Invalid skips
array in ViaGroundCage
Constructors¶
Function | Description |
---|---|
InvalidSkipIndexError | Constructor for defstruct InvalidSkipIndexError |
SingleViaStructure¶
Single-Ended Via Structure Definition
Functions¶
Function | Description |
---|---|
SingleViaStructure | Constructor for Single-Ended Via Structure Definitions |
SimpleAntiPad¶
Simple Anti-Pad Definition
Functions¶
Function | Description |
---|---|
SimpleAntiPad | Simple AntiPad Constructor |
General Definitions¶
Function | Description |
---|---|
set-via-structure-debug-mode | Enable or Disable debug mode for Via Structures |
topo-via-pin | |
create-insertion-point-shape | Create the shape placed at each insertion point. |
is-via-structure-debug-mode? | Query the state of debug mode for via structures. |
Definitions¶
ViaStructureDef¶
Via Structure Definition Interface
public deftype ViaStructureDef
This type defines the common interfaces for defining a Via Structure Generator.
Multis¶
make-insertion-points¶
public defmulti make-insertion-points (v:ViaStructureDef -- pose:Pose) -> False
- Returns
False
insertion-points¶
public defmulti insertion-points (v:ViaStructureDef) -> Vector<Pose>
- Returns
Vector<Pose>
create-via-structure¶
public defmulti create-via-structure (v:ViaStructureDef -- pose:Pose = ?) -> Instantiable
- Returns
Instantiable
add-insertion-point¶
public defmulti add-insertion-point (v:ViaStructureDef, a:Pose) -> False
- Returns
False
name¶
public defmulti name (v:ViaStructureDef) -> String
- Returns
String
anti-pads¶
public defmulti anti-pads (v:ViaStructureDef) -> Vector<AntiPad>
- Returns
Vector<AntiPad>
make-anti-pads¶
public defmulti make-anti-pads (v:ViaStructureDef -- pose:Pose) -> False
- Returns
False
ground-cages¶
public defmulti ground-cages (v:ViaStructureDef) -> Vector<ViaGroundCage>
- Returns
Vector<ViaGroundCage>
add-anti-pad¶
public defmulti add-anti-pad (v:ViaStructureDef, a:AntiPad) -> False
- Returns
False
make-via-structure¶
public defmulti make-via-structure (v:ViaStructureDef -- pose:Pose = ?) -> False
- Returns
False
add-ground-cage¶
public defmulti add-ground-cage (v:ViaStructureDef, cage:ViaGroundCage) -> False
- Returns
False
signal-type¶
public defmulti signal-type (v:ViaStructureDef) -> ViaSignalType
- Returns
ViaSignalType
Functions¶
add-std-insertion-points¶
Add two insertion points, at (0.0, +R) pointed UP and (0.0, -R) pointed DOWN
public defn add-std-insertion-points (v:ViaStructureDef, radius:Double) -> False
- Returns
False
ViaSignalType¶
Via Signal Identifier Enum
public defenum ViaSignalType <: Equalable & Hashable
-
Via-Single-Ended
-
Via-Differential
This type distinguishes between single-ended and differential via structures.
Multis¶
signal-type¶
public defmulti signal-type (v:ViaStructureDef) -> ViaSignalType
- Returns
ViaSignalType
AntiPad¶
AntiPad Definition Interface
public deftype AntiPad
An anti-pad is a ForbidCopper
region in the via structure to
prevent the ground plane or other nets from interfering with the
signal characteristics of the via structure.
Multis¶
anti-pads¶
public defmulti anti-pads (v:ViaStructureDef) -> Vector<AntiPad>
- Returns
Vector<AntiPad>
add-anti-pad¶
public defmulti add-anti-pad (v:ViaStructureDef, a:AntiPad) -> False
- Returns
False
make-anti-pad¶
Generator for an AntiPad Definition
public defmulti make-anti-pad (a:AntiPad -- pose:Pose) -> False
a: AntiPad
- this AntiPadpose: Pose
- Offset in the module's coordinate frame. This value is typicallyloc(0.0, 0.0)
.- Returns
False
This function will construct the layer()
statements for the
forbid copper (keepout) regions of the via structure.
Functions¶
DifferentialViaStructure¶
Constructor for the Differential Pair Via Structure
public defn DifferentialViaStructure ( -- name:String, via-def:Via|[Via, Via], pitch:Double, ground-cages:Collection<ViaGroundCage> = ?, anti-pads:Collection<AntiPad> = ?, insertion-points:Collection<Pose> = ?) -> DifferentialViaStructure
name: String
- Unique name for this via structure module definitionvia-def: Via|[Via, Via]
- Defines what vias will be used for the P/N signals. If this parameter is a singleVia
definition, then that definition will be used for both theP
and theN
signals. If a[Via, Via]
argument is provided, then the firstVia
is for theP
signal and the secondVia
is for theN
signal.pitch: Double
- Distance between the P / N signal vias.ground-cages: Collection<ViaGroundCage>
- Optional explicit collection of ground cages. Default is[]
. User can use the add-ground-cage function to add ground cages after creation.anti-pads: Collection<AntiPad>
- Optional explicit collection of anti-pads. Default is[]
. User can use the add-anti-pad function to add anti-pads after creation.insertion-points: Collection<Pose>
- Optional explicit collection of insertion-points. Default is[]
. User can use the add-insertion-point function to add insertion points after creation.- Returns
DifferentialViaStructure
SingleViaStructure¶
Constructor for Single-Ended Via Structure Definitions
public defn SingleViaStructure ( -- name:String, via-def:Via, ground-cages:Collection<ViaGroundCage> = ?, anti-pads:Collection<AntiPad> = ?, insertion-points:Collection<Pose> = ?) -> SingleViaStructure
name: String
- Unique name for this via structurevia-def: Via
- Via definition used for the signal viaground-cages: Collection<ViaGroundCage>
- Optional explicit collection of ground cages. Default is[]
. User can use the add-ground-cage function to add ground cages after creation.anti-pads: Collection<AntiPad>
- Optional explicit collection of anti-pads. Default is[]
. User can use the add-anti-pad function to add anti-pads after creation.insertion-points: Collection<Pose>
- Optional explicit collection of insertion-points. Default is[]
. User can use the add-insertion-point function to add insertion points after creation.- Returns
SingleViaStructure
ViaGroundCage¶
Via Ground Cage Interface
public deftype ViaGroundCage
The Via Ground Cage is the return signal path for the signal going through the central via. This type provides the method for defining different configurations of this ground cage.
Multis¶
ground-cages¶
public defmulti ground-cages (v:ViaStructureDef) -> Vector<ViaGroundCage>
- Returns
Vector<ViaGroundCage>
make-ground-cage¶
Generator for the Ground Cage
public defmulti make-ground-cage (v:ViaGroundCage, n:JITXObject -- pose:Pose) -> False
v: ViaGroundCage
- This objectn: JITXObject
- Anet
object for which ageom
statement will be constructed.pose: Pose
- Offset in the module's coordinate frame at which to place the vias. Typically this isloc(0.0, 0.0)
indicating no offset.- Returns
False
This function must be called from within a pcb-module
context.
This function will generate the necessary vias that surround the central vias of the via structure.
add-ground-cage¶
public defmulti add-ground-cage (v:ViaStructureDef, cage:ViaGroundCage) -> False
- Returns
False
via-def¶
public defmulti via-def (v:ViaGroundCage) -> Via
- Returns
Via
Functions¶
DifferentialViaStructure¶
Constructor for the Differential Pair Via Structure
public defn DifferentialViaStructure ( -- name:String, via-def:Via|[Via, Via], pitch:Double, ground-cages:Collection<ViaGroundCage> = ?, anti-pads:Collection<AntiPad> = ?, insertion-points:Collection<Pose> = ?) -> DifferentialViaStructure
name: String
- Unique name for this via structure module definitionvia-def: Via|[Via, Via]
- Defines what vias will be used for the P/N signals. If this parameter is a singleVia
definition, then that definition will be used for both theP
and theN
signals. If a[Via, Via]
argument is provided, then the firstVia
is for theP
signal and the secondVia
is for theN
signal.pitch: Double
- Distance between the P / N signal vias.ground-cages: Collection<ViaGroundCage>
- Optional explicit collection of ground cages. Default is[]
. User can use the add-ground-cage function to add ground cages after creation.anti-pads: Collection<AntiPad>
- Optional explicit collection of anti-pads. Default is[]
. User can use the add-anti-pad function to add anti-pads after creation.insertion-points: Collection<Pose>
- Optional explicit collection of insertion-points. Default is[]
. User can use the add-insertion-point function to add insertion points after creation.- Returns
DifferentialViaStructure
SingleViaStructure¶
Constructor for Single-Ended Via Structure Definitions
public defn SingleViaStructure ( -- name:String, via-def:Via, ground-cages:Collection<ViaGroundCage> = ?, anti-pads:Collection<AntiPad> = ?, insertion-points:Collection<Pose> = ?) -> SingleViaStructure
name: String
- Unique name for this via structurevia-def: Via
- Via definition used for the signal viaground-cages: Collection<ViaGroundCage>
- Optional explicit collection of ground cages. Default is[]
. User can use the add-ground-cage function to add ground cages after creation.anti-pads: Collection<AntiPad>
- Optional explicit collection of anti-pads. Default is[]
. User can use the add-anti-pad function to add anti-pads after creation.insertion-points: Collection<Pose>
- Optional explicit collection of insertion-points. Default is[]
. User can use the add-insertion-point function to add insertion points after creation.- Returns
SingleViaStructure
PolarViaGroundCage¶
Polar Via Ground Cage
public defstruct PolarViaGroundCage <: ViaGroundCage :
count: Int
radius: Double
skips: Collection<Int>
theta: Double
-
count: Int
- Total number of via placements. Must be positive. -
radius: Double
- Radius in mm for the circular pattern of via placements. Must be positive. -
skips: Collection<Int>
- Skipped indices in the via pattern. Each value in this collection must be in the range[0, count-1]
-
theta: Double
- Starting angle for the pattern. Value in degrees.
This an implementation of the ViaGroundCage
that places
vias in polar space at a particular radius around the signal
vias at the center of the via structure.
TODO - Diagram Here
Vias start at index 0 which is placed at (radius, 0.0). Vias 1 to N-1
are
then place in a counter-clock wise pattern at radius
from the origin in increments
of 2 * PI / count
radians.
The theta
parameter can provide an initial angle offset in degrees. A positive value
advances the angle such that Via 0 starts at (radius, theta * PI / 180.0)
The skips
argument provides a means of depopulating particular via indices depending
on what structure the user wants to build. This collection will contain 0 or more
zero-based indices for via locations.
Functions¶
PolarViaGroundCage¶
Polar Via Ground Cage Constructor
public defn PolarViaGroundCage ( -- via-def:Via, count:Int, radius:Double, theta-deg:Double = ?, skips:Collection<Int> = ?) -> PolarViaGroundCage
via-def: Via
- Via to use for all via placementscount: Int
- Number of via placementsradius: Double
- Radius in mm of the via placement arc.theta-deg: Double
- Initial angle in degrees. Default value is 0.0skips: Collection<Int>
- Collection of via placement indices to skip. Default value is[]
which implies no placements are skipped.- Returns
PolarViaGroundCage
InvalidLayerIndicesError¶
Exception for Invalid LayerIndex Configurations
public defstruct InvalidLayerIndicesError <: Exception :
msg: String|Printable
msg: String|Printable
Constructors¶
InvalidLayerIndicesError¶
Constructor for defstruct InvalidLayerIndicesError
public defn InvalidLayerIndicesError (msg:String|Printable)
InvalidSkipIndexError¶
Exception for Invalid skips
array in ViaGroundCage
public defstruct InvalidSkipIndexError <: Exception :
msg: String|Printable
msg: String|Printable
Constructors¶
InvalidSkipIndexError¶
Constructor for defstruct InvalidSkipIndexError
public defn InvalidSkipIndexError (msg:String|Printable)
SingleViaStructure¶
Single-Ended Via Structure Definition
public defstruct SingleViaStructure <: ViaStructureDef :
via-def: Via
via-def: Via
This type is used to create a single-ended via structure generator.
Functions¶
SingleViaStructure¶
Constructor for Single-Ended Via Structure Definitions
public defn SingleViaStructure ( -- name:String, via-def:Via, ground-cages:Collection<ViaGroundCage> = ?, anti-pads:Collection<AntiPad> = ?, insertion-points:Collection<Pose> = ?) -> SingleViaStructure
name: String
- Unique name for this via structurevia-def: Via
- Via definition used for the signal viaground-cages: Collection<ViaGroundCage>
- Optional explicit collection of ground cages. Default is[]
. User can use the add-ground-cage function to add ground cages after creation.anti-pads: Collection<AntiPad>
- Optional explicit collection of anti-pads. Default is[]
. User can use the add-anti-pad function to add anti-pads after creation.insertion-points: Collection<Pose>
- Optional explicit collection of insertion-points. Default is[]
. User can use the add-insertion-point function to add insertion points after creation.- Returns
SingleViaStructure
SimpleAntiPad¶
Simple Anti-Pad Definition
public defstruct SimpleAntiPad <: AntiPad :
end: LayerIndex
shape: Shape
start: LayerIndex
-
end: LayerIndex
-
shape: Shape
- Shape of the constructed anti-pad region. This shape is applied to all of the layerstart
throughend
-
start: LayerIndex
This type implements the AntiPad
interface and provides a
simple shape based antipad on one or more layers.
The start
and end
layers are inclusive - so the specified shape
will be applied on all layers start
through end
. The start
and
end
layers follow the same behavior as ForbidCopper
.
Functions¶
SimpleAntiPad¶
Simple AntiPad Constructor
public defn SimpleAntiPad ( -- shape:Shape, start:LayerIndex, end:LayerIndex = ?) -> SimpleAntiPad
shape: Shape
- Forbid Region Shape for all applicable layersstart: LayerIndex
- Starting layer for the antipadend: LayerIndex
- Optional end layer for the antipad. If not provide, the default behavior is that the antipad will only be created on the start layer.- Returns
SimpleAntiPad
General Definitions¶
set-via-structure-debug-mode¶
Enable or Disable debug mode for Via Structures
public defn set-via-structure-debug-mode (x:True|False) -> False
x: True|False
- true = enable, false = disable- Returns
False
topo-via-pin¶
public pcb-component topo-via-pin (name:Symbol)
create-insertion-point-shape¶
Create the shape placed at each insertion point.
public defn create-insertion-point-shape (radius:Double = ?) -> Shape
- Returns
Shape
This shape will generally be placed in the custom fab layers as an indicator of where control points and insertion points are expected to be place.
This function creates a shape that consists of an arrow pointing
in the positive Y direction starting from the origin at 0,0.
It also constructs an arc around the origin at radius
.
TODO - Diagram
is-via-structure-debug-mode?¶
Query the state of debug mode for via structures.
public defn is-via-structure-debug-mode? () -> True|False
- Returns
True|False