Note
Click here to download the full example code
1.10. Generating feedthrough from single instanceΒΆ
This example demostrates how to generate a feedthrough wire connection for a given scalar or vector wires.
Initial Design
Output1 wire0
feedthough from inst_2_1
Output2 bus_in
feedthrough from inst_1_0
import spydrnet as sdn
import spydrnet_physical as sdnphy
netlist = sdnphy.load_netlist_by_name("basic_hierarchy")
top = netlist.top_instance.reference
cable0 = next(top.get_cables("in3"))
inst2 = next(top.get_instances("inst_1_0"))
top.create_feedthrough(inst2, cable0)
top.create_unconn_wires()
sdn.compose(netlist, "_output_wire.v", skip_constraints=True)
# Reset design
netlist = sdnphy.load_netlist_by_name("basic_hierarchy")
top = netlist.top_instance.reference
bus_in = next(top.get_cables("bus_in"))
inst1 = next(top.get_instances("inst_2_0"))
cables = top.create_feedthrough(inst1, bus_in)
top.create_unconn_wires()
sdn.compose(netlist, "_output_bus.v", skip_constraints=True)
Total running time of the script: ( 0 minutes 0.000 seconds)