dump instance CDF

F

fogh

Guest
Hi All,

I would like to dump the CDF of an instance. Anyone knows how to that ?
I don t mind if the solution is not neat, for example if it involves creating a
temporary cell to copy the inst CDF to.

//
 
What about

cdfGetInstCDF(d_instId
)
=> cdfDataId / nil

Returns the effective CDF description associated with an instance.

or

cdfSyncInstParamValue(
d_instId1
d_instId2
)
=> t / nil

This function generates all the CDF parameters for the first instance (instId1)
and updates the second instance (instId2) with the same values. Both the
instances must share the same cell.


Bernd


fogh wrote:
Hi All,

I would like to dump the CDF of an instance. Anyone knows how to that ?
I don t mind if the solution is not neat, for example if it involves
creating a temporary cell to copy the inst CDF to.

//
 
Bernd,

I mean to obtain an ascii dump, like the one generated by cdfDump()

Bernd Fischer > wrote:
What about

cdfGetInstCDF(d_instId
)
=> cdfDataId / nil

Returns the effective CDF description associated with an instance.

or

cdfSyncInstParamValue(
d_instId1
d_instId2
)
=> t / nil

This function generates all the CDF parameters for the first instance
(instId1)
and updates the second instance (instId2) with the same values. Both the
instances must share the same cell.


Bernd


fogh wrote:

Hi All,

I would like to dump the CDF of an instance. Anyone knows how to that ?
I don t mind if the solution is not neat, for example if it involves
creating a temporary cell to copy the inst CDF to.

//
 
If I would only have seen your first question, I would have suggested
to use cdfDump() to dump your cdf to ascii.
 
Svenn Bjerkem wrote:
If I would only have seen your first question, I would have suggested
to use cdfDump() to dump your cdf to ascii.
Svenn,
does cdfDump() work on instances ?
 
No it doesn't.

I think the only solution is cdfGetInstCDF(d_inst),
get the atribute/value pair list out of the
cdfDataId and write it into a file, should work.

Bernd

fogh wrote:
Svenn Bjerkem wrote:

If I would only have seen your first question, I would have suggested
to use cdfDump() to dump your cdf to ascii.


Svenn,
does cdfDump() work on instances ?
 
Bernd, Svenn and All,

I made something along the lines of the existing dumper.

_Fat warning_ What this functions dump may or may not be valid skill code. I
never even tried to load it !! The purpose of this dumper is only to make
instance properties more readable. You can for example feed this ascii
representation to a visual diff.

In the disclaimers, I should also add, to spare John G. the effort, that those
procedures do not respect the naming conventions that would let them pass a
SKILL audit, and that they were not linted.

Usage example:
;select the instance you want to inspect the CDF of in virtuoso.
cdfiWriteInstToFile( p=outfile("./foo") car(geGetSelSet()) )
close(p) edit("./foo")


;; ____________________________________________________________________

procedure( cdfiWriteInstToFile(port instId @optional (level 'user))
let( (cdfId)
when(cdfId = cdfGetInstCDF(instId)
cdfiPrintInstHeader(port instId->cellView->lib->name
instId->cellView->cell->name instId->cellView->view->name instId->name)
cdfiPrintParameters(port cdfId)
cdfiPrintSimInfo(port cdfId)
cdfiPrintProperties(port cdfId)
cdfiPrintFooter(port level) t
);when
);let
);proc

procedure( cdfiPrintInstHeader(port libName cellName viewName instName @optional
(level 'user))
fprintf(port "\n")
fprintf(port "/****************************************************/\n")
fprintf(port " LIBRARY = \"%s\"\n" libName)
fprintf(port " CELL = \"%s\"\n" cellName)
fprintf(port " VIEW = \"%s\"\n" viewName)
fprintf(port " REFDES = \"%s\"\n" instName)
fprintf(port "/****************************************************/\n")
fprintf(port "\n")
fprintf(port "let( ( libId cellId celldbId instId cdfId )\n")
fprintf(port " unless( cellId = ddGetObj( LIBRARY CELL )\n")
fprintf(port " error( \"Could not get cell %%s.\" CELL )\n")
fprintf(port " )\n")
fprintf(port " unless( celldbId = dbOpenCellViewByType(LIBRARY CELL VIEW)\n")
fprintf(port " error( \"Could not get cellview %%s %%s.\" CELL VIEW )\n")
fprintf(port " )\n")
fprintf(port " unless( instId = dbFindAnyInstByName(celldbId REFDES)\n")
fprintf(port " error( \"Could not get instance %%s.\" REFDES )\n")
fprintf(port " )\n")
fprintf(port " cdfId = cdfGetInstCDF( instId )\n")
fprintf(port " \n")
)

;; ____________________________________________________________________




Bernd Fischer > wrote:
No it doesn't.

I think the only solution is cdfGetInstCDF(d_inst),
get the atribute/value pair list out of the
cdfDataId and write it into a file, should work.

Bernd

fogh wrote:

Svenn Bjerkem wrote:

If I would only have seen your first question, I would have suggested
to use cdfDump() to dump your cdf to ascii.



Svenn,
does cdfDump() work on instances ?
 
fogh wrote:
In the disclaimers, I should also add, to spare John G. the effort, that those
procedures do not respect the naming conventions that would let them pass a
SKILL audit, and that they were not linted.
Thanks for keeping the process in mind! :)

It's fantastic when the top 1% of the folks out there (like fogh) take
the time and effort and energy to post SKILL code for other users to
benefit and all users want to encourage that as much as possible.

It is always recommended that users should run a two-part Virtuoso CIW:
Tools->SKILL->Survey on any code downloaded from the Internet. This
survey process was designed partly by Andrew Beckett and me (with help
from many others) with the users' needs in mind.

The first part of the SKILL Survey (the inventory) lists every function
defined and called and how many times and exactly where. The (optional)
second part of the SKILL Survey (the audit) provides a web page
complete with a pie chart, function lists with arguments, and function
status by release.

From that data, users can better determine the suitability of the SKILL
programs for their needs which includes ultimately migrating to the
latest & greatest Virtuoso releases.

For example, the SKILL code posted in this thread
(CDFiWriteInstToFile.il) defines two functions:
cdfiPrintInstHeader
cdfiWriteInstToFile

Which (as fogh duly noted), if you decide to use them, Cadence
recommends you rename with an upper-case prefix (e.g. "Cdf...") so that
you can better determine by looking at them that they are not Cadence
supplied SKILL functions.

In addition, CDFiWriteInstToFile.il calls 8 public SKILL functions,
only one of which was changed (very slightly) between any release since
IC441 to IC61. This is a plus for compatibility. The code does call 4
private SKILL functions. Private SKILL functions are those not intended
to be used by Customers and often do little or no error checking. If
private SKILL functions are desired by the users, there is a Customer
Support private SKILL functions resolution process which has been
extremely successful to date in replacing hundreds of private
undocumented & unsupported function calls with public documented &
supported operations. That's a win:win scenario.

As always, hope this helps everyone & thanks for posting SKILL to help
users!
John Gianni
-- Nothing posted by me is prior reviewed by my employer.
 

Welcome to EDABoard.com

Sponsor

Back
Top