Skip to content

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 the TX and RX 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 cascading KeyValue objects. Use the => operator. Don't use () inside a chain. For example, use A => B => C => D not A => (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. If make-symb-name is false then this name will be applied to all nets. If there are separate connections, then the JITX runtime will give these nets [N] suffices where N is an integer and increments for every separate connection that has the same net name. If make-symb-name is not false, then this is the base name and will be passed as the first argument to make-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 converts name and the index 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 is false, then no unique names are created and name 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:

  1. Bundle port instance - diff-pair, dual-pair or lane-pair
  2. An Instance - ie an instance of a pcb-module or pcb-component
  3. Another KeyValue (typically only in the value). Currently does not handle KeyValue as the key

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 either dual-pair or lane-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-nets
  • id: 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>
Where the base and id are separated by a hyphen

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 type lane-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