Switching a switch via CDF

  • Thread starter Svenn Are Bjerkem
  • Start date
S

Svenn Are Bjerkem

Guest
Hi,
about a year ago, I asked how to switch a sp*tswicth from analogLib and got
an answer with a workaround from Andrew.

I now write an OCEAN script which is supposed to be started from icfb so I
can use some of the icfb specific functions described.

Now I have been playing with some cdf* Skill functions and wonder if it is
possible to change the value of a CDF field. What I have done so far is:

design( "lib_bjerkem" "circuit_tb" "schematic")
target = ddGetObj( "analogLib" "sp1tswitch" )
user = cdfGetBaseCellCDF(target)

now I can see some data about the switch with
user->?? in CIW
There is a property called
user->position->choises
that I have been playing around with by setting it to 0 and 1 with
user->position->choises = 1 or 0
and then do another
createNetlist( ?recreateAll t ?display t )
The "position" in the netlist is always what I set in the schematic.

I don't seem to be able to propagate the changes I do on the CIW back to the
design.

I would guess that I need to have a reference to one of the instances in my
schematic in order to be able to manipulate the cdf value directly. It
could also happen that the way I try to solve this problem is leading into
nowhere. Any Idea how to progress?

I could follow the work-around and copy the switch from analogLib to
lib_bjerkem, but I am trying to make an ocean-script that is supposed to be
very general and easy to modify for other purposes. I could also use the
electrically controlled switch and use a design variable. That will be the
end of this story if I don't succeed.
--
Svenn
 
Svenn,

without digging into this in detail I supposse you have to use
the single instance CDF form the instance sp*tswicth in your
schematic rather than the base cell cdf.

Try:
cdfGetInstCDF(d_instId
)
=> cdfDataId / nil

Bernd

Svenn Are Bjerkem wrote:
Hi,
about a year ago, I asked how to switch a sp*tswicth from analogLib and got
an answer with a workaround from Andrew.

I now write an OCEAN script which is supposed to be started from icfb so I
can use some of the icfb specific functions described.

Now I have been playing with some cdf* Skill functions and wonder if it is
possible to change the value of a CDF field. What I have done so far is:

design( "lib_bjerkem" "circuit_tb" "schematic")
target = ddGetObj( "analogLib" "sp1tswitch" )
user = cdfGetBaseCellCDF(target)

now I can see some data about the switch with
user->?? in CIW
There is a property called
user->position->choises
that I have been playing around with by setting it to 0 and 1 with
user->position->choises = 1 or 0
and then do another
createNetlist( ?recreateAll t ?display t )
The "position" in the netlist is always what I set in the schematic.

I don't seem to be able to propagate the changes I do on the CIW back to the
design.

I would guess that I need to have a reference to one of the instances in my
schematic in order to be able to manipulate the cdf value directly. It
could also happen that the way I try to solve this problem is leading into
nowhere. Any Idea how to progress?

I could follow the work-around and copy the switch from analogLib to
lib_bjerkem, but I am trying to make an ocean-script that is supposed to be
very general and easy to modify for other purposes. I could also use the
electrically controlled switch and use a design variable. That will be the
end of this story if I don't succeed.
 
Bernd Fischer wrote:

Svenn,

without digging into this in detail I supposse you have to use
the single instance CDF form the instance sp*tswicth in your
schematic rather than the base cell cdf.

Try:
cdfGetInstCDF(d_instId
)
=> cdfDataId / nil
Andrew had once informed me that we can use dbSetq instead. Apparently there
is no such thing as instance CDF (why the cdfGetInstCDF then?).

Satya

--
Posted via a free Usenet account from http://www.teranews.com
 
There is, it's the 'User' or and the resulting 'Effectice' CDF
level which is not saved to the master cell, but as an instance property
to your e.g. instance in the schematic cell view.

Bernd

Apparently there
is no such thing as instance CDF (why the cdfGetInstCDF then?).
 
Satya wrote:
Bernd Fischer wrote:

Svenn,

without digging into this in detail I supposse you have to use
the single instance CDF form the instance sp*tswicth in your
schematic rather than the base cell cdf.

Try:
cdfGetInstCDF(d_instId
)
=> cdfDataId / nil

Andrew had once informed me that we can use dbSetq instead. Apparently there
is no such thing as instance CDF (why the cdfGetInstCDF then?).
I switched over to command line spectre to be able to use a some of the
alter functions that spectre has. The OCEAN implementation of my
testbench has a performance problem due to the fact that the parametric
analysis in fact is a bunch of serialized single-run testbenches. It
wastes so many cycles going in and out of lsf that I had to look for an
alternative. I bite myself in the back every now and then, you know ...

Thanks, anyway, maybe I understand this one day and then it is good to
know I asked the question.

--
Svenn
 
On 8 Aug 2006 07:55:42 -0700, "Svenn Bjerkem" <svenn.are@bjerkem.de> wrote:

Satya wrote:
Bernd Fischer wrote:

Svenn,

without digging into this in detail I supposse you have to use
the single instance CDF form the instance sp*tswicth in your
schematic rather than the base cell cdf.

Try:
cdfGetInstCDF(d_instId
)
=> cdfDataId / nil

Andrew had once informed me that we can use dbSetq instead. Apparently there
is no such thing as instance CDF (why the cdfGetInstCDF then?).

I switched over to command line spectre to be able to use a some of the
alter functions that spectre has. The OCEAN implementation of my
testbench has a performance problem due to the fact that the parametric
analysis in fact is a bunch of serialized single-run testbenches. It
wastes so many cycles going in and out of lsf that I had to look for an
alternative. I bite myself in the back every now and then, you know ...

Thanks, anyway, maybe I understand this one day and then it is good to
know I asked the question.
Sorry for my late reply - I've been catching up on some news group
stuff, having been too busy (or on vacation) for a while to give it as much
time as I usually do.

You can do this by using either:

instId~>position=1

or:

cdf=cdfGetInstCDF(instId)
cdf~>position~>value=1

Instance CDF is in essence the Effective cell CDF, overlaid with instance
db properties. There is really no difference between changing the property
via the instance CDF or via the instance Id directly.

My point (in the past) is that instance CDF is not stored anywhere as instance
CDF - it's a virtual memory abstraction which is seeded from the two places
(cell CDF and instance properties).

Svenn's approach was changing the choices in the Cell CDF - which is not what
you'd want to do.

The other way of doing this is to create a similar component to sp*tswitch,
which uses string fields (with parseAsNumber=yes, and parseAsCEL=yes).
Then you can make the switch positions design variables...

Andrew.
--
Andrew Beckett
Principal European Technology Leader
Cadence Design Systems, UK.
 

Welcome to EDABoard.com

Sponsor

Back
Top