jsl/si/pairs¶
Package name: jsl/si/pairs
Differential Pair Topologies
This package contains the implementation of tools for working with diff-pair, dual-pair, and lane-pair types.
The idea is that differential pairs are a common transmission line pattern in most high speed designs. These package aims to make working with these structures easier.
Summary¶
LaneConstraint¶
Lane-Pair Constraint
Functions¶
Function | Description |
---|---|
LaneConstraint (+ 1) | Construct a Lane Constraint with a universal constraint for both Tx/Rx pairs. |
General Definitions¶
Function | Description |
---|---|
topo-pair | Construct a chained topology of diff-pair objects including ports, components and modules. |
incrementing_symbol_id | Default symbol incrementing behavior for topo-pair |
reverse-lane | Construct an in-place swap of the TX/RX pairs of a lane-pair bundle |
Definitions¶
LaneConstraint¶
Lane-Pair Constraint
public defstruct LaneConstraint <: SI-Constraint :
pair-cst: SI-Constraint|[SI-Constraint, SI-Constraint]
-
pair-cst: SI-Constraint|[SI-Constraint, SI-Constraint]
- Defines the constraint used for the lanes. User can either provide a single constraint object that will be applied to both theTX
andRX
pairs or separate constraint objects for each.In the tuple variant, the order is important and the constraints are ordered
[TX, RX]
This type is used to define the SI-Constraints
for a lane-pair
bundle, typically used for
things like USB3 SuperSpeed lanes, 10G ethernet
lanes, etc.
Functions¶
LaneConstraint¶
Construct a Lane Constraint with a universal constraint for both Tx/Rx pairs.
public defn LaneConstraint (single:SI-Constraint) -> LaneConstraint
- Returns
LaneConstraint
LaneConstraint¶
Construct a Lane Constraint with separate Constraints for Each Tx/Rx pair
public defn LaneConstraint (tx:SI-Constraint, rx:SI-Constraint) -> LaneConstraint
- Returns
LaneConstraint
General Definitions¶
topo-pair¶
Construct a chained topology of diff-pair objects including ports, components and modules.
public defn topo-pair (pair:KeyValue<JITXObject, JITXObject|KeyValue>, index:Int = ? -- name:String|Printable|False = ?, make-symb-name:False|(String, Int) -> String = ?)
pair: KeyValue<JITXObject, JITXObject|KeyValue>
- Sequence of ports and instances that make up this topology implemented as cascadingKeyValue
objects. Use the=>
operator. Don't use()
inside a chain. For example, useA => B => C => D
notA => (B => C) => D
index: Int
- Internal value needed for the recursive naming. Default is 1. You will not typically need to provide this value.name: String|Printable|False
- Name for all nets or a Base name for constructing subsequent net names. Ifmake-symb-name
isfalse
then this name will be applied to all nets. If there are separate connections, then the JITX runtime will give these nets[N]
suffices whereN
is an integer and increments for every separate connection that has the same net name. Ifmake-symb-name
is notfalse
, then this is the base name and will be passed as the first argument tomake-symb-name
to construct the net names for each of the topology segments created by this function.make-symb-name: False|(String, Int) -> String
- Optional Function that convertsname
and theindex
into a net name for a topology segment.index
is increment at every level of recursion so that we can create unique names. If this value isfalse
, then no unique names are created andname
is used explicitly.
This function is a generator and must be called from within a pcb-module
context.
This function accepts a sequence of KeyValue
JITXObjects. Each key or value may be:
- Bundle port instance -
diff-pair
,dual-pair
orlane-pair
- An
Instance
- ie an instance of apcb-module
orpcb-component
- Another
KeyValue
(typically only in thevalue
). Currently does not handleKeyValue
as thekey
If we encounter an instance - then we will use a require
statement to extract
out the diff-pair interfaces needed to construct our chained topology of
diff-pairs.
This function is recursive. Hence, the KeyValue
sequence should not include a cycle.
The first and last elements of the chained topology are expected to be ports of
type diff-pair
. Any other type of bundle is an error.
inst ESD : ESD-protector
inst block-cap : dp-coupler(...)
topo-pair(src => block-cap => ESD => dst)
-
These components provide
supports
statements for eitherdual-pair
orlane-pair
-
Notice that the topology chain references the components directly.
topo-pair
will use
require
statements to extract out the necessary interfaces and create topology connections.
incrementing_symbol_id¶
Default symbol incrementing behavior for topo-pair
public defn incrementing_symbol_id (base:String, id:Int) -> String
base: String
- Base name for the created topo-netsid: Int
- counter index into the number of segments- Returns
String
- Symbol name for the topo-net segment.
When a topology is separated into separate segments, this function will create new names with the following pattern:
<BASE>-<ID>
reverse-lane¶
Construct an in-place swap of the TX/RX pairs of a lane-pair
bundle
public defn reverse-lane (p:JITXObject)
p: JITXObject
- Port of typelane-pair
or similar that we wish to swap the TX/RX pair on.
This function is a generator and must be called from within a
pcb-module
context.
Related Packages¶
Forwarded by package: jsl/si