substrate module#
Substrate definitions and fabrication constraints#
This module provides classes for defining substrates with routing structures and fabrication constraints for manufacturing.
- class Substrate[source]#
Bases:
StructuralSubstrate definition with routing structures and fabrication constraints.
Substrates can be equipped with routing and differential routing structures which will be introspected when an attempt to lookup a particular impedance is made.
A substrate should also contain the permissible
Viatypes as well as theFabricationConstraints.>>> class MySubstrate(Substrate): ... constraints = MyFabricationConstraints() ... ... class THVia(Via): ... start_layer = 0 ... stop_layer = 1 ... diameter = 0.45 ... hole_diameter = 0.3 ... type = ViaType.MechanicalDrill ... ... RS_50 = RoutingStructure(symmetric_routing_layers( ... name="RS_50", ... impedance=50 * ohm, ... layers=symmetric_routing_layers({ ... 0: RoutingLayer( ... trace_width=0.1176, ... clearance=0.2, ... velocity=191335235228, ... insertion_loss=0.0178, ... ) ... }) ... )
>>> MySubstrate().routing_structure(50 * ohm) RoutingStructure(name="RS_50", impedance=50 Ω)
- stackup: Stackup#
- constraints: FabricationConstraints#
- routing_structure(impedance)[source]#
Look up a routing structure for a given impedance. The default implementation introspects the substrate for
RoutingStructureobjects. Override this method if you need to implement a custom lookup mechanism.- Return type:
- Parameters:
impedance (Toleranced | PlainQuantity | float)
- differential_routing_structure(impedance)[source]#
Look up a differential routing structure for a given impedance. The default implementation introspects the substrate for
RoutingStructureobjects. Override this method if you need to implement a custom lookup mechanism.- Return type:
- Parameters:
impedance (Toleranced | float)
- class SubstrateContext(substrate)[source]#
Bases:
ContextAccess the substrate of the current design. Note that for normal use there’s a
jitx.Current.subtrateconvenience property that can be used instead.>>> class MyDesign(Design): ... substrate = MySubstrate() ... circuit = MyCircuit()
>>> class MyCircuit(Circuit): ... def __init__(self): ... assert isinstance(SubstrateContext.require().substrate, MySubstrate) ... # or the preferred and equivalent ... assert isinstance(jitx.current.substrate, MySubstrate)
- Parameters:
substrate (Substrate)
- class FabricationConstraints[source]#
Bases:
CriticalFabrication constraints for a substrate. These constraints are used to ensure that the design is manufacturable. Unless otherwise specified, these constraints are not enforced by the jitx engine. They are used for documentation purposes and can be queried by user code to generate appropriate design elements.
-
min_copper_width:
float# Minimum permissible copper width. This constraint will be enforced by the engine for generated copper shapes and will take precedence over other constraints and rules, such as trace width.
-
min_copper_copper_space:
float# Minimum permissible copper-to-copper spacing. This constraint will be enforced by the engine for generated copper shapes and will take precedence over other constraints and rules, such as clearance.
-
min_copper_hole_space:
float# Minimum permissible copper-to-hole spacing. This constraint will be enforced by the engine for generated copper shapes and will take precedence over other constraints and rules, such as clearance.
-
min_copper_width: