• 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. Define libraries as read-only

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 124
  • Views 16736
  • 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

Define libraries as read-only

HoWei
HoWei over 5 years ago

Hi,

is there a way in cds.lib to define libraries as "read-only" ?

I do have libs defined in cds.lib from another project, which I want to have read-only.

I do not want to set permissions via the Linux system, because there is a revision control system in between.

Instead I am looking for a way to write-lock (read-only) libs with Cadence settings

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago

    You can't do this in the cds.lib  but with a bit of SKILL code you can create a trigger that a achieves the same thing. This code below (keep the .ils suffix because it relies on SKILL++ lexical scoping) can do this - the comments at the top explain how to use this:

    /* abReadOnlyLibs.ils
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Jan 20, 2020 
    Modified   
    By         
    
    Registers a list of libraries to be readonly in this session:
    
    abReadOnlyLibs(list("mylib" "yourlib"))
    
    If you need to make them editable again, you can do:
    
    abReadOnlyLibs(nil ?reset t)
    
    or
    
    abReadOnlyLibs(list("newlib") ?reset t)
    
    ***************************************************
    
    SCCS Info: @(#) abReadOnlyLibs.ils 01/20/20.11:37:49 1.1
    
    */
    
    
    let((readOnlyLibs)
        /**********************************************************************
        *                                                                     *
        *                abReadOnlyLibs(listOfLibs @key reset)                *
        *                                                                     *
        * Register a list of libraries to be readonly. If ?reset t is passed, *
        *       it forgets any previously registered readonly libraries       *
        *                                                                     *
        **********************************************************************/
        globalProc(abReadOnlyLibs(listOfLibs @key reset)
            when(reset || !readOnlyLibs
                readOnlyLibs=makeTable('readOnlyLibs t)
            )
            foreach(libName listOfLibs
                readOnlyLibs[libName]=nil
            )
            ddRegTrigger("PreAutoCheckOut" 'abReadOnlyLibsPreAutoCheckOut 1)
            t
        )
    
        /***********************************************************************
        *                                                                      *
        *      abReadOnlyLibsPreAutoCheckOut(@optional objList _isBatch)       *
        *                                                                      *
        * Trigger which does the work to check whether you are allowed to edit *
        *                          the object or not                           *
        *                                                                      *
        ***********************************************************************/
        globalProc(abReadOnlyLibsPreAutoCheckOut(@optional objList _isBatch)
            foreach(mapcar obj objList
                readOnlyLibs[obj->lib->name]
            )
        )
    )
    

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • HoWei
    HoWei over 5 years ago in reply to Andrew Beckett

    Too bad that there is no"non-scripting" way.

    I will try when I find some time.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to HoWei
    HoWei said:
    Too bad that there is no"non-scripting" way

    There might be a way with your revision control system too. The code above is not very complicated, and certainly a reasonable approach for something a little non-standard. This is one of the reasons why we have a powerful programming capability with SKILL in Virtuoso!

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • HoWei
    HoWei over 5 years ago in reply to Andrew Beckett

    Yes, that is another option, but unfortunately (as we have setup our revision control environment), we can only lock complete "referenced project", but not single libs within these "referenced projects". Of course there are also ways that include scripting (pre-chkout-triggers and so on) to achieve it - but its not very handy for designers.

    There are option and we have to find the way that matches best to our environment.

    • 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