changing saveDir and projectDir as library changes

  • Permalink
  • submit to reddit
  • Email
  • Follow


Hi,

I'm having problems figuring out how to do the following:

Instead of just using fixed defaults for saveDir and projectDir (such
as ./artist_states and ./simulation respectively - and I don't care
how these were set - either by .cdsenv entry or use of envSetVal) , I
would like to have projectDir and saveDir follow the library of the
schematic being simulated.

In other words, if I opened MyLib->MyCell->schematic and then invoked
Analog Artist, I would like the projectDir to already be defaulted to
../simulation/MyLib and I would like the saveDir to already be
defaulted to ./simulation/MyLib/artist_states.  Similarly, if I then
opened YourLib->YourCell->schematic and invoked Analog Artist or just
chose YourLib->YourCell->schematic from the Setup - Design form , I
would want these two values to automatically be changed to
../simulation/YourLib and ./simulation/YourLib/artist_states
respectively.

I've thought about adding skill to run after a trigger event, but I am
not sure which trigger is appropriate.  Also, I haven't found a
foolproof method of grabbing the library name which works under all
the different ways to switch what will be simulated.  Additionally, it
would be awesome if whatever solution would also work for Ocean as
well.

Any and all help/ideas would be great.  Thanks.
Whisker
0
Reply whiskerville83-google (7) 4/28/2004 5:41:06 AM

See related articles to this posting

Hi,

Have you tried to use envSetVal within the libraries libInit.il
files? This is just a guess and I either don't know if this
is the right approach.

Bernd

Whisker wrote:
> Hi,
> 
> I'm having problems figuring out how to do the following:
> 
> Instead of just using fixed defaults for saveDir and projectDir (such
> as ./artist_states and ./simulation respectively - and I don't care
> how these were set - either by .cdsenv entry or use of envSetVal) , I
> would like to have projectDir and saveDir follow the library of the
> schematic being simulated.
> 
> In other words, if I opened MyLib->MyCell->schematic and then invoked
> Analog Artist, I would like the projectDir to already be defaulted to
> ./simulation/MyLib and I would like the saveDir to already be
> defaulted to ./simulation/MyLib/artist_states.  Similarly, if I then
> opened YourLib->YourCell->schematic and invoked Analog Artist or just
> chose YourLib->YourCell->schematic from the Setup - Design form , I
> would want these two values to automatically be changed to
> ./simulation/YourLib and ./simulation/YourLib/artist_states
> respectively.
> 
> I've thought about adding skill to run after a trigger event, but I am
> not sure which trigger is appropriate.  Also, I haven't found a
> foolproof method of grabbing the library name which works under all
> the different ways to switch what will be simulated.  Additionally, it
> would be awesome if whatever solution would also work for Ocean as
> well.
> 
> Any and all help/ideas would be great.  Thanks.
> Whisker

0
Reply bernd.fischer (67) 4/28/2004 9:41:42 AM

this is a nice problem, hard to solve without having to hack artist's
code.
maybe what you could do is register a trigger for analogArtist-schematic
subview type.

deRegUserTriggers( "analogArtist-schematic" nil nil 'myFunc )

tried it, and it looks it is called whenever artist in invoked, but also
when changing design inside artist.


"Whisker" <whiskerville83-google@yahoo.com> wrote in message
news:6941ff49.0404272141.67e97bfd@posting.google.com...
> Hi,
>
> I'm having problems figuring out how to do the following:
>
> Instead of just using fixed defaults for saveDir and projectDir (such
> as ./artist_states and ./simulation respectively - and I don't care
> how these were set - either by .cdsenv entry or use of envSetVal) , I
> would like to have projectDir and saveDir follow the library of the
> schematic being simulated.
>
> In other words, if I opened MyLib->MyCell->schematic and then invoked
> Analog Artist, I would like the projectDir to already be defaulted to
> ./simulation/MyLib and I would like the saveDir to already be
> defaulted to ./simulation/MyLib/artist_states.  Similarly, if I then
> opened YourLib->YourCell->schematic and invoked Analog Artist or just
> chose YourLib->YourCell->schematic from the Setup - Design form , I
> would want these two values to automatically be changed to
> ./simulation/YourLib and ./simulation/YourLib/artist_states
> respectively.
>
> I've thought about adding skill to run after a trigger event, but I am
> not sure which trigger is appropriate.  Also, I haven't found a
> foolproof method of grabbing the library name which works under all
> the different ways to switch what will be simulated.  Additionally, it
> would be awesome if whatever solution would also work for Ocean as
> well.
>
> Any and all help/ideas would be great.  Thanks.
> Whisker


0
Reply stephane.badel (108) 4/28/2004 11:17:01 AM

Bernd,

You touched upon one idea that I tried, however, I couldn't seem to
automatically generate the library name in a dynamic way - I was
hoping for one libInit.il that I could just copy from library to
library without any edits.  I tried
dbGetCellViewDdId(deGetCellView())->lib->name and
dbGetCellViewDdId(geGetEditCellView())->lib->name both of which work
from the CIW, but neither worked from libInit.il.  I figure this is
because the library manager is a separate executable.  Perhaps I need
to create a cdsLibMgr.il file?  I've read the Library Manager User
Guide and it indicates that SKILL callback procedures always receive
the argument list selection currently specified in the library
manager.  The library manager sends the data selection specification
fully corresponding to the 5.X architecture as a list of five strings:
LIBNAME CELLNAME VIEWNAME FILENAME CATEGORY.  But I couldn't figure
out how to access this list.  It seems like it had the data I was
after (LIBNAME).  Any ideas out there?

Whisker

Bernd Fischer <bernd.fischer@xignal.de> wrote in message news:<408F7C56.9010103@xignal.de>...
> Hi,
> 
> Have you tried to use envSetVal within the libraries libInit.il
> files? This is just a guess and I either don't know if this
> is the right approach.
> 
> Bernd
>
0
Reply whiskerville83-google (7) 4/28/2004 6:51:17 PM

Stephane,

I think you may have my solution.  I will follow your lead and see if
I can get it working.  Thank you and I'll post back how things turn
out.

Whisker

"S. Badel" <stephane.badel@epfl.ch> wrote in message news:<408f92ad$1@epflnews.epfl.ch>...
> this is a nice problem, hard to solve without having to hack artist's
> code.
> maybe what you could do is register a trigger for analogArtist-schematic
> subview type.
> 
> deRegUserTriggers( "analogArtist-schematic" nil nil 'myFunc )
> 
> tried it, and it looks it is called whenever artist in invoked, but also
> when changing design inside artist.
0
Reply whiskerville83-google (7) 4/28/2004 6:55:01 PM

Stephane,

Here's what I have so far, but it's not working yet.  When I query
values in the CIW, the saveDir and projectDir read properly.  However,
when I open the forms that should be showing these variables, the
values are not correct.  It's as if a callback is not getting
triggered.  If I do a netlist or save a state, the incorrect values
are used.
-----------------------------------------------------------------------------------------------------------
In my ~/.cdsenv file I have these two lines:
asimenv saveDir string "./simulation/"
asimenv.startup projectDir string "./simulation/"
-----------------------------------------------------------------------------------------------------------
In my ~/.cdsinit file I have these two lines:
envSetVarDefaultToCurrVal( "asimenv" "saveDir" )
envSetVarDefaultToCurrVal( "asimenv.startup" "projectDir" )
-----------------------------------------------------------------------------------------------------------
if( !deGetAppInfo("analogArtist-schematic")->userPostInstallTrigger
   then
      printf("\nNo analogArtist-schematic user trigger is
registered.\nInstalling My_asimenv_defaults_appTrigger.\n\n")
      deRegUserTriggers( "analogArtist-schematic" nil nil
'My_asimenv_defaults_appTrigger)
   else
      hiGetAttention(50)
      printf("\nWARNING!: A analogArtist-schematic user trigger is
already registered as: %s\n"
deGetAppInfo("analogArtist-schematic")->userPostInstallTrigger)
      printf("\nThis user trigger will be replaced by
My_asimenv_defaults_appTrigger.\n")
      deUnRegUserTriggers( "analogArtist-schematic")
      deRegUserTriggers( "analogArtist-schematic" nil nil
'My_asimenv_defaults_appTrigger)
      hiGetAttention(50)
)

procedure(  My_asimenv_defaults_appTrigger( args "l")
   let( (My_debug libSimPath libStatePath)
      My_debug=t
;      My_debug=nil
      if(My_debug then println(args))
      libSimPath = strcat( envGetDefVal( "asimenv.startup"
"projectDir" ) args->libName )
      envSetVal( "asimenv.startup" "projectDir" 'string libSimPath )
      printf("Set projectDir environment value to %s\n" libSimPath)
      ;
      libStatePath = strcat( libSimPath "/artist_states" )
      envSetVal( "asimenv" "saveDir" 'string libStatePath )
      printf("Set saveDir environment value to %s\n" libStatePath)
   ) ; end of let
) ; end of procedure

So close, but yet so far away... Any ideas?  All help is greatly
appreciated.

Whisker

whiskerville83-google@yahoo.com (Whisker) wrote in message news:<6941ff49.0404281055.6c9727ae@posting.google.com>...
> Stephane,
> 
> I think you may have my solution.  I will follow your lead and see if
> I can get it working.  Thank you and I'll post back how things turn
> out.
> 
> Whisker
> 
> "S. Badel" <stephane.badel@epfl.ch> wrote in message news:<408f92ad$1@epflnews.epfl.ch>...
> > this is a nice problem, hard to solve without having to hack artist's
> > code.
> > maybe what you could do is register a trigger for analogArtist-schematic
> > subview type.
> > 
> > deRegUserTriggers( "analogArtist-schematic" nil nil 'myFunc )
> > 
> > tried it, and it looks it is called whenever artist in invoked, but also
> > when changing design inside artist.
0
Reply whiskerville83-google (7) 4/28/2004 11:46:11 PM

yep, probably those variable are only read once. This is the
case with many tools, you cannot change environment options
procedurally once they are loaded.

for your problem have a look at the asi* and sev* functions,
described in Cadence Analog Environment SKILL Reference.

i found this one to set the .artist_states directory.
sevSetTopSaveDir()

you'll probably find what you need there.

st�phane

"Whisker" <whiskerville83-google@yahoo.com> wrote in message
news:6941ff49.0404281546.420dc88e@posting.google.com...
> Stephane,
>
> Here's what I have so far, but it's not working yet.  When I query
> values in the CIW, the saveDir and projectDir read properly.  However,
> when I open the forms that should be showing these variables, the
> values are not correct.  It's as if a callback is not getting
> triggered.  If I do a netlist or save a state, the incorrect values
> are used.
> --------------------------------------------------------------------------
---------------------------------
> In my ~/.cdsenv file I have these two lines:
> asimenv saveDir string "./simulation/"
> asimenv.startup projectDir string "./simulation/"
> --------------------------------------------------------------------------
---------------------------------
> In my ~/.cdsinit file I have these two lines:
> envSetVarDefaultToCurrVal( "asimenv" "saveDir" )
> envSetVarDefaultToCurrVal( "asimenv.startup" "projectDir" )
> --------------------------------------------------------------------------
---------------------------------
> if( !deGetAppInfo("analogArtist-schematic")->userPostInstallTrigger
>    then
>       printf("\nNo analogArtist-schematic user trigger is
> registered.\nInstalling My_asimenv_defaults_appTrigger.\n\n")
>       deRegUserTriggers( "analogArtist-schematic" nil nil
> 'My_asimenv_defaults_appTrigger)
>    else
>       hiGetAttention(50)
>       printf("\nWARNING!: A analogArtist-schematic user trigger is
> already registered as: %s\n"
> deGetAppInfo("analogArtist-schematic")->userPostInstallTrigger)
>       printf("\nThis user trigger will be replaced by
> My_asimenv_defaults_appTrigger.\n")
>       deUnRegUserTriggers( "analogArtist-schematic")
>       deRegUserTriggers( "analogArtist-schematic" nil nil
> 'My_asimenv_defaults_appTrigger)
>       hiGetAttention(50)
> )
>
> procedure(  My_asimenv_defaults_appTrigger( args "l")
>    let( (My_debug libSimPath libStatePath)
>       My_debug=t
> ;      My_debug=nil
>       if(My_debug then println(args))
>       libSimPath = strcat( envGetDefVal( "asimenv.startup"
> "projectDir" ) args->libName )
>       envSetVal( "asimenv.startup" "projectDir" 'string libSimPath )
>       printf("Set projectDir environment value to %s\n" libSimPath)
>       ;
>       libStatePath = strcat( libSimPath "/artist_states" )
>       envSetVal( "asimenv" "saveDir" 'string libStatePath )
>       printf("Set saveDir environment value to %s\n" libStatePath)
>    ) ; end of let
> ) ; end of procedure
>
> So close, but yet so far away... Any ideas?  All help is greatly
> appreciated.
>
> Whisker
>
> whiskerville83-google@yahoo.com (Whisker) wrote in message
news:<6941ff49.0404281055.6c9727ae@posting.google.com>...
> > Stephane,
> >
> > I think you may have my solution.  I will follow your lead and see if
> > I can get it working.  Thank you and I'll post back how things turn
> > out.
> >
> > Whisker
> >
> > "S. Badel" <stephane.badel@epfl.ch> wrote in message
news:<408f92ad$1@epflnews.epfl.ch>...
> > > this is a nice problem, hard to solve without having to hack artist's
> > > code.
> > > maybe what you could do is register a trigger for
analogArtist-schematic
> > > subview type.
> > >
> > > deRegUserTriggers( "analogArtist-schematic" nil nil 'myFunc )
> > >
> > > tried it, and it looks it is called whenever artist in invoked, but
also
> > > when changing design inside artist.


0
Reply stephane.badel (108) 4/29/2004 8:17:50 AM
comp.cad.cadence 5477 articles. 14 followers. Post

6 Replies
125 Views

Similar Articles

[PageSpeed] 20

  • Permalink
  • submit to reddit
  • Email
  • Follow


Reply:

Similar Artilces:

I changed the library
Hi, I changed something in one of the libraries - it is DAQmx Write.vi&nbsp;(<a name="instance11" target="_blank">Digital 1D Wfm NChan 1Samp</a>) that is located in task.llb file. And unfortunatelly I saved the changes. Now I need to bring back the original version somehow. Do you know, if there's a change to discard changes and get original&nbsp;VI ? Or download original library ? What is more, I use german version of LabVIEW. &nbsp; best wishes OLO Uff, I wanted to&nbsp;fix it without reinstalling LabVIEW. I replaced the file&nbsp;...

OpenGL libraries changed?
I am getting link fails for some very basic OpenGL library methods, and I am unable to locate the libraries that contain these methods. Here are the errors: | % g++ <snip> -L/System/Library/Frameworks/OpenGL.framework/Libraries | /usr/bin/ld: Undefined symbols: | _glXCreateContext | _glXDestroyContext When I look in the OpenGL library directory, nm the .dylib files and grep for the methods, nothing shows up. | % cd /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries | % foreach i (*.dylib) | foreach? echo $i | foreach? nm $i | grep -i glXDestroyContext | foreach? end | l...

Changes to the string library
I have changed some things in the string library: 1) We had before #ifdef UNICODE #define Strcmp StrcmpW #else #define Strcmp StrcmpW #endif I changed all this and now we have overloaded versions of Strcmp both with StringW and StringA. This was done in all other functions that were defined this way. Rationale: Why complicate things with #defines? It is better to use the "overloaded" feature. 2) All string functions should start with Str... There were some functions that did not respect this rule and their name was changed. begin_string --> Strbegin next_string --> St...

What to change BLAS library?
What to change BLAS library?My procesor is Athlon 64, and system WindowsXP, Matlab 7. Assuming you are using 32-bit Windows. Try http://www.mathworks.com/support/solutions/data/1-18QUC.html?solution=1-18QUC "Branislav Milinic" <milinicb@cg.yu> wrote in message news:eef91a5.-1@webx.raydaftYaTP... > What to change BLAS library?My procesor is Athlon 64, and system > WindowsXP, Matlab 7. ...

Changing a Library Reference
Some months ago, we requested help from this newsgroup on how to replace the library reference of a database with another library reference, prior to creating an MDE. I got the following answer from Stephen K. Young, which does the job: >In message <ahjurk$t18vo$1@ID-65843.news.dfncis.de>, Stephen K. Young ><s@k.y.invalid> writes >Using automation you can temporarily replace a developer library reference >with a compiled library reference. Sample code below. Then continue with >automation to compile the .Mde as before. Afterwards you probably want to >use autom...

Changing a Library Reference #2
Some months ago, we requested help from this newsgroup on how to replace the library reference of a database with another library reference, prior to creating an MDE. I got the following answer from Stephen K. Young, which does the job: >In message <ahjurk$t18vo$1@ID-65843.news.dfncis.de>, Stephen K. Young ><s@k.y.invalid> writes >Using automation you can temporarily replace a developer library reference >with a compiled library reference. Sample code below. Then continue with >automation to compile the .Mde as before. Afterwards you probably want to >use autom...

how to change rights for *PUBLIC on all libraries ?
Hello, I want to change the rights (from *CHANGE to *USE) for *PUBLIC on all libraries on an AS/400 system (V5R2). GRTOBJAUT does not seem to be able to do that...May be I've missed something. Does someone know how to do this ? and is it a good idea to do it BTW ? thanks in advance for any help, Olivier. g...@yahoo.com wrote: > Hello, > > I want to change the rights (from *CHANGE to *USE) for *PUBLIC on all > libraries on an AS/400 system (V5R2). > GRTOBJAUT does not seem to be able to do that...May be I've missed > something. > Does someone know how to do this...

Changing Model Library in Cadence
I am currently using TSMC process and would like to switch to UMC process. What files should I change? cds.lib? Any other thing I need to pay attention? Also can I enable both processes at the same time so that I don't need to keep changing the files? Thanks I assume that you've got the whole TSMC and UMC kits. As for your last question i don't know any easy way to do this, because only one technology can be attached to your work library. Technology influence only layout and this is the reason you can't keep the same files for layout (it is due to layer's names and num...

Learner changing executable to library
My little app to scan World of Warcraft auction scans now works in that it generates useful tables in CSV format that the user can do wahtever they like with. I created it as a console application. If I want to put a File Selection GUI on it, the nicest way would be to change it to a library rather than start again. I think in Windows this means a dll. Is this possible? Its only 400 lines of code, a lot of which has "Learner" stamped all over it but learning to make a library is my next step. If there is a URL to how this works and what UI hsould read, please let me know. Than...