Quantcast
Channel: Cadence Custom IC Skill Forum
Viewing all 5077 articles
Browse latest View live

Convert output of "waveVsWave()" into derivable waveform by ordering X and Y values

$
0
0

Hi all! I'd like to take the derivative of waveforms that I obtain using the waveVsWave() function. The problem is that using the "deriv()" function doesn't work (I guess) because the X and Y values of such waveforms are not properly arranged.

For example: in a TRAN simulation of an SC amplifier I get input and output waveforms Vout(t) and Vin(t), and use waveVsWave() to obtain a plottable "Vout(Vin)" waveform. However, using deriv() on it produces incorrect results, I suspect because the X values of the waveform are not monotonic, but arranged according to the original independent variable "t" (e.g. for a coherently-sampled sine input at Nyquist frequency the X values alternate polarity with every sample, and so do the corresponding Y-values at the output of the amplifier).

In the above example, how could I process the output of waveVsWave() so that I can use deriv() to calculate dVout/dVin = effective gain of the amplifier, including distortion components (different from Vout/Vin ratio!)?

I suspect all what is needed is a skill function to process the "Vout(Vin)" waveform (so as to order its elements: X-values monotonically, and Y-values according to the ordering of the X-values), but this goes beyond my Skill capabilities.

Thanks and regards,

Jorge.


pass variable value to procedure name

$
0
0

Hi,

Is there any way to pass  variable value to procedure name.

i.e

for(i 1 10

 procedure(test{i}()     ;--> test{i} is changing for different values of i

 )

)

How to pass 'i' variable value to the procedure name? So that, there are 10 procedures are defined.

Or, is there some other options to do that.

Thanks and regards,

Basavaraj Tambur

Ignore the lower or uppercase in regular expression.

$
0
0

Hi,

  Anyone can tell me how to ignore the lowercase or uppercase in skill code? And any operator before the match unit? Similar as 'i' in Perl, '?i' in Java.

  I want to match the height text and do a replace. rexMatchp( "^HT" text ). Sometime, the information for text is lowercase, but sometime it is uppercase. Except to use upperCase(text), if can I have other way. Please help me. Thanks in advance.

Regards,

Jason

long time ocean simulation w/o saving any waveform database

$
0
0

hello exports,

