def gds_write(self, gds_name): """Write the entire gds of the object to the file.""" debug.info(3, "Writing to {0}".format(gds_name)) writer = gdsMill.Gds2writer(self.gds) # recursively create all the remaining objects self.gds_write_file(self.gds) # populates the xyTree data structure for gds # self.gds.prepareForWrite() writer.writeToFile(gds_name)
def gds_write(self, gds_name): """Write the entire gds of the object to the file.""" debug.info(3, "Writing to {0}".format(gds_name)) #self.gds = gdsMill.VlsiLayout(name=self.name,units=GDS["unit"]) writer = gdsMill.Gds2writer(self.gds) # clear the visited flag for the traversal self.clear_visited() # recursively create all the remaining objects self.gds_write_file(self.gds) # populates the xyTree data structure for gds # self.gds.prepareForWrite() writer.writeToFile(gds_name)
def gds_write(self, gds_name): """Write the entire gds of the object to the file.""" debug.info(3, "Writing to {0}".format(gds_name)) writer = gdsMill.Gds2writer(self.gds) # MRG: 3/2/18 We don't want to clear the visited flag since # this would result in duplicates of all instances being placed in self.gds # which may have been previously processed! #self.clear_visited() # recursively create all the remaining objects self.gds_write_file(self.gds) # populates the xyTree data structure for gds # self.gds.prepareForWrite() writer.writeToFile(gds_name)
def gds_write(self, gds_name): """Write the entire gds of the object to the file.""" debug.info(3, "Writing to {}".format(gds_name)) # If we already wrote a GDS, we need to reset and traverse it again in # case we made changes. if not self.is_library_cell and self.visited: debug.info(3, "Creating layout structure {}".format(self.name)) self.gds = gdsMill.VlsiLayout(name=self.name, units=GDS["unit"]) writer = gdsMill.Gds2writer(self.gds) # MRG: 3/2/18 We don't want to clear the visited flag since # this would result in duplicates of all instances being placed in self.gds # which may have been previously processed! # MRG: 10/4/18 We need to clear if we make changes and write a second GDS! self.clear_visited() # recursively create all the remaining objects self.gds_write_file(self.gds) # populates the xyTree data structure for gds # self.gds.prepareForWrite() writer.writeToFile(gds_name) debug.info(3, "Done writing to {}".format(gds_name))
if (yIndex % 2 == 0): mirror = "MX" else: mirror = "R0" newLayout.addInstance(arrayCellLayout, offsetInMicrons=(xIndex * 10.0, yIndex * 15.0), mirror=mirror, rotate=0.0) #add a "wire" that in a real example might be a power rail, data bus, etc. newLayout.addPath(layerNumber=newLayout.layerNumbersInUse[7], coordinates=[(-20.0, 0.0), (25.0, 0), (25.0, 10.0)], width=1.0) #add some text that in a real example might be an I/O pin newLayout.addText(text="Hello", layerNumber=newLayout.layerNumbersInUse[5], offsetInMicrons=(0, 0), magnification=1, rotate=None) newLayout.prepareForWrite() #and now dump the filled layout to a new GDS file writer = gdsMill.Gds2writer(newLayout) writer.writeToFile("./gdsFiles/arrayLayout.gds") #and stream it into cadence #streamer.streamToCadence(cadenceLibraryContainerPath = "~/design/600nmAmi", # libraryName = "gdsMillTest", # inputPath = "./gdsFiles/arrayLayout.gds")
layerNumber=myLayout.layerNumbersInUse[0], #pick some layer offsetInMicrons=(-10, 0), #location width=10.0, #units are microns height=5.0, # updateInternalMap = True, #This is important for visualization - see note 1 below center=True) #origin is in the center or the bottom left corner #Note 1:the layout object keeps track of its elements in a 2D map (no hiearachy) #this makes visualization more efficient. Therefore, to do a PDF output or some other #flat output, you need to "update the internal map" of the layout object. Only do this # ONE TIME after all the objects you are manipulating are fixed #let's take out new layout and stream it back into a cadence library #first, create a new GDS #we change the root structure name (this will be the cellview name upon stream in) myLayout.rename("testLayoutB") writer = gdsMill.Gds2writer(myLayout) writer.writeToFile("./gdsFiles/testLayoutB.gds") streamer.streamToCadence(cadenceLibraryContainerPath="~/design/600nmAmi", libraryName="gdsMillTest", inputPath="./gdsFiles/testLayoutB.gds") #let's create a PDF view of the layout object #first, create the object to represent the visual output visualizer = gdsMill.PdfLayout(myLayout) #since we have no knowledge of what the layer numbers mean for this particular technology #we need to assign some colors to them #uncomment the following line if you want to actually see the layout numbers in use #print myLayout.layerNumbersInUse
filledLayout.addInstance(myTopLevelLayout, offsetInMicrons = (0,0), mirror = "", rotate = 0.0) #now actaully add the fill - gds mill will create an array of boxes # maintaining spacing from existing layout elements #we'll do it once for two different layers filledLayout.fillAreaDensity(layerToFill = myTopLevelLayout.layerNumbersInUse[5], offsetInMicrons = (-10.0,-10.0), #this is where to start from coverageWidth = 40.0, #size of the fill area in microns coverageHeight = 40.0, minSpacing = 0.5, #distance between fill blocks blockSize = 2.0 #width and height of each filler block in microns ) filledLayout.fillAreaDensity(layerToFill = myTopLevelLayout.layerNumbersInUse[7], offsetInMicrons = (-11.0,-11.0), #this is where to start from coverageWidth = 40.0, #size of the fill area in microns coverageHeight = 40.0, minSpacing = 0.5, #distance between fill blocks blockSize = 3.0 #width and height of each filler block in microns ) #and now dump the filled layout to a new GDS file writer = gdsMill.Gds2writer(filledLayout) writer.writeToFile("./gdsFiles/filledLayout.gds") #and strea streamer = gdsMill.GdsStreamer() streamer.streamToCadence(cadenceLibraryContainerPath = "~/design/600nmAmi", libraryName = "gdsMillTest", inputPath = "./gdsFiles/filledLayout.gds")