Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with Copying cells

772 views
Skip to first unread message

Guenther Sohler

unread,
Jul 20, 2007, 8:19:32 AM7/20/07
to
Dear Group,

We started putting our cadence database under revision control.
Thus there sit lots of .svn directories within the library subtree.
Now, when I want to copy a cell with library manager to another one.
Its .svn directory is also copied, which is NOT inteded. It definetly
will confuse SVN and SVN consistency.
New files appearing in the filesystem(like the COPY of a cell) shall
effectively NOT be under revision control

My intent is telling cadence just to copy the KNOWN files, not all files

I found some link into this topic modifying the data.reg file but
I have just found a way of LINKING relations, not FORBIDDING relations.

Can anybody guide me to the correct way ?

rds

Poojan Wagh

unread,
Jul 20, 2007, 11:07:01 AM7/20/07
to
I had the same problem using subversion. I basically ended up only
copying only the files listed as being members of the cell using the
"svn cp" command. This is what you really want, as it tells subversion
of the ancestry of each cell/file. I will e-mail you my skill script
that does this directly.

My company was lucky enough to have previewed ICManage's offering.
Their implementation of version control under Cadence seemed like a
good choice. Unfortunately, we didn't have a budget allocated for
version control. Consider contacting them, since they have solved many
of these problems already.

Fergus_S

unread,
Jul 20, 2007, 7:15:21 PM7/20/07
to

According to the cdsCopy documentation it should be possible to
exclude the
.svn directories from the copy operation by registering a trigger
function to
remove them from the copy list, something like this:

/*********************************************************************
* myCcpPostExpandTrigger
*
* cdsCopy trigger function to prevent copy of .svn directories
* Modifies the value of checkOffList in place.
********************************************************************/
procedure( myCcpPostExpandTrigger(myFunction copyPhaseStr
checkOffList
supplementList otherFromSpecs otherToSpecs updateList
retHint ctxList reserved )
let(( fromSpec )
;;---------------------------------------------------------------------
;; Exclude all dot dirs and files from copy
;;---------------------------------------------------------------------
foreach( copyObj checkOffList
when( fromSpec = cadr(copyObj)
fromSpec = gdmInspectSpec(fromSpec)
when( rexMatchp("^\\." car(last(fromSpec)))
;;---------------------------------------------------------
;; Mark this item for ignore by cdsCopy, set
retHint
;;---------------------------------------------------------
setcar( copyObj nil )
retHint = list(t)
fromSpec = buildString(setof(x fromSpec
stringp(x)) "/")
printf("Will not copy %L\n" fromSpec)
); when rexMatchp
); when fromSpec
); foreach copyObj
t
); let
); procedure myCcpPostExpandTrigger

Which is registered with the 'canEdit' flag set, per the documentation

ccpRegTrigger( "ccpPostExpandTrigger" 'myCcpPostExpandTrigger t )

The trigger function is called because I do see the 'Will not copy'
messages,
but the .svn directories are copied anyway, so it's not working as
expected.
It's not even clear how it's supposed to work, since any change to
variables
inside the trigger function would not normally be visible outside the
scope of
the function, right?

You *can* remove the .svn directories from the copied library by
defining and
registering a different cdsCopy trigger, which is an acceptable
solution if you
are not copying data into another Subversion-managed library.

/
******************************************************************************
* myCcpPostTransferTrigger
* Description: cdsCopy trigger to delete dot dirs in destination
library
* Only required because vscCcpPostExpandTrigger doesn't
work

*****************************************************************************/
procedure( myCcpPostTransferTrigger( _funcName _copyPhaseStr
_checkOffList
_supplementList
_otherFromSpecs otherToSpecs
_updateList _retHint _ctxList
_reserved )
let(( toSpec toGdm ddObj )
;;---------------------------------------------------------------------
;; Delete dot dirs and files from destination data
;;---------------------------------------------------------------------
while( toSpec = gdmNextFromSpecList( otherToSpecs )
toGdm = gdmInspectSpec(toSpec)
when( rexMatchp("^\\.svn" car(last(toGdm))) &&
(ddObj =
apply('ddGetObj toGdm))
vscSystem(strcat("rm -rf " ddObj~>readPath))
); when rexMatchp
); while toSpec
t
); let
); procedure myCcpPostTransferTrigger

ccpRegTrigger( "ccpPostTransferTrigger" 'myCcpPostTransferTrigger )

*** http://www.methodics-eda.com - VersIC DDM for Cadence ***

Poojan Wagh

unread,
Jul 21, 2007, 12:01:16 PM7/21/07
to
Correction to my previous post: I had meant to recommend VersIC, not
IC Manage. VersIC was the tool that we were able to preview at my
company, that had subversion integration already done. I was very
impressed with their offering.

Guenther Sohler

unread,
Jul 23, 2007, 3:52:07 AM7/23/07
to
Hallo,

I tried the 2nd approach, with ccpRegTrigger(
"ccpPostTransferTrigger" 'myCcpPostTransferTrigger )

defining the function, registering the callback.
But when I copy a cell in library manager, I expect that this
callback is triggered afterwards but it seems that it does not get called
because

* The .svn directory is still there in the copy
* i dont see the debug println
* i dont see the file created with system("touch /tmp/hallo")


What could be wrong ?

Guenther Sohler

unread,
Jul 23, 2007, 3:54:40 AM7/23/07
to

Hallo Poojan,

Thank you for your post and the background information. I see the general
algorithm by just backing up the cadence copy with "svn cp"
I cannot understand why it is an special advantage for cdb data, when
subversion additionally remebers the cells ancester.
Do you think its possible to really REPLACE the original copy item in
library manager ?


Fergus_S

unread,
Jul 23, 2007, 8:59:04 PM7/23/07
to
Perhaps you need to set the variable to make the cdsCopy happen in
DFII - if you don't do this, the triggers are never run:

envSetVal("ddserv.lib" "enableCopyInDFII" 'boolean t)

fergus

Fergus_S

unread,
Jul 23, 2007, 9:07:50 PM7/23/07
to
Thanks to Amir at Cadence for showing me that retHint needs to be
modified in place to be visible to the calling function.
So the working code is:

procedure( myCcpPostExpandTrigger(myFunction copyPhaseStr
checkOffList
supplementList otherFromSpecs otherToSpecs updateList
retHint ctxList reserved )
let(( fromSpec )
;;---------------------------------------------------------------------
;; Exclude all dot dirs and files from copy
;;---------------------------------------------------------------------
foreach( copyObj checkOffList
when( fromSpec = cadr(copyObj)
fromSpec = gdmInspectSpec(fromSpec)
when( rexMatchp("^\\." car(last(fromSpec)))
;;---------------------------------------------------------
;; Mark this item for ignore by cdsCopy, set
retHint
;;---------------------------------------------------------
setcar( copyObj nil )

setcar(retHint t)


fromSpec = buildString(setof(x fromSpec
stringp(x)) "/")
printf("Will not copy %L\n" fromSpec)
); when rexMatchp
); when fromSpec
); foreach copyObj
t
); let
); procedure myCcpPostExpandTrigger

ccpRegTrigger( "ccpPostExpandTrigger" 'myCcpPostExpandTrigger t )

> ***http://www.methodics-eda.com- VersIC DDM for Cadence ***

Poojan Wagh

unread,
Jul 24, 2007, 12:51:46 PM7/24/07
to
Either copying with ancestry (using subversion) or a simple replace
(outside of subversion) are possible. Which one you choose to do
simply depends on the purpose of your operation and what methodology
you wish to follow (i.e. how much you want to use subversion's
facilities).

I was operating on the assumption that if you use subversion, you do
want to keep track of ancestry. Note that subversion can merge single
changes to binary files. It just cannot merge multiple changes to
binary files. Let's suppose:
1. You have an LNA for part1
2. You copy it (with ancestry) to part2
3. You improve on it in part2
4. You want the same changes applied to part1
Subversion can do that provided the LNA in part1 has not changed in-
between step 2 & 4.

Of course, you are always able to do a simple copy (using Cadence but
overloaded so that .svn directories don't come along). This action is
definitely more direct from a user perspective, and I believe is the
problem that you were initially trying to tackle.

However, if you use subversion to merge the changes (using a tool like
svnmerge), the repository also keeps track of which changes went where.

Guenther Sohler

unread,
Aug 8, 2007, 5:21:59 AM8/8/07
to
Thank you now it works,

but you have to change it to

> * myCcpPostExpandTrigger
> setcar(rethint,t)


rds


0 new messages