starting to have longer and longer time simulation but the waveform database apparently eating up the disk space quickly for day-long simulation. how can I config the ocean script based simulation not to save any (or just by specific picked nodes. it still saves database even I'm not using save or saveOption) ? I know -nograph would not bring up any display but I think that's not avoiding to dump huge waveform dump. 

in IC617

thanks,

David

removing repetitions from list with same elements but in reverse order

$
0
0

Hi,

I have a list which looks like this.

for example

a=( (1  2) (2  1)  (1  3)  (3  1) ) .  I need a function to transverse this list  as shown

a=( (1 2) (1 3) )  or a = ( (2  1)  (3  1) )

Thanks,

Raghu

Can ViVa display internal variables of VerilogA model?

$
0
0

hello exports,

from ocean based script, I have saveOption( 'save "all" ?saveahdlvars "all" ) but from ViVa, I still don't see instances of VerilogA models, not to say its internal variables. is there some way to plot them?

thanks,

David

memory leak?

$
0
0

Are there any known ways to confuse the garbage collector in skill?  I have a moderately large simulation that uses Ocean to step through a number of conditions.  For each condition, there is a transient analysis followed by some post-processing code which produces a waveform family (a waveform family for each transient sim).  I don't think anything in my code should be expanding the memory used each time through the loop because in simplified form it looks like:

foreach(sim_setup all_sim_setups

  ;; close all viva windows (in case that was a memory killer)

  foreach(win awvGetWindowList() awvCloseWindow(win))

  ;; reset the remaining window

  awvResetWindow(awvGetCurrentWindow() ?force t)

  ;; configure the sim with desVar() calls, may be update some of the simulation analysis settings

 

  printf("memoryAllocated() returned %g\n", memoryAllocated()) ;; check memory

  gc()  ;; force garbage collection

  run()

  ;; access some results, do math (including a fairly large number of calls to dft()), plot various results,

  ;; write out some png files with saveGraphImage(), dump some text files with

  ;; fp=outfile("somefile.txt") fprintf(fp, "stuff") close(fp)

)

What I see is before the first run, the memory allocated is low and then it jumps a bunch after the first sim.  But after that I'm growing by about 300Mb each time through:

  memoryAllocated() returned 372.344
Done - free list cells = 2724041, bytes allocated for all types = 182042907
memoryAllocated() returned 5310.04
Done - free list cells = 2804791, bytes allocated for all types = 200569114
memoryAllocated() returned 5606.61
Done - free list cells = 2813000, bytes allocated for all types = 200666771
memoryAllocated() returned 5908.91
Done - free list cells = 2804808, bytes allocated for all types = 200776481
memoryAllocated() returned 6181.61
Done - free list cells = 2802109, bytes allocated for all types = 200945203
memoryAllocated() returned 6477.51
Done - free list cells = 2799522, bytes allocated for all types = 201107058
memoryAllocated() returned 6779.2
Done - free list cells = 2790640, bytes allocated for all types = 201284560
memoryAllocated() returned 7049.48
Done - free list cells = 2809618, bytes allocated for all types = 201976762
memoryAllocated() returned 7345.52
Done - free list cells = 2806987, bytes allocated for all types = 202142740
memoryAllocated() returned 7647.66
Done - free list cells = 2796874, bytes allocated for all types = 202318483
memoryAllocated() returned 7917.4
Done - free list cells = 2815944, bytes allocated for all types = 203002061
memoryAllocated() returned 8214.05
Done - free list cells = 2813363, bytes allocated for all types = 203163430
memoryAllocated() returned 8515.86
Done - free list cells = 2802934, bytes allocated for all types = 203276529
memoryAllocated() returned 8784.89
Done - free list cells = 2800332, bytes allocated for all types = 203505040

and then, *boom*, ocean fails with:

simulate...
*Error* ipcBeginProcess: Unable to fork() child process due to system error
(Consider exiting any unnecessary applications) - "Cannot allocate memory"
*

I've had the sense that maybe the simulation post processing code is where the leak is because I have a waveform calculator version and have noticed running in ADE-L that repeated sims seem to cause the memory use to keep growing.

So... that gets back to the original question.  What should I be looking for that causes memory leaks?  I would have thought it would be things like opening more and more windows without closing or creating new variables with new names each time through a loop or adding to a list or table or waveform family each time.  But as near as I can tell I really shouldn't be needing any additional storage after the first time through.

Thanks

-Dan

Use skill to export gdsII

$
0
0

HI:

I want to export GDS from the layout. I know that it can be done by using Virtuoso CIW ( File-->Export-->stream). But I need to use the skill to done it . I use virtuoso IC6.1.7

My code is :

procedure(strmout_gds()

cellid = geGetEditCellView()
printf("cellid %L \n" cellid)

thisLibName = cellid->libName
printf("thisLibName %L \n" thisLibName)

thisCellName = cellid->cellName
printf("thisCellName %L \n" thisCellName)

streamOutKeys = ncons(nil)

streamOutKeys->runDir = "."

streamOutKeys->libName = thisLibName

streamOutKeys->primaryCell = thisCellName

streamOutKeys->viewName = "layout"

streamOutKeys->scale = 0.001

streamOutKeys->units = "micron"

streamOutKeys->libVersion = "5.0"

streamOutKeys->errFile = "PIPO.LOG"

streamOutKeys->outFile= strcat("/home1st/art83420/NCSU-FreePDK15-1.2_final/FreePDK15/cdslib" thisCellName ".calibre.gds")

id = ipcBeginProcess("cd /home1st/art83420/NCSU-FreePDK15-1.2_final/FreePDK15/cdslib; source .bashrc; pipo strmout xstrmOut.templt")
printf("id %L\n" id)

ipcWait(id)

)

I found examples at the following URL
http://www.dayexie.com/detail2035097.html

My problem is the code can run and doesn't have error. But can't generate gds

Have anyone can tell me where is the problem or how to write the code

thanks





Get selected category in Library Manager

$
0
0

Hi !

I was hoping that ddsGetLibManLCV() would also provide the selected category. unfortunately it does not.

Is there a command that returns the category that is currently selected ?

Many thanks

Faisal

Generating Schematic pin list

$
0
0

Hi Team, I am generating the pin list from schematic as

cv=geGetEditCellView()
pins=cv~>terminals~>name .

If any bus is input or output, its coming directly as a bus only like Q<3:0>. But i want them as individual pins like Q<0> Q<1> Q<2> Q<3>.

There are 10's of buses in schematic, so i want all of them to come as individual pins.

Is there any way to generate them as individual pins? I want them to compare with layout pins?

Get Names of All Available Libraries

$
0
0

Hello,

I am attempting to retrieve the names of all available libraries in Virtuoso, but I can't seem to find a command for that. I'm thinking of something similar to this, but that applies for libraries in virtuoso rather than cells in a library.

Any hints would be appreciated.

Best regards,
Karam

Updating pcell CDF parameters from an imported file

$
0
0

Hi,

I'm having an issue coding up a pcell to import a file with custom values and then updating the CDF's with these values.  The pcell CDF has a "Load File" option, and this file contains variables/values in this format:

"Offset" "4"
"Offset_MC" "2"
"R_0v" "2222"
"R_L" "0.02"
"R_Q" "1.222e-05"
"S_S" "7.222"
"S_L" "-0.00222"
"S_Q" "2.222e-05"
"S_C" "-7.222e-08"

Here is the section of code that loads the file and attempts to reassign the CDF's:

; ;;; File Loading/Saving code
;
; when( callfrom == "Load_File"
; LoadFilePath = simplifyFilename( strcat(getWorkingDir() "/Hall_model_parameters" ) )
; load( LoadFilePath )
; LoadFile = infile( LoadFilePath ) ;open output log file
;
;
; while( gets( nextLine LoadFile )
; str = parseString( nextLine " \"\n")
; case( car( str )
; ( "Offset" setq( Offset printf("%s\n" buildString( cdr( str ) ) ) ) )
; ( "Offset_MC" setq( Offset_MC printf("%s\n" buildString( cdr( str ) ) ) ) )
; ( "R" setq( R printf("%s\n" buildString( cdr( str ) ) ) ) )
; ( "R_L" setq( R_L printf("%s\n" buildString( cdr( str ) ) ) ) )
; ( "R_Q" setq( R_Q printf("%s\n" buildString( cdr( str ) ) ) ) )
; ( "S_S" setq( S_S printf("%s\n" buildString( cdr( str ) ) ) ) )
; ( "S_L" setq( S_L printf("%s\n" buildString( cdr( str ) ) ) ) )
; ( "S_Q" setq( S_Q printf("%s\n" buildString( cdr( str ) ) ) ) )
; ( "S_C" setq( S_C printf("%s\n" buildString( cdr( str ) ) ) ) )
; );case
;
; );while
; close( LoadFile )
;
; );when

The setq is not updating the CDF's and I am getting a format error after teh first value is read in due to a 't' being reported:

"4"
t
4
"Offset"
2
"Offset_MC"
"R_0v"
0.02
"R_L"
1.222e-05
"R_Q"
7.222
"S_S"
-0.00222
"S_L"
2.222e-05
"S_Q"
-7.222e-08
"S_C"
CDF: An error occurred when evaluating callback.
Callback: Load_File->callback => au1IP_hall_60_sm_b_play_cb("Load_File")

Message: *Error* fprintf/sprintf: format spec. incompatible with data - "Format is '%g', argument #1 is t"

Not sure if my code is just not set up correctly or I'm barking up the wrong tree with the printf statement to remove the "", any help would be appreciated.

Thanks,

Bob

Extract Device Properties Using SKILL

$
0
0

Hello,

In the library manager, it is possible to right click on a cell (e.g. a transistor) and "Show Properties". I need to retrieve one of the values included in the properties (e.g. max_Width, with value 100u).

I have tried dbGetPropByName(instID, "max_Width"), but it seems like this is not the function I need as it returns nil.

Any hints would be appreciated.

Best regards,
Karam

close pop-up window named "stream out translation complete"

$
0
0

HI : 

In order to generate GDS per cell layout  in the background

I write skill file load in CIW   

But it will always pop-out a window like below 

I don't want to that this window pop-out any more 

what should I do ??

This is my code :

procedure(gds_out()

cellid = geGetEditCellView()
printf("cellid %L \n" cellid)
thisLibName = cellid->libName
printf("thisLibName %L \n" thisLibName)
thisCellName = cellid->cellName
printf("thisCellName %L \n" thisCellName)



xstSetField( "library" thisLibName)
xstSetField( "topCell" thisCellName)
xstSetField( "view" "layout")
xstSetField( "strmFile" strcat(thisCellName ".gds"))
xstSetField( "logFile" "pipo.log")
xstOutDoTranslate()
)

Reading Warning Messages from CIW using SKILL

$
0
0

Hello,

Is it at all possible to read the warning messages that pop up in CIW? I would like to use those messages for debug purposes.

Something like read(woport)

Best regards,
Karam


ADEXL: How to get parameters of "_" functions for bindkey usage?

$
0
0

Hi! I'm trying to define some ADE-XL bindkeys for actions that I use really often, like the following:

; Open run log (history window)
hiSetBindKey("adexl" "Ctrl Alt Shift<Key>L" "_axlDataViewOpenRunLogAction(axlDataViewForm0->axlDataViewWidget0)")
; Open run results (history window)
hiSetBindKey("adexl" "Ctrl Alt Shift<Key>V" "_axlDataViewShowResultsAction(axlDataViewForm0->axlDataViewWidget0)")
; Export results to csv file
hiSetBindKey("adexl" "Ctrl Shift<Key>S" "_axlExportResultsView(axlOutputsForm3->axlOutputsWidget3)")

I usually get those code snippets from spying on the CIW log to see what gets called when I do these actions using the mouse, and often these "_" functions are involved which seem to be undocumented, private functions.

The problem is that this spying method always gives me arguments that are "hardcoded" to the current application instance, session etc, and when these parameters change, my bindkeys break. For instance sometimes instead of "axlOutputsForm3" I should use "axlOutputsForm4" and so on. Is there any function I can call to pass the correct arguments to these "_" functions?

Thanks and regards,
Jorge.


how to find floating pins in layout

$
0
0

Hello ,

We would like to find float pins in layout.For example, there is 2 pins which are both named as "testpin" in the layout.

But one is connected to metal , another is floating which means it doesn't connect to anything.

How can i find the pin which is not connected to anything else by using skill?

How to manipulate a "OneDDualArrayTblValue"

$
0
0

Hi,

Does it exist some API which let me manipulate a OneDDualArrayTblValue?

let's say I have that table:

((("width") ((0.0 0.0) ) )
 ( 0.01 ((0.01 0.02) )
   0.02 ((0.02 0.03) )
   0.04 ((0.05 0.06) )
   0.05 ((0.06 0.07) (0.07 0.07) )
   0.06 ((0.04 0.02) )
   0.07 ((0.03 0.02) (0.06 0.04) )
   0.08 ((0.02 0.02) )
  )
)

what is the best way to insert a member (0.03 ((0.02 0.04) (0.05 0.05) ) ) between the member (0.02 ((0.02 0.03) ) ) and  (0.04 ((0.05 0.06) ) ).

Do I have too break the table and read each member then append when find the right position in a for loop.

Any suggestion is welcome.

Thanks

Tony

Help on Creating table field.

$
0
0

Hi All,

I am looking for command to create table field with skill. I tried using hiCreateTreeTable() command but didn't get field I am looking for. I have attached existing field window image that I am expecting to write with skill. Please let me know if you have any ideas.

Thank you.

flightlines ends xy coordinates ?

$
0
0

Hi All,
How to find the flightline ends coordinates in the layout generated by Annotation Browser using SKILL ?
Because I want to move the pins by using the flightline coordinates and SKILL.

Best regards,
Marben

Viewing all 5077 articles
Browse latest View live