• 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. Working with Scratch Cellview

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 15389
  • 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

Working with Scratch Cellview

Yaosan
Yaosan over 15 years ago

As most of you probably know, dbOpenCellViewByType() has a mode known as scratch mode. In this mode, the cellview opened cannot be saved to disk. However, I have some question regarding this mode. First of all, what is the master and context cellview related to the "sc" and "sd" mode? In what kind of situation should I use one of these two modes?

I would also like to know the proper way of working in this scratch view mode. Should I create a new view in scratch mode and copy over the object one by one before I start doing the modification I need? This seems to be quite troublesome IC61x with all the new blockages, vias and other OA objects listed under different property of cellviews.

I tried opening an existing, opened cellview in scratch mode, hoping it will return a new copy i.e. with new dbID that exists only in memory, but somehow it shares the same cellview ID as the original opened cellview. I also tried to use dbCopyCellView() but it won't let me copy to the scratch view unless I specify the overwrite flag, which will write the scratch view to disk, defeating the purpose of having one in the first place.

Lawrence mention scratch mode is handled differently in IC61x and IC51, can someone please explain the differences? Thanks in advance for any feedback.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    A few points, which will hopefully clear things up:

    First of all, a cellView can only be opened once in memory at a time - there's only ever a single cellView ID. So that means it's always in a single mode - if you open a view first in "a", then separately in "r", it will still actually be in "a" mode (for example). 

    Scratch mode was not initially supported in OpenAccess versions, but this was added to enable compatibility with previous code (it was added in an IC612 Hotfix, so it's been there in all IC613 and IC614 versions). It was also there in CDB.

    There are some differences in the way things worth between CDB and OA. In CDB you could not modify the data in a cellView opened in "r" mode; if you wanted to make changes, you needed to open it in "w" (overwrite), "a" (append/edit) or "s" (scratch) mode. Scratch mode means that you cannot save the results, however. In OA, you can actually modify readonly cellViews, but again, you cannot save the results. So strictly (I believe), "s" mode isn't really any different from "r" mode (I've not really checked in OA-enabled versions).

    Note that cellViews opened in scratch mode must exist on disk - although they might be empty. Currently there's no way to open a scratch cellView in memory only (although the edits themselves are only in memry).

    Now about "context" cellViews (referred to in the "sd" and "wd" and "ad" open modes. These are not really used any more - they were in older software versions. So I wouldn't worry about those modes - I've never had to use them.

    The "wc" and "ac" modes are to do with creating database representations alongside (say) textual views. So for example, if you have a Verilog textual view (e.g. a "functional" view, you'll see there's an "OA" representation alongside it). This is a non-master database - and needs to be opened in this "c" mode. 

    For scratch cellViews, it's almost certainly not important to know about the "sc" mode.

    So the best way is if you want to go into "s" mode, you can do so, and then use dbRefreshCellView() and dbReopen(cv "r") once done. Or dbPurge() to purge from memory.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Yaosan
    Yaosan over 15 years ago

    Hi Andrew,

    Thanks for taking the time to respond with such a detailed explanation, I learned a lot from your response.

    I do notice I can now change stuff even though the cellview is in read only mode in IC61. I'm thinking I can skip scratch cellview altogether, make the changes I want directly in an opened, read only cellview, stream out from virtual memory in IC614, then do a dbRefreshCellView() to discard the edit. I hope that works.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • annegry12
    annegry12 over 15 years ago

    yeah, I also needed this information,..thanks ..this is such a big help...I am just new with it and still exploring it..

    • 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