layout_routing_structure_by_tag module#

Apply routing structures by tag, with a neck structure on the escape.

Use this pattern when a class of nets takes a routing structure and the segment that leaves the device needs a narrower one. Two rules do it, and neither needs >> or Constrain(...).structure:

  1. design_constraint(SignalTag(), priority=2).routing_structure(main, ref_net=GND) on the net’s tag applies the main structure to every trace of the net.

  2. design_constraint(EscapeNeckTag(), priority=4).routing_structure(neck, ref_net=GND) on a tag assigned to the escape Route object gives that segment the neck structure. The higher priority wins on the one segment both rules match.

The net is split at a transition: the escape route runs from the device pad to a code-placed via, and the main route from the via to the far pad. A Constrain(Topology(...)).timing(...) on the pad-to-pad path asks for a structure on every segment, so a segment without one shows in the design issues as Missing routing structure.

Measured on jitx 4.6, building layout_routing_structure_by_tag_design: the escape came back 0.15 wide and the main segment 0.3, the widths of the two structures, and the issues listed the path’s Time line with no Missing routing structure. The same mechanism on 0.4 and 0.15 structures, measured on jitx 4.6, showed that a tag on the net combined with IsTrace instead of a tag on the Route necks the whole net, not the escape.

When Constrain(...).structure(...) and a routing_structure rule both apply to one net, the rule’s structure wins, and nothing reports the overlap (measured on jitx 4.6). Pick one place to apply a structure.

Build structures inside a circuit’s __init__ or as class attributes of a Substrate. Built at module level, a RoutingStructure fails inside routing_structure(...) with TypeError: 'Instantiable' object is not iterable. The widths here are illustrative, not solved for an impedance.

The test, tests/test_layout_routing_structure_by_tag.py, checks the rules’ conditions offline. With JITX_PATTERN_RUNTIME=1 and a runtime started at the project root, it builds the design and measures each segment’s width and reads the issues.

MAIN_WIDTH = 0.3#

Trace width of the main structure, in mm.

NECK_WIDTH = 0.15#

Trace width of the neck structure on the escape, in mm.

TRANSITION_X = -7.0#

Where the escape ends and the main segment starts, in mm.

class SignalTag[source]#

Bases: Tag

Nets that take the main structure.

class EscapeNeckTag[source]#

Bases: Tag

Escape segments that take the neck structure.

class NeckedLine[source]#

Bases: Circuit

One net from a device pad to a far pad, necked on the escape.

class layout_routing_structure_by_tag_design(*args, **kwargs)[source]#

Bases: SampleDesign

The necked line on the sample board.

circuit: Circuit = NeckedLine()#