Tagged: connections, cells, pins
- This topic has 4 replies, 3 voices, and was last updated 5 years, 3 months ago by
MirceaB.
-
AuthorPosts
-
15 December 2020 at 15:16 #6298
MirceaB
ParticipantHello,
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?
15 December 2020 at 15:26 #6301Xaveer
ModeratorHi MirceaB,
You need to connect the cell instance, not the cell itself, since that has no location:
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=cl1.pin['b0'], pin2=cl2.pin['a0']).put() final.put() nd.export_gds(filename="test")Not sure if what you get now is what you want, but it should get you going.
Xaveer
15 December 2020 at 15:29 #6302Ronald
KeymasterDear MirceaB,
The cell instances c1 and c2 need to be connected in the scope of your cell ‘final’, not the pins inside the original cells. Pins inside cell1 and cell2 are indeed not in scope of cell ‘final’.
Change the last line in cell ‘final’ to
demofab.deep.cobra_p2p(pin1=cl1.pin['b0'], pin2=cl2.pin['a0']).put()Ronald
15 December 2020 at 15:31 #6303Xaveer
ModeratorAlso, look at how to add the pins to your cells, to provide the proper connectivity. E.g. see https://nazca-design.org/make_a_cell_put_a_cell/
15 December 2020 at 16:07 #6304MirceaB
ParticipantOh, of course… Thank you for the solution, Xaveer & Ronald!
-
AuthorPosts
- You must be logged in to reply to this topic.