Skip to content

Commit

Permalink
Merge pull request #63 from gdsfactory/update_gdsfactory889
Browse files Browse the repository at this point in the history
fix sample routing functions
  • Loading branch information
joamatab authored Oct 3, 2024
2 parents 8bd86f0 + d8ab7b2 commit cadfc6d
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 74 deletions.
2 changes: 1 addition & 1 deletion cspdk/si220/samples/get_route_sc.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
mmi2.dmove((500, 50))

route = tech.route_single_sc(
c,
mmi1.ports["o3"],
mmi2.ports["o1"],
)
c.add(route.references)
c.show()
151 changes: 81 additions & 70 deletions cspdk/si220/tech.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,79 +384,90 @@ def route_bundle(
)


route_single_sc = partial(
route_single,
straight="straight_sc",
bend="bend_euler_sc",
taper="taper_sc",
cross_section="xs_sc",
)
route_single_so = partial(
route_single,
straight="straight_so",
bend="bend_euler_so",
taper="taper_so",
cross_section="xs_so",
)
route_single_rc = partial(
route_single,
straight="straight_rc",
bend="bend_euler_rc",
taper="taper_rc",
cross_section="xs_rc",
)
route_single_ro = partial(
route_single,
straight="straight_ro",
bend="bend_euler_ro",
taper="taper_ro",
cross_section="xs_ro",
)
route_bundle_sc = partial(
route_bundle,
straight="straight_sc",
bend="bend_euler_sc",
taper="taper_sc",
cross_section="xs_sc",
)
route_bundle_so = partial(
route_bundle,
straight="straight_so",
bend="bend_euler_so",
taper="taper_so",
cross_section="xs_so",
)
route_bundle_rc = partial(
route_bundle,
straight="straight_rc",
bend="bend_euler_rc",
taper="taper_rc",
cross_section="xs_rc",
)
route_bundle_ro = partial(
route_bundle,
straight="straight_ro",
bend="bend_euler_ro",
taper="taper_ro",
cross_section="xs_ro",
)
route_bundle_metal = partial(
route_bundle,
straight="straight_metal",
bend="bend_metal",
taper=None,
cross_section="metal_routing",
)
route_bundle_metal_corner = partial(
route_bundle,
straight="straight_metal",
bend="wire_corner",
taper=None,
cross_section="metal_routing",
)

routing_strategies = dict(
route_single=route_single,
route_single_sc=partial(
route_single,
straight="straight_sc",
bend="bend_euler_sc",
taper="taper_sc",
cross_section="xs_sc",
),
route_single_so=partial(
route_single,
straight="straight_so",
bend="bend_euler_so",
taper="taper_so",
cross_section="xs_so",
),
route_single_rc=partial(
route_single,
straight="straight_rc",
bend="bend_euler_rc",
taper="taper_rc",
cross_section="xs_rc",
),
route_single_ro=partial(
route_single,
straight="straight_ro",
bend="bend_euler_ro",
taper="taper_ro",
cross_section="xs_ro",
),
route_bundle=route_bundle,
route_bundle_sc=partial(
route_bundle,
straight="straight_sc",
bend="bend_euler_sc",
taper="taper_sc",
cross_section="xs_sc",
),
route_bundle_so=partial(
route_bundle,
straight="straight_so",
bend="bend_euler_so",
taper="taper_so",
cross_section="xs_so",
),
route_bundle_rc=partial(
route_bundle,
straight="straight_rc",
bend="bend_euler_rc",
taper="taper_rc",
cross_section="xs_rc",
),
route_bundle_ro=partial(
route_bundle,
straight="straight_ro",
bend="bend_euler_ro",
taper="taper_ro",
cross_section="xs_ro",
),
route_bundle_metal=partial(
route_bundle,
straight="straight_metal",
bend="bend_metal",
taper=None,
cross_section="metal_routing",
),
route_bundle_metal_corner=partial(
route_bundle,
straight="straight_metal",
bend="wire_corner",
taper=None,
cross_section="metal_routing",
),
route_single_sc=route_single_sc,
route_single_so=route_single_so,
route_single_rc=route_single_rc,
route_single_ro=route_single_ro,
route_bundle_sc=route_bundle_sc,
route_bundle_so=route_bundle_so,
route_bundle_rc=route_bundle_rc,
route_bundle_ro=route_bundle_ro,
route_bundle_metal=route_bundle_metal,
route_bundle_metal_corner=route_bundle_metal_corner,
)

if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion cspdk/si500/samples/get_route_rc500.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
mmi2.dmove((500, 50))

route = tech.route_single_rc(
c,
mmi1.ports["o3"],
mmi2.ports["o1"],
)
c.add(route.references)
c.show()
2 changes: 1 addition & 1 deletion cspdk/sin300/samples/get_route_nc.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
mmi2.dmove((500, 50))

route = tech.route_single_nc(
c,
mmi1.ports["o3"],
mmi2.ports["o1"],
)
c.add(route.references)
c.show()
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ classifiers = [
"Operating System :: OS Independent"
]
dependencies = [
"gdsfactory~=8.8.8",
"gdsfactory~=8.8.9",
"gplugins[sax]>=1,<2"
]
description = "CornerStone PDK"
Expand Down

0 comments on commit cadfc6d

Please sign in to comment.