Hello,
I am trying to connect two cells within a cell and nazca keeps throwing the following exception:
It is not allowed to create a node outside the scope of max one level deep: You cannot connect to a cell that is not placed inside the cell you are creating.
This is the code:
import nazca as nd
import nazca.demofab as demofab
with nd.Cell(name="cell1") as cell1:
demofab.deep.strt(length=100).put()
with nd.Cell(name="cell2") as cell2:
demofab.deep.strt(length=200).put()
wg1 = demofab.deep.bend(radius=100, angle=-180).put()
demofab.deep.cobra_p2p(pin1=wg1.pin['b0'], pin2=(100, 100, 0)).put()
with nd.Cell("Final") as final:
cl1 = cell1.put(200, 300, 0)
cl2 = cell2.put(500, 500, 0)
demofab.deep.cobra_p2p(pin1=cell1.pin['b0'], pin2=cell2.pin['a0']).put()
nd.export_gds(filename="test")
The error seems strange since I’m trying to connect two cells, i.e. cl1 and cl2 inside cell final…
Would you kindly suggest a solution?