Home > Community > Forums > Custom IC Design > virtuoso clipboard - exists?

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 virtuoso clipboard - exists? 

Last post Sun, Dec 2 2012 8:18 AM by swdesigner. 8 replies.
Started by swdesigner 29 Nov 2012 01:48 PM. Topic has 8 replies and 1414 views
Page 1 of 1 (9 items)
Sort Posts:
  • Thu, Nov 29 2012 1:48 PM

    virtuoso clipboard - exists? Reply

    Is there a way to do this?

    I'm looking at a schematic deep down in the hierarchy. I select some components. Is there a way to copy this to a "clipboard" - cadence-specific?

    What I'd like to be able to do is then return-to-top and paste this selection.

    Thanks

    • Post Points: 20
  • Thu, Nov 29 2012 1:57 PM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 393
    • Points 7,415
    Re: virtuoso clipboard - exists? Reply

    Take a look at this post on the Skill forum:

     http://www.cadence.com/Community/forums/p/22245/1310412.aspx#1310412

    This describes it for layout, but I think it should work for schematics too.

    Derek

    • Post Points: 20
  • Thu, Nov 29 2012 2:16 PM

    Re: virtuoso clipboard - exists? Reply
    Thanks. Bit of a learning curve there, but I should be able to do it. I think this should be a permanent feature in the future..
    • Post Points: 20
  • Thu, Nov 29 2012 2:19 PM

    Re: virtuoso clipboard - exists? Reply

    Isn't the simplest thing to do just to open another schematic window (mylib/clipboard/schematic) and copy into that, and then copy into the top cellView once you've returned?

    You don't have to save the cellView - and it will get deleted as soon as you close it (discarding the changes).

    Andrew.

    • Post Points: 20
  • Thu, Nov 29 2012 2:22 PM

    Re: virtuoso clipboard - exists? Reply

    Debatable... I think the best user-experience is with

    select -> CTRL-C -> return_to_top -> CTRL-V (components pasted, and selected, so they can by moved )

    • Post Points: 20
  • Thu, Nov 29 2012 2:33 PM

    Re: virtuoso clipboard - exists? Reply

    I understand - and it would be trivial to do precisely that under the hood. We've also been looking into having more of this kind of copy-paste paradigm in the tools. That said, the approach I suggested is hardly onerous on the user!

    Ah, I just remembered that I wrote something to do precisely this, although for layout. It probably needs a bit of work to make it work OK with schematic. If I have a moment later today I'll see what I can do to update it for schematic/symbol copying too.

    [Removed code - newer version below in thread which supports schematics]

     

    • Post Points: 20
  • Thu, Nov 29 2012 2:36 PM

    Re: virtuoso clipboard - exists? Reply

    Thanks! That would be super if we can get that for the schematic/symbol.

    Best..

    • Post Points: 20
  • Sun, Dec 2 2012 7:31 AM

    Re: virtuoso clipboard - exists? Reply

    OK, here's the updated version that should work with schematics (sorry, ran out of time to do it the other day). If you define two bindkeys, one with abCopyPaste->copy() and another with abCopyPaste->paste() it will do what you want - if you have infix turned on, it won't prompt you for a reference point (you can control that separately for layout - see the comments at the top for details).

    Andrew.

    /* abCopyPaste.ils
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Nov 24, 2008 
    Modified   A.D.Beckett
    By         Dec 02, 2012 
    
    A package to copy and paste into a buffer (default lib/copyBuffer/copyBuffer
    where lib is the same library you're working in). Smarter than yank/paste.
    Updated in Dec 2012 to handle views other than layout.
    
    ; copy into buffer cellView
    abCopyPaste->copy()
    
    ; paste from buffer cellView
    abCopyPaste->paste()
    
    ; without this, the copyBuffer is in the same library as
    ; the cell being edited
    abCopyPaste->setOption('bufferLib "mylib")
    
    ; normally uses the reference point (for layout), but can also prompt
    ; for it
    abCopyPaste->setOption('promptRefPoint t)
    
    ***************************************************
    
    SCCS Info: @(#) abCopyPaste.ils 12/02/12.15:25:04 1.3
    
    */
    
    (importSkillVar abCopyPaste)
    (setq abCopyPaste
          (let (
                (options (makeTable 'options nil))
                (optionNames '(bufferLib bufferCell bufferView 
                                         promptRefPoint))
                )
            /***************************************************************
            *                                                              *
            *                (setOption option value "sg")                 *
            *                                                              *
            *  Exported function for setting an option for the copy/paste  *
            *    package. Needs the name of the option and a value. The    *
            *     name is checked to ensure it is a valid option name.     *
            *                                                              *
            ***************************************************************/
            (defun setOption (option value "sg")
              (if (memq option optionNames)
                (setarray options option 
                          (if (listp value) (copy value) value)
                          )
                (error "Unrecognised option %L - must be one of %L\n"
                       option optionNames)
                )
              ) ; defun setOption
            /***************************************************************
            *                                                              *
            *                 (getOption @optional option)                 *
            *                                                              *
            *  Exported function for getting the value of an option or a   *
            *               list of the legal option names.                *
            *                                                              *
            ***************************************************************/
            (defun getOption (@optional option)
              (if option
                (if (memq option optionNames)
                  (arrayref options option)
                  (error "Unrecognised option %L - must be one of %L\n"
                         option optionNames)
                  )
                (sort (copy optionNames) 'alphalessp)
                )
              ) ; defun getOption
            /***************************************************************
            *                                                              *
            *                      (copyToBuf [cv])                        *
            *                                                              *
            *   Exported function to copy selected objects into a buffer   *
            *                                                              *
            ***************************************************************/
            (defun copyToBuf (@optional (cv (geGetEditCellView)))
              (let (buffer refPoint transform bufferView
                           (cellViewType (getq cv cellViewType)))
                (setq bufferView 
                      (strcat (arrayref options 'bufferView) "_" cellViewType))
                (setq buffer 
                      (dbOpenCellViewByType
                        (or (arrayref options 'bufferLib)
                            (getq cv libName))
                        (arrayref options 'bufferCell)
                        bufferView
                        cellViewType
                        "w"
                        ))
                (unless buffer
                  (error "Could not create copy buffer %s/%s/%s"
                         (or (arrayref options 'bufferLib)
                             (getq cv libName))
                         (arrayref options 'bufferCell)
                         bufferView
                         ))
                (setq refPoint
                      (if (or (arrayref options 'promptRefPoint)
                              (null (leGetRefPoint cv))
                              (nequal (getq cv cellViewType) "maskLayout"))
                        (enterPoint ?prompts 
                                    (list "Point at the reference point for the copy:"))
                        (leGetRefPoint cv)))
                (when (equal (getq cv cellViewType) "maskLayout")
                  (leSetRefPoint cv refPoint))
                (setq transform
                      (list (mapcar minus refPoint) "R0" 1.0))
                (foreach fig (geGetSelectedSet cv)
                         (dbCopyFig fig buffer transform)
                         )
                (dbSave buffer)
                (dbClose buffer)
                )
              )
            /***************************************************************
            *                                                              *
            *                           (paste)                            *
            *                                                              *
            * Exported function to paste buffer into cellView at prompted  *
            *                            point                             *
            *                                                              *
            ***************************************************************/
            (defun paste ()
              (enterPoint ?prompts (list "Point at destination location:")
                          ?doneProc "abCopyPaste->pasteDone"
                          )
              t
              )
            /***************************************************************
            *                                                              *
            *                 (pasteDone wid done points)                  *
            *                                                              *
            *   Exported function (used by enterFunction in (paste)) to    *
            *                   actually do the pasting.                   *
            *                                                              *
            ***************************************************************/
            (defun pasteDone (wid done points)
              (let (transform cv buffer cellViewType bufferView)
                (when done
                  (setq transform (list (car points) "R0" 1.0))
                  (setq cv (geGetEditCellView wid))
                  (setq cellViewType (getq cv cellViewType))
                  (setq bufferView 
                        (strcat (arrayref options 'bufferView) "_" cellViewType))
                  (setq buffer (dbOpenCellViewByType
                                 (or (arrayref options 'bufferLib)
                                     (getq cv libName))
                                 (arrayref options 'bufferCell)
                                 bufferView
                                 cellViewType
                                 "r"
                                 ))
                  (if buffer
                    (progn
                      (foreach objs 
                               (list
                                 (getSGq buffer shapes)
                                 (getSGq buffer instances)
                                 (getSGq buffer vias)
                                 (getSGq buffer figGroups)
                                 (getSGq buffer mosaics)
                                 (getSGq buffer blockages)
                                 (getSGq buffer rows)
                                 (getSGq buffer markers)
                                 (getSGq buffer areaBoundaries)
                                 (getSGq buffer guides)
                                 (getSGq buffer routes)
                                 (getSGq buffer steiners)
                                 )
                               (foreach fig objs
                                        (dbCopyFig fig cv transform)
                                        ) ; foreach fig
                               ) ; foreach objs
                      (dbClose buffer)
                      )
                    (warn "Could not open copy buffer %s/%s/%s"
                          (or (arrayref options 'bufferLib)
                              (getq cv libName))
                          (arrayref options 'bufferCell)
                          bufferView
                          )
                    )
                  t
                  ) ; when
                ) ; let
              ) ; defun pasteDone
            ;----------------------------------------------------------------
            ; Defaults
            ;----------------------------------------------------------------
            (setarray options 'bufferLib nil)
            (setarray options 'bufferCell "copyBuffer")
            (setarray options 'bufferView "copyBuffer")
            ;----------------------------------------------------------------
            ; The DPL containing all the exported functions for the
            ; package
            ;----------------------------------------------------------------
            (list nil
              'setOption setOption
              'getOption getOption
              'copy copyToBuf
              'paste paste
              'pasteDone pasteDone
              ) ; list
            ) ; let
          ) ; setq abCopyPaste
    

     

    • Post Points: 20
  • Sun, Dec 2 2012 8:18 AM

    Re: virtuoso clipboard - exists? Reply
    Thanks! Apologies in advance if I don't update in a timely way with my test results..
    • Post Points: 5
Page 1 of 1 (9 items)
Sort Posts:
Started by swdesigner at 29 Nov 2012 01:48 PM. Topic has 8 replies.