• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. How to export GDS file of PCell instance (submaster)

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 11796
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to export GDS file of PCell instance (submaster)

wsha
wsha over 3 years ago

I am trying to write a Skill script to walk through a schematic and generate a GDS file for each PCell submaster in the schematic. I am new to Cadence, so I may misuse some terminology.

My first attempt at this was to iterate on geGetCellView()~>instances and call "strmout -library inst~>libName -topCell inst~>cellName -view layout" for each instance, but I found that this produces GDS layouts with the default PCell parameters rather than using the values set for each instance / submaster.

From what I can tell, it is not possible to call strmout directly on a PCell submaster. I need to create a new temporary library for each submaster, insert the PCell into it, set the non-default parameter values, and then call strmout on this library. The problem I am having with this method is that I have not been able to get access to most of the PCell parameter values from Skill. I tried following the approach in this post but of the three PCells in my test schematic it only finds one parameter of one of the PCells. The others don't show up in the output of that code. The PCell for which the parameter does get printed should also have more than one parameter as well. For the cells not printed out, inst~>master~>parameters~>value is nil while for the other there is only one value in the array. My test library has a schematic with a few PCells that someone else at my company created. I am not familiar with how they were generated but they are representative of the kind of cells I want to generate GDS files for.

Is there another way to get the PCell parameter names and values? And is the method I outlined a good way to generate GDS files of the PCell submasters (maybe I could freeze the PCell instance into a static cell without dealing with the parameter value directly?)?

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 3 years ago

    You can't directly stream out a subMaster, but either way you've got to generate that subMaster somehow - and that means instantiating the PCell in a layout cellView (it doesn't need to be a "temporary library") and then streaming out the cellView containing those instances.

    The simplest way would be to take the schematic you have which has the sets of variant parameters you want, and then Launch->Layout XL, create a new cellView, and then in that use Connectivity->Generate->All From Source and generate all the instances corresponding the to schematic. Save this layout and then stream that out.

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • wsha
    wsha over 3 years ago in reply to Andrew Beckett

    Thank you, Andrew. One thing I noticed with your suggestion is that after creating a layout cell view and calling generate->all from source, the Skill code in the other post from you that I referenced above worked, reporting the parameters for all the variants. So I see that querying pcell properties from a layout is different than querying from a schematic.

    After generating the new cell view, I was able to generate a GDS file of the whole schematic with File->Export Stream from VM (not what I wanted but good to know about). I also found that I could right click a cell in the layout view and do Hierarchy->Make cell. Then I could use File->Export->Stream from the console window and specify the new cell name that I had just set to export a single cell as a GDS (what I had wanted).

    I want to automate this so I will hunt down the Skill commands for these steps and walk the variants like the code in your other post I linked to. A couple questions about this:

    1. Is Hierarchy->Make cell the best way to export the GDS for a cell or is there another way to make a variant a top level cell for export?

    2. So I will generate a new layout for the library to export the pcell GDS files. Can that be an expensive step? I am wondering if I should remove the layout afterwards or if it could be used again if a user modifies the schematic and wants to re-run my export function.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to wsha

    There are several things to unpick in this post, so let me quote sections of your last reply and respond to them in turn. What you're trying to do here seems rather odd.

    wsha said:
    One thing I noticed with your suggestion is that after creating a layout cell view and calling generate->all from source, the Skill code in the other post from you that I referenced above worked, reporting the parameters for all the variants. So I see that querying pcell properties from a layout is different than querying from a schematic.

    That's because that code only prints pcell parameters, and the symbols are unlikely to be be pcells (symbol pcells are a thing, but they're normally only needed if you want the symbol to have variable pins or appearance). So commonly you'd have a static symbol with a set of parameters, and those parameters get transferred to a layout pcell when you use generate all from source in VLS XL.

    wsha said:
    After generating the new cell view, I was able to generate a GDS file of the whole schematic with File->Export Stream from VM (not what I wanted but good to know about).

    If you'd saved the resulting cellView, you could have used stream out from the command line or Export Stream without the VM option turned on. I'm not quite sure why this would not be what you wanted...

    There's no such thing as a "GDS file of the whole schematic" since GDS is a storage format for layout and not for schematic data, so odd terminology here.

    wsha said:
    I also found that I could right click a cell in the layout view and do Hierarchy->Make cell. Then I could use File->Export->Stream from the console window and specify the new cell name that I had just set to export a single cell as a GDS (what I had wanted).

    Yes, you could do that.  The approach I mentioned above would have given you a single GDS file with multiple cells in it. I'm not really sure why you would really want each variant in a separate stream (GDS) file - you've not really explained why that's important

    wsha said:
    1. Is Hierarchy->Make cell the best way to export the GDS for a cell or is there another way to make a variant a top level cell for export?

    Given this is a rather weird thing to want to do - exporting a stream file of a single variant - then it's hard for me to comment as to whether it's the "best" way to export this. There's no direct way of exporting a single variant only. It rather depends on what you're trying to do with the resulting stream file I guess.

    wsha said:
    2. So I will generate a new layout for the library to export the pcell GDS files. Can that be an expensive step? I am wondering if I should remove the layout afterwards or if it could be used again if a user modifies the schematic and wants to re-run my export function.

    I struggle to understand why somebody would want to keep exporting GDS for each variant of a pcell, and whether it's expensive or not depends on how often you would re-generate this from a schematic (or why on earth you'd do it in the first place).

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • wsha
    wsha over 3 years ago in reply to Andrew Beckett

    Here is some background of what I am trying to do. We are using Cadence for design and layout of devices. In the initial design phase, we will run RF simulations of the schematic with Spectre while iterating on component parameters. However, some of the components which are specified as PCells (which I generalized as all PCells in previous posts; I will figure out how to filter out the necessary cells) need to be simulated with an external tool in order to determine their RF parameters. The way the information will flow is that a GDS file of the component will be input into an external tool and then the resulting S-parameters will be read back into Cadence and attached to the netlist (I think that is where it goes) for the RF simulation. There will be some iteration of PCell parameters and RF simulation. Once the parameters are determined, a final layout can be generated.

    My goal is to automate the process of sending the GDS files from the schematic to the external tool and receiving the S-parameter data back.

    Andrew Beckett said:
    That's because that code only prints pcell parameters, and the symbols are unlikely to be be pcells (symbol pcells are a thing, but they're normally only needed if you want the symbol to have variable pins or appearance). So commonly you'd have a static symbol with a set of parameters, and those parameters get transferred to a layout pcell when you use generate all from source in VLS XL.

    Okay, so the instances in the schematic are not PCells. I found that I can access the parameters of the components in the schematic with cdfGetInstCDF and then looking at the "parameters" property. This answers what I was trying to ask at the beginning of my original post of how to get the parameters of a component in a schematic (which I called a PCell but maybe is not a PCell until it is part of a layout). Currently, one approach I am considering is looking up the parameters with cdfGetInstCDF and generating layout cells to stream out with dbOpenCellViewByType, and the other approach is the generate all from source method.

    Andrew Beckett said:
    There's no such thing as a "GDS file of the whole schematic" since GDS is a storage format for layout and not for schematic data, so odd terminology here.

    Yes, that was sloppy language on my part. I was able to generate a GDS file of a layout of the schematic. Since I am not interested in the layout of the whole device at this stage, I wasn't thinking about that layout too concretely.

    Andrew Beckett said:
    Given this is a rather weird thing to want to do - exporting a stream file of a single variant - then it's hard for me to comment as to whether it's the "best" way to export this.

    Regarding the "best" way to do this, the main factors I was thinking about were speed, volume of code, and robustness. For speed, I don't know yet if anything is slow enough to worry about, but only generating GDS files of the components that were modified rather than all components might be one example. For volume of code, using a small number of built in functions would be better than writing a larger amount of my own code. For robustness, perhaps making the fewest modifications to the schematic's library would be best.

    Andrew Beckett said:
    I struggle to understand why somebody would want to keep exporting GDS for each variant of a pcell, and whether it's expensive or not depends on how often you would re-generate this from a schematic (or why on earth you'd do it in the first place).

    I only need to export the GDS of a variant once as long as it does not change. However, that requires that I can track when it changes. If it is okay speed-wise, I could generate all GDS files each time and try to deduplicate the simulation work keeping track of which GDS file content has been previously simulated. Also, I am not sure if the generate all from source method will require generating the layout for the full schematic each time.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to wsha

    I think it's highly unlikely that the time taken to create an instance with the right parameters and streaming it out will be the bottleneck in the process - if you're using some kind of electromagnetic simulator, that will probably be the time-limiting part. So you may want to do some caching to avoid re-creating/streaming-out/re-simulating something for that reason.

    The generate all from source is unlikely to be the slow part either. Anyway, hopefully you can figure this out now - whether you do it that way or create a layout and instance yourself with the same parameters.

    Andrew 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to wsha

    I think it's highly unlikely that the time taken to create an instance with the right parameters and streaming it out will be the bottleneck in the process - if you're using some kind of electromagnetic simulator, that will probably be the time-limiting part. So you may want to do some caching to avoid re-creating/streaming-out/re-simulating something for that reason.

    The generate all from source is unlikely to be the slow part either. Anyway, hopefully you can figure this out now - whether you do it that way or create a layout and instance yourself with the same parameters.

    Andrew 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information