Skip to content

topology-segment

The topology-segment statement is a means of constructing the ordered edges of a signal topology graph. The topology is underlying scaffold that the routing engine uses to apply various physical constraints on each signal.

The edges of the topology graph are made up of topology "segments" and pin-model statements. A segment connects two endpoints. Each endpoint must be a component, module, or abstract port.

The topology-segment statement is only valid within the pcb-module context.

Signature

topology-segment(<EXP-1, EXP-2>)

Notes: * The &lt;EXP-*> is expected to be a ref of a component, module, or abstract port. * That port can be either a SinglePin, Bundle, or PortArray. * The ports referenced in &lt;EXP-1> and &lt;EXP-2> should not be the same port. This would construct an immediate cycle. * The ports &lt;EXP-1> and &lt;EXP-2> must match in type. Mismatching ports will elicit an exception from the JITX runtime. * The ports &lt;EXP-1> and &lt;EXP-2> must be connected to the same net

Usage

The topology-segment statement is typically the first step in constructing a signal integrity route. A valid topology is required for any constraints like structure, insertion-loss, etc to apply correctly. As such, you will often see the topology constructed first and then constraints applied afterward.

pcb-differential-routing-structure diff-100:
  trace-width = 0.145
  pair-spacing = 0.127
  clearance = 0.3
  ...

pcb-component KSZ8081:
  port TX : diff-pair
  port RX : diff-pair
  ...

pcb-component RJ45-with-magnetics:
  port TX : diff-pair
  port RX : diff-pair
  ...

pcb-component esd-protector :
  port ch : dual-pair[4]
  ...
  pin-model(self.ch[0].A, self.ch[0].B) = PinModel(typ(0.0), typ(0.0))
  pin-model(self.ch[1].A, self.ch[1].B) = PinModel(typ(0.0), typ(0.0))
  ...

pcb-module ethernet-demo :

  inst PHY : KSZ8081
  inst conn : RJ45-with-magnetics
  inst ESD : esd-protector

  net (PHY.TX, conn.TX)
  net (PHY.RX, conn.RX)

  ; Construct the Topology between the PHY and connector
  ; There are two hops
  ;  PHY => ESD => Connector
  topology-segment(PHY.TX, ESD.ch[0].A)
  topology-segment(ESD.ch[0].B, conn.TX)

  topology-segment(PHY.RX, ESD.ch[1].A)
  topology-segment(ESD.ch[1].B, conn.RX)

  ; Add the structure constraint for this topology.
  structure(PHY.TX => conn.TX) = diff-100
  structure(PHY.RX => conn.RX) = diff-100

Here the topology-segment statements are acting on diff-pair bundles. This is a common structure when applying differential pair constraints.

Notice that the topology segments are point-to-point. We connect the PHY to one side of the ESD protector, and then from the other side of the ESD protector to the connector.

After the construction of the topology, we can apply constraints. Notice that the structure constraint is applied to the endpoints (eg PHY.TX and conn.TX ) and does not need to consider the interstitial nodes between the endpoints. The topology definition provides this information to the routing engine without the user needing to specify it directly.

The pin-model statements on the esd-protector component form a critical part of this infered topology. Without the pin-model, the routing engine would not know that the topology segment on the PHY side and the topology segment on the connector side are connected.

References:

  1. The dual-pair is a bundle type defined in JSL for series connecting differential pairs.
  2. The pin-model is a statement for components that creates a topology edge between the ports of the ESD protector.

Helper Routines in JSL

In JSL, there are some helper routines to make the construction of topology-segment statements easier.

See: * topo-net - This is a utility function for creating a net and topology-segment statement simultaneously. * topo-pair - Utility function for constructing differential pair topologies with interstitial components.