• 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 Design
  3. create schematic warning markers

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 125
  • Views 16359
  • 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

create schematic warning markers

danmc91
danmc91 over 10 years ago

IC6.1.6

RHEL5.5

Virtuoso Schematic Editor

I have some code which gets triggered by schematic check and save.  If the code doesn't like something about one of the instances I want to create a warning and add a warning marker.

I have tried

rectId = dbCreateRect(cvId list("marker" "warning") instId->bBox)
;; add appropriate properties to box for proper marker browsing
dbCreateProp(rectId "schDisplay" "string" "Warning Reason")

dbCreateProp(rectId "schCreatedBy" "string" "WarningOwner")
dbCreateProp(rectId "schMarker" "string" "Warning")

and that seemed to work but with IC6 I no longer can see the warning reason when I search for markers.  Also I'd rather use the select box instead of bounding box.

Then I tried:

geCreateMarker(instId, "warning", "WarningOwner", "WarningReason", "WarningReason")

This works in IC616, I can see the reason in the list of markers, and also it uses the select box.  However, I messes up the last extraction time relative to the last modified time so I can't netlist if there is a warning.

I'm invoking the skill code via

schRegPostCheckTrigger('my_skill_procedure)

At the end of my procedure I'm also making a call to

schUpdateUserSRCErrorAndWarn(my_err_count, my_warn_count)

My questions are:

1)  what is the "right" way to add warning markers to the schematic?

2) how can I access a select box for an instance?

3) while we are at it, what is the "right" way to add a warning marker to a layout?

Thanks

-Dan

  • Cancel
  • skillUser
    skillUser over 10 years ago

    Hi Dan,

    There are a few "ge" prefix functions for creating markers, or you can create them at the lowest level (either schematic or layout) using dbCreateMarker().  In IC6x and IC12x the marker is an object as opposed to the previous "shape" with properties on it. For layout or schematic either of these methods should be the 'right' way.  I have not looked in detail, but isn't the instance bounding box instId~>bBox sufficient as an answer for 2) ?

    I hope this helps you!

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    I thought I'd answered this before, but I was going to give these answers to your three questions:

    1. There's some newer APIs for doing this which interface more closely with the check infrastructure, and takes care of the marker creation. See the example code below. The alternative is to use dbCreateMarker - and you can use dbSetConnCurrent in your code after modifications if there are no errors.
    2. Look for the instance/drawing layer in the symbol, and find the bBox of  that - if there's no instance/drawing layer, then it's the ~>bBox of the symbol.
    3. This too would be dbCreateMarker

    Here's the code I was mentioning:

    /* abExampleSchematicCheckNew.ils
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Oct 28, 2011 
    Modified   
    By         
    
    This is a reimplementation of some of the checks in abExampleSchematicCheck.ils
    but taking advantage of the new interface in IC615 to register checks with
    the system. As a result it is much simpler, and does not have to take care
    of creating marker objects itself; also gives the user the ability to override
    the check, or change the severity if needed.
    
    To register, call:
    
    abRegExampleSchematicCheckNew("Your Customer Name")
    
    (with no arguments, it just calls the rule group "Customer")
    
    ***************************************************
    
    SCCS Info: @(#) abExampleSchematicCheckNew.ils 10/28/11.10:55:00 1.1
    
    */
    
    ;------------------------------------------------------------------------
    ; The let is to create a lexical scope, so that there can be
    ; private functions which are used for some of the implementation
    ;------------------------------------------------------------------------
    let(()
    
        /***************************************************************
        *                                                              *
        *  abRegExampleSchematicCheckNew([?customerName "Customer"])   *
        *                                                              *
        * PUBLIC GLOBAL function used to register the new check group  *
        * and any specific check - in this case an example of a naming *
        *                         convention.                          *
        *                                                              *
        ***************************************************************/
        defglobalfun(abRegExampleSchematicCheckNew (@optional (customerName "Customer"))
            ;----------------------------------------------------------------
            ; This registers a new tab on Check->Rules Setup
            ;----------------------------------------------------------------
            schRegisterCheckGroup(
                ?name concat(customerName)
                ?description strcat(customerName " checks")
            )
            ;----------------------------------------------------------------
            ; This registers the specific rule and default severity
            ;----------------------------------------------------------------
            schRegisterCheckRule(
                ?title "Naming conventions"
                ?name 'namingConventions
                ?groupName concat(customerName)
                ?severity 'error
                ?checkCB checkNamingConventions
            )
        )
    
        /*********************************************************************
        *                                                                    *
        *               checkNamingConventions(cv ruleObject)                *
        *                                                                    *
        * INTERNAL function used to actually implement the naming convention *
        *                               check.                               *
        *                                                                    *
        *********************************************************************/
        defun(checkNamingConventions (cv ruleObject)
            let((obj label netTable signals sigTable)
                ;------------------------------------------------------------
                ; Check that terminal names are in upper case
                ;------------------------------------------------------------
                foreach(term cv~>terminals
                    unless(term~>name==upperCase(term~>name)
                        ;----------------------------------------------------
                        ; Place the marker on the first pin - no need to
                        ; put it on every pin if there are multiple pins
                        ;----------------------------------------------------
                        obj=car(term~>pins~>fig) || cv
                        schReportCheckFailure(
                            ?object obj
                            ?checkRule ruleObject
                            ?short "Terminals not upper case"
                            ?message
                                sprintf(nil "Terminals must be in upper case: %s" 
                                    term~>name
                                ) 
                        ) 
                    ) ; unless
                ) ; foreach
                ;------------------------------------------------------------
                ; Check for internal nets which have a lower case name
                ;------------------------------------------------------------
                foreach(net cv~>nets
                    ;--------------------------------------------------------
                    ; Only worry about nets which have a label
                    ;--------------------------------------------------------
                    label=car(exists(fig net~>figs fig~>objType=="label"))
                    when(label
                        when(exists(sig net~>signals 
                            ;------------------------------------------------
                            ; Check that the signal is not part of a 
                            ; terminal, and is not in lowercase
                            ;------------------------------------------------
                            !sig~>memTerms && sig~>name!=lowerCase(sig~>name))
                            schReportCheckFailure(
                                ?object label
                                ?checkRule ruleObject
                                ?short "Internal nets not lower case"
                                ?message
                                    sprintf(nil "Internal net names must be in lower case: %s"
                                        net~>name
                                    ) 
                            ) 
                        ) ; when there is a lower internal net name on net
                    ) ; when there's a label
                ) ; foreach
                ;------------------------------------------------------------
                ; Check for any nets which only differ in case
                ;------------------------------------------------------------
                ;------------------------------------------------------------
                ; record all the signals together in a table indexed by
                ; the flattened case. Then use a table to record all
                ; member nets which have a mixed-case problem
                ;------------------------------------------------------------
                sigTable=makeTable('sigTable nil)
                netTable=makeTable('netTable nil)
                foreach(sig cv~>signals
                    sigTable[lowerCase(sig~>name)]=
                        cons(sig sigTable[lowerCase(sig~>name)])
                ) ; foreach
                foreach(tableEntry sigTable
                    signals=sigTable[tableEntry]
                    ;--------------------------------------------------------
                    ; If there was more than one signal with the
                    ; same flattened case, then there's
                    ; a mixed name problem. Record the member nets
                    ; in a table (to avoid duplication)
                    ;--------------------------------------------------------
                    when(cdr(signals)
                        foreach(sig signals
                            foreach(memNet sig~>memNets
                                netTable[car(memNet)]=signals
                            ) ; foreach memNet
                        ) ; foreach sig
                    ) ; when
                ) ; foreach 
                foreach(net netTable
                    ;--------------------------------------------------------
                    ; Find something suitable to put the marker on
                    ;--------------------------------------------------------
                    cond(
                        ;----------------------------------------------------
                        ; Use the pin if there is one
                        ;----------------------------------------------------
                        (net~>term~>pins
                            obj=car(net~>term~>pins~>fig)
                        )
                        ;----------------------------------------------------
                        ; Otherwise use the label
                        ;----------------------------------------------------
                        (obj=car(
                            exists(shape net~>figs 
                                shape~>objType=="label"))
                            t
                        )
                        ;----------------------------------------------------
                        ; Next try a wire
                        ;----------------------------------------------------
                        (obj=car(
                                exists(shape net~>figs
                                    shape~>objType=="line" ||
                                    shape~>objType=="path")
                            )
                            t
                        )
                        ;----------------------------------------------------
                        ; Finally, if nothing else, use the cellView
                        ;----------------------------------------------------
                        (t
                            obj=cv
                        )
                    ) ; cond
                    schReportCheckFailure(
                        ?object obj 
                        ?checkRule ruleObject
                        ?short "Net differing only in case"
                        ?message
                            sprintf(nil 
                                "Net %L cannot differ only in case from others: %L" 
                                net~>name
                                netTable[net]~>name
                            )
                    )
                ) ; foreach
            ) ; let
        ) ; defun checkNamingConventions
    
    )

    Kind Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago
    Conveniently, the functions in black in the code above are the new API ;-)
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

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