• 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. symbol PCELL extraction issue.

Stats

  • Locked Locked
  • Replies 18
  • Subscribers 143
  • Views 19694
  • 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

symbol PCELL extraction issue.

fishbulb15
fishbulb15 over 14 years ago
I have created a symbol, schematic and layout pcell. Everything seemed to be working correctly until I wanted to start LVS-ing the the pcell. I first ran into an issue where it required that my schematic be extracted since last edit. So I followed the instructions here: ___Schematic PCell: Schematic cellviews modified since last extracted___ support.cadence.com/.../ ------->Which seemed to solve that issue. But now I am getting "ERROR: Netlister: symbol of instance modified, please re-extract cell ''." Is there something like : dbCreateProp(pcCellView "schGeometryLastRecorded" "time" getCurrentTime() ) dbCreateProp(pcCellView "lastSchematicExtraction" "time" getCurrentTime() ) to add to the symbol pcell?? How can I get this to work.. Thank you, Mitchell Cohen
  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    Hi Mitchell,

    Try this code - it works for me in IC5141 - I can place an instance and CDL it out with no issues. You'll probably need to change the lib name near the top of the code, which is where it places the new "busset" pcell.

    Regards,

    Andrew.

    /* busset.il
    
    Author     A.D.Beckett
    Group      Custom IC, Cadence Design Systems Ltd.
    Machine    SUN
    Date       Jul 11, 2004 
    Modified   
    By         
    
    SKILL code for creating the "busset" pcell schematic, symbol,
    and the CDF as well.
    
    ***************************************************
    
    SCCS Info: @(#) busset.il 04/20/11.13:51:09 1.2
    
    */
    
    let( (library cell pcellId)
        library="training"
        cell="busset"
        unless(ddGetObj(library)
            error("Couldn't open library %L" library)
        )
    
        ;--------------------------------------------------------------------
        ; First the schematic
        ;--------------------------------------------------------------------
        pcellId=pcDefinePCell(
            list(ddGetObj(library) cell "schematic" "schematic")
    
            ;----------------------------------------------------------------
            ; Formal parameters
            ;----------------------------------------------------------------
            (
                (buswidth 6)
                (busvalue 0)
            )
    
            ;----------------------------------------------------------------
            ; Code itself
            ;----------------------------------------------------------------
            let(( cv master instId netH netL 
                busOut driveName driveNet)
    
            cv = pcCellView
            ;----------------------------------------------------------------
            ; Convert parameters, and figure out drive net name
            ;----------------------------------------------------------------
            when(buswidth<1 buswidth=1)
            for(bit 0 buswidth-1
                if(driveName then
                    driveName=strcat("," driveName)
                else
                    driveName=""
                ) ; if
                driveName=strcat(
                    if(busvalue<bit>==1 "hi" "lo")
                    driveName
                )
            ) ; for
    
            ;----------------------------------------------------------------
            ; open master cell view
            ;----------------------------------------------------------------
            master = dbOpenCellViewByType( "basic" "cds_thru" "symbol" nil "r" )
            ;----------------------------------------------------------------
            ; create the nets
            ;----------------------------------------------------------------
            netH=dbMakeNet(cv "hi")
            netL=dbMakeNet(cv "lo")
            busOut=dbMakeNet(cv sprintf(nil "bus<%d:0>" buswidth-1))
            driveNet=dbMakeNet(cv driveName)
            ;----------------------------------------------------------------
            ; create the terminals
            ;----------------------------------------------------------------
            dbCreateTerm(netH netH~>name "inputOutput")
            dbCreateTerm(netL netL~>name "inputOutput")
            dbCreateTerm(busOut busOut~>name "inputOutput")
            ;----------------------------------------------------------------
            ; create the instance of cds_thru
            ;----------------------------------------------------------------
            instId = 
                dbCreateInst(
                    cv master sprintf(nil "thru<%d:0>" buswidth-1)
                    0:0 "R0"
                )
            ;----------------------------------------------------------------
            ; Connect it up
            ;----------------------------------------------------------------
            dbCreateConnByName(busOut instId "dst");
            dbCreateConnByName(driveNet instId "src");
    
            ;----------------------------------------------------------------
            ; Make the connectivity look up to date - not always needed, but
            ; Assura needs this, for example.
            ;----------------------------------------------------------------
            dbSetConnCurrent(cv)
    
            dbClose( master )
            t
            ) ; let
        )
        dbSave(pcellId)
        dbClose(pcellId) 
    
        ;--------------------------------------------------------------------
        ; Now the symbol
        ;--------------------------------------------------------------------
        pcellId=pcDefinePCell(
            list(ddGetObj(library) cell "symbol" "schematicSymbol")
    
            ;----------------------------------------------------------------
            ; Formal parameters
            ;----------------------------------------------------------------
            (
                (buswidth 6)
                (busvalue 0)
            )
    
            ;----------------------------------------------------------------
            ; Code itself
            ;----------------------------------------------------------------
            let(( cv netH netL 
                busOut figH figL figBus hp ps pl bw lh
                pxc label)
    
            cv = pcCellView
    
            ;----------------------------------------------------------------
            ; Various dimensions
            ;----------------------------------------------------------------
            ; half pin size
            hp=0.025
            ; pin spacing
            ps=0.125
            ; pin length
            pl=0.250
            ; box width
            bw=1.4375
            ; label height
            lh=0.0625
            ; param label x coord
            pxc=0.5
    
            ;----------------------------------------------------------------
            ; create the shapes - first the pins
            ;----------------------------------------------------------------
            figH = dbCreateRect(cv list("pin" "drawing") list(-hp:-hp hp:hp)) 
            dbCreateLine(cv list("device" "drawing") list(0:0 pl:0))
            figL = dbCreateRect(cv list("pin" "drawing") list(-hp:-ps-hp hp:-ps+hp))
            dbCreateLine(cv list("device" "drawing") list(0:-ps pl:-ps))
            figBus = dbCreateRect(cv list("pin" "drawing")
                list(2*pl+bw-hp:-hp 2*pl+bw+hp:hp)
            ) ; dbCreateRect
            dbCreateLine(cv list("device" "drawing") list(pl+bw:0 2*pl+bw:0))
            ;----------------------------------------------------------------
            ; Then the boxes
            ;----------------------------------------------------------------
            dbCreateRect(cv list("device" "drawing") list(pl:-2*ps pl+bw:ps))
            dbCreateRect(cv list("instance" "drawing") list(0:-2*ps 2*pl+bw:ps))
    
            ;----------------------------------------------------------------
            ; create the nets
            ;----------------------------------------------------------------
            netH=dbMakeNet(cv "hi")
            netL=dbMakeNet(cv "lo")
            busOut=dbMakeNet(cv sprintf(nil "bus<%d:0>" buswidth-1))
            ;----------------------------------------------------------------
            ; create the terminals
            ;----------------------------------------------------------------
            dbCreateTerm(netH netH~>name "inputOutput")
            dbCreateTerm(netL netL~>name "inputOutput")
            dbCreateTerm(busOut busOut~>name "inputOutput")
            ;----------------------------------------------------------------
            ; create the pins
            ;----------------------------------------------------------------
            dbCreatePin(netH figH)
            dbCreatePin(netL figL)
            dbCreatePin(busOut figBus)
    
            ;----------------------------------------------------------------
            ; Put some labels for the pins
            ;----------------------------------------------------------------
            dbCreateLabel(cv list("pin" "drawing") pl+ps/2:0
                netH~>name "centerLeft" "R0" "stick" lh)
            dbCreateLabel(cv list("pin" "drawing") pl+ps/2:-ps
                netL~>name "centerLeft" "R0" "stick" lh)
            dbCreateLabel(cv list("pin" "drawing") bw+pl-ps/2:0
                busOut~>name "centerRight" "R0" "stick" lh)
    
            ;----------------------------------------------------------------
            ; And other symbol labels
            ;----------------------------------------------------------------
            label=dbCreateLabel(cv list("annotate" "drawing7") bw+pl-ps/2:ps*1.5
                "cdsName()" "centerRight" "R0" "stick" lh)
            label~>labelType="ILLabel"
            label=dbCreateLabel(cv list("annotate" "drawing") pxc:0
                "cdsParam(1)" "centerLeft" "R0" "stick" lh)
            label~>labelType="ILLabel"
            label=dbCreateLabel(cv list("annotate" "drawing") pxc:-ps
                "cdsParam(2)" "centerLeft" "R0" "stick" lh)
            label~>labelType="ILLabel"
    
            t
            ) ; let
        )
        dbSave(pcellId)
        dbClose(pcellId) 
    
    ;------------------------------------------------------------------------
    ; Now create the CDF
    ;------------------------------------------------------------------------
        let( (cellId cdfId )
            unless( cellId = ddGetObj( library cell )
                error( "Could not get cell %s." cell )
            )
            when( cdfId = cdfGetBaseCellCDF( cellId )
                cdfDeleteCDF( cdfId )
            )
            cdfId  = cdfCreateBaseCellCDF( cellId )
    
            ;;; Parameters
            cdfCreateParam( cdfId
                ?name           "buswidth"
                ?prompt         "Bus Width"
                ?defValue       6
                ?type           "int"
                ?display        "t"
            )
            cdfCreateParam( cdfId
                ?name           "busvalue"
                ?prompt         "Bus Value"
                ?defValue       0
                ?type           "int"
                ?display        "t"
            )
    
            ;;; Simulator Information
            cdfId->simInfo = list( nil )
            cdfId->simInfo->UltraSim = '( nil )
            cdfId->simInfo->ams = '( nil )
            cdfId->simInfo->auCdl = '( nil )
            cdfId->simInfo->auLvs = '( nil )
            cdfId->simInfo->cdsSpice = '( nil )
            cdfId->simInfo->hspiceD = '( nil )
            cdfId->simInfo->hspiceS = '( nil )
            cdfId->simInfo->spectre = '( nil )
            cdfId->simInfo->spectreS = '( nil )
    
            ;;; Properties
            cdfId->formInitProc            = ""
            cdfId->doneProc                = ""
            cdfId->buttonFieldWidth        = 340
            cdfId->fieldHeight             = 35
            cdfId->fieldWidth              = 350
            cdfId->promptWidth             = 175
            cdfId->paramLabelSet           = "buswidth busvalue"
            cdfId->paramDisplayMode        = "parameter"
            cdfId->paramEvaluate           = "t nil nil nil nil"
            cdfSaveCDF( cdfId )
        ) ; let
    ) ; let
    
    

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    Hi Mitchell,

    Try this code - it works for me in IC5141 - I can place an instance and CDL it out with no issues. You'll probably need to change the lib name near the top of the code, which is where it places the new "busset" pcell.

    Regards,

    Andrew.

    /* busset.il
    
    Author     A.D.Beckett
    Group      Custom IC, Cadence Design Systems Ltd.
    Machine    SUN
    Date       Jul 11, 2004 
    Modified   
    By         
    
    SKILL code for creating the "busset" pcell schematic, symbol,
    and the CDF as well.
    
    ***************************************************
    
    SCCS Info: @(#) busset.il 04/20/11.13:51:09 1.2
    
    */
    
    let( (library cell pcellId)
        library="training"
        cell="busset"
        unless(ddGetObj(library)
            error("Couldn't open library %L" library)
        )
    
        ;--------------------------------------------------------------------
        ; First the schematic
        ;--------------------------------------------------------------------
        pcellId=pcDefinePCell(
            list(ddGetObj(library) cell "schematic" "schematic")
    
            ;----------------------------------------------------------------
            ; Formal parameters
            ;----------------------------------------------------------------
            (
                (buswidth 6)
                (busvalue 0)
            )
    
            ;----------------------------------------------------------------
            ; Code itself
            ;----------------------------------------------------------------
            let(( cv master instId netH netL 
                busOut driveName driveNet)
    
            cv = pcCellView
            ;----------------------------------------------------------------
            ; Convert parameters, and figure out drive net name
            ;----------------------------------------------------------------
            when(buswidth<1 buswidth=1)
            for(bit 0 buswidth-1
                if(driveName then
                    driveName=strcat("," driveName)
                else
                    driveName=""
                ) ; if
                driveName=strcat(
                    if(busvalue<bit>==1 "hi" "lo")
                    driveName
                )
            ) ; for
    
            ;----------------------------------------------------------------
            ; open master cell view
            ;----------------------------------------------------------------
            master = dbOpenCellViewByType( "basic" "cds_thru" "symbol" nil "r" )
            ;----------------------------------------------------------------
            ; create the nets
            ;----------------------------------------------------------------
            netH=dbMakeNet(cv "hi")
            netL=dbMakeNet(cv "lo")
            busOut=dbMakeNet(cv sprintf(nil "bus<%d:0>" buswidth-1))
            driveNet=dbMakeNet(cv driveName)
            ;----------------------------------------------------------------
            ; create the terminals
            ;----------------------------------------------------------------
            dbCreateTerm(netH netH~>name "inputOutput")
            dbCreateTerm(netL netL~>name "inputOutput")
            dbCreateTerm(busOut busOut~>name "inputOutput")
            ;----------------------------------------------------------------
            ; create the instance of cds_thru
            ;----------------------------------------------------------------
            instId = 
                dbCreateInst(
                    cv master sprintf(nil "thru<%d:0>" buswidth-1)
                    0:0 "R0"
                )
            ;----------------------------------------------------------------
            ; Connect it up
            ;----------------------------------------------------------------
            dbCreateConnByName(busOut instId "dst");
            dbCreateConnByName(driveNet instId "src");
    
            ;----------------------------------------------------------------
            ; Make the connectivity look up to date - not always needed, but
            ; Assura needs this, for example.
            ;----------------------------------------------------------------
            dbSetConnCurrent(cv)
    
            dbClose( master )
            t
            ) ; let
        )
        dbSave(pcellId)
        dbClose(pcellId) 
    
        ;--------------------------------------------------------------------
        ; Now the symbol
        ;--------------------------------------------------------------------
        pcellId=pcDefinePCell(
            list(ddGetObj(library) cell "symbol" "schematicSymbol")
    
            ;----------------------------------------------------------------
            ; Formal parameters
            ;----------------------------------------------------------------
            (
                (buswidth 6)
                (busvalue 0)
            )
    
            ;----------------------------------------------------------------
            ; Code itself
            ;----------------------------------------------------------------
            let(( cv netH netL 
                busOut figH figL figBus hp ps pl bw lh
                pxc label)
    
            cv = pcCellView
    
            ;----------------------------------------------------------------
            ; Various dimensions
            ;----------------------------------------------------------------
            ; half pin size
            hp=0.025
            ; pin spacing
            ps=0.125
            ; pin length
            pl=0.250
            ; box width
            bw=1.4375
            ; label height
            lh=0.0625
            ; param label x coord
            pxc=0.5
    
            ;----------------------------------------------------------------
            ; create the shapes - first the pins
            ;----------------------------------------------------------------
            figH = dbCreateRect(cv list("pin" "drawing") list(-hp:-hp hp:hp)) 
            dbCreateLine(cv list("device" "drawing") list(0:0 pl:0))
            figL = dbCreateRect(cv list("pin" "drawing") list(-hp:-ps-hp hp:-ps+hp))
            dbCreateLine(cv list("device" "drawing") list(0:-ps pl:-ps))
            figBus = dbCreateRect(cv list("pin" "drawing")
                list(2*pl+bw-hp:-hp 2*pl+bw+hp:hp)
            ) ; dbCreateRect
            dbCreateLine(cv list("device" "drawing") list(pl+bw:0 2*pl+bw:0))
            ;----------------------------------------------------------------
            ; Then the boxes
            ;----------------------------------------------------------------
            dbCreateRect(cv list("device" "drawing") list(pl:-2*ps pl+bw:ps))
            dbCreateRect(cv list("instance" "drawing") list(0:-2*ps 2*pl+bw:ps))
    
            ;----------------------------------------------------------------
            ; create the nets
            ;----------------------------------------------------------------
            netH=dbMakeNet(cv "hi")
            netL=dbMakeNet(cv "lo")
            busOut=dbMakeNet(cv sprintf(nil "bus<%d:0>" buswidth-1))
            ;----------------------------------------------------------------
            ; create the terminals
            ;----------------------------------------------------------------
            dbCreateTerm(netH netH~>name "inputOutput")
            dbCreateTerm(netL netL~>name "inputOutput")
            dbCreateTerm(busOut busOut~>name "inputOutput")
            ;----------------------------------------------------------------
            ; create the pins
            ;----------------------------------------------------------------
            dbCreatePin(netH figH)
            dbCreatePin(netL figL)
            dbCreatePin(busOut figBus)
    
            ;----------------------------------------------------------------
            ; Put some labels for the pins
            ;----------------------------------------------------------------
            dbCreateLabel(cv list("pin" "drawing") pl+ps/2:0
                netH~>name "centerLeft" "R0" "stick" lh)
            dbCreateLabel(cv list("pin" "drawing") pl+ps/2:-ps
                netL~>name "centerLeft" "R0" "stick" lh)
            dbCreateLabel(cv list("pin" "drawing") bw+pl-ps/2:0
                busOut~>name "centerRight" "R0" "stick" lh)
    
            ;----------------------------------------------------------------
            ; And other symbol labels
            ;----------------------------------------------------------------
            label=dbCreateLabel(cv list("annotate" "drawing7") bw+pl-ps/2:ps*1.5
                "cdsName()" "centerRight" "R0" "stick" lh)
            label~>labelType="ILLabel"
            label=dbCreateLabel(cv list("annotate" "drawing") pxc:0
                "cdsParam(1)" "centerLeft" "R0" "stick" lh)
            label~>labelType="ILLabel"
            label=dbCreateLabel(cv list("annotate" "drawing") pxc:-ps
                "cdsParam(2)" "centerLeft" "R0" "stick" lh)
            label~>labelType="ILLabel"
    
            t
            ) ; let
        )
        dbSave(pcellId)
        dbClose(pcellId) 
    
    ;------------------------------------------------------------------------
    ; Now create the CDF
    ;------------------------------------------------------------------------
        let( (cellId cdfId )
            unless( cellId = ddGetObj( library cell )
                error( "Could not get cell %s." cell )
            )
            when( cdfId = cdfGetBaseCellCDF( cellId )
                cdfDeleteCDF( cdfId )
            )
            cdfId  = cdfCreateBaseCellCDF( cellId )
    
            ;;; Parameters
            cdfCreateParam( cdfId
                ?name           "buswidth"
                ?prompt         "Bus Width"
                ?defValue       6
                ?type           "int"
                ?display        "t"
            )
            cdfCreateParam( cdfId
                ?name           "busvalue"
                ?prompt         "Bus Value"
                ?defValue       0
                ?type           "int"
                ?display        "t"
            )
    
            ;;; Simulator Information
            cdfId->simInfo = list( nil )
            cdfId->simInfo->UltraSim = '( nil )
            cdfId->simInfo->ams = '( nil )
            cdfId->simInfo->auCdl = '( nil )
            cdfId->simInfo->auLvs = '( nil )
            cdfId->simInfo->cdsSpice = '( nil )
            cdfId->simInfo->hspiceD = '( nil )
            cdfId->simInfo->hspiceS = '( nil )
            cdfId->simInfo->spectre = '( nil )
            cdfId->simInfo->spectreS = '( nil )
    
            ;;; Properties
            cdfId->formInitProc            = ""
            cdfId->doneProc                = ""
            cdfId->buttonFieldWidth        = 340
            cdfId->fieldHeight             = 35
            cdfId->fieldWidth              = 350
            cdfId->promptWidth             = 175
            cdfId->paramLabelSet           = "buswidth busvalue"
            cdfId->paramDisplayMode        = "parameter"
            cdfId->paramEvaluate           = "t nil nil nil nil"
            cdfSaveCDF( cdfId )
        ) ; let
    ) ; let
    
    

     

    • 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