Compare commits
No commits in common. "11c483cd46fc4e0b4c2ae744402e93f9ae0643d9" and "d028c5f58016518e89067fe2e3cea01e15d4c960" have entirely different histories.
11c483cd46
...
d028c5f580
@ -253,42 +253,26 @@ def main() -> None:
|
||||
|
||||
|
||||
|
||||
M1_ptool = PathTool(layer='M1', width=M1_WIDTH, ptype='m1wire')
|
||||
M2_ptool = PathTool(layer='M2', width=M2_WIDTH, ptype='m2wire')
|
||||
rpather = RenderPather(tools=M2_ptool, library=library).add_port_pair()
|
||||
tool = PathTool(layer=(2, 0), width=2)
|
||||
q = RenderPather(tools=tool, library=library).add_port_pair()
|
||||
|
||||
rpather.place('pad', offset=(18_000, 30_000), port_map={'wire_port': 'VCC'})
|
||||
rpather.place('pad', offset=(18_000, 60_000), port_map={'wire_port': 'GND'})
|
||||
rpather.pattern.label(layer='M2', string='VCC', offset=(18e3, 30e3))
|
||||
rpather.pattern.label(layer='M2', string='GND', offset=(18e3, 60e3))
|
||||
print('---------------BBBB------------------')
|
||||
print(q.ports)
|
||||
q.path('B', 1, 120) # next up
|
||||
q.path('B', 0, 20) # next right
|
||||
q.path('B', 0, 120) # next down
|
||||
q.path_to('B', None, -90) # next down
|
||||
print(q.ports)
|
||||
q.path('B', None, 10) # next down
|
||||
q.path('B', 1, 80) # next right
|
||||
q.path('B', 1, 80) # next up
|
||||
print('---------------AAAA------------------')
|
||||
q.path('A', 0, 50)
|
||||
q.path('A', 0, 50)
|
||||
q.path('A', 0, 50)
|
||||
|
||||
rpather.path('VCC', ccw=False, length=6_000)
|
||||
rpather.path_to('VCC', ccw=None, x=0)
|
||||
rpather.path('GND', 0, 5_000)
|
||||
rpather.path_to('GND', None, x=rpather['VCC'].offset[0])
|
||||
|
||||
rpather.plug('v1_via', {'GND': 'top'})
|
||||
rpather.retool(M1_ptool, keys=['GND'])
|
||||
rpather.mpath(['GND', 'VCC'], ccw=True, xmax=-10_000, spacing=5_000)
|
||||
|
||||
rpather.plug('v1_via', {'VCC': 'top'})
|
||||
rpather.retool(M1_ptool)
|
||||
rpather.mpath(['GND', 'VCC'], ccw=True, emax=50_000, spacing=1_200)
|
||||
rpather.mpath(['GND', 'VCC'], ccw=False, emin=1_000, spacing=1_200)
|
||||
rpather.mpath(['GND', 'VCC'], ccw=False, emin=2_000, spacing=4_500)
|
||||
|
||||
rpather.plug('v1_via', {'VCC': 'bottom'})
|
||||
rpather.retool(M2_ptool)
|
||||
rpather.mpath(['GND', 'VCC'], None, xmin=-28_000)
|
||||
via_size = abs(
|
||||
library['v1_via'].ports['top'].offset[0]
|
||||
- library['v1_via'].ports['bottom'].offset[0]
|
||||
)
|
||||
rpather.path_to('VCC', None, -50_000 + via_size) #, out_ptype='m1wire')
|
||||
rpather.plug('v1_via', {'VCC': 'top'})
|
||||
|
||||
rpather.render()
|
||||
library['RenderPather_and_PathTool'] = rpather.pattern
|
||||
q.render()
|
||||
library['nom'] = q.pattern
|
||||
|
||||
|
||||
# Convert from text-based layers to numeric layers for GDS, and output the file
|
||||
|
@ -539,10 +539,6 @@ class PathTool(Tool, metaclass=ABCMeta):
|
||||
else:
|
||||
raise BuildError(f'Unrecognized opcode "{step.opcode}"')
|
||||
|
||||
if (path_vertices[-1] != batch[-1].end_port.offset).any():
|
||||
# If the path ends in a bend, we need to add the final vertex
|
||||
path_vertices.append(batch[-1].end_port.offset)
|
||||
|
||||
tree, pat = Library.mktree('_path')
|
||||
pat.path(layer=self.layer, width=self.width, vertices=path_vertices)
|
||||
pat.ports = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user