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

Find overlapping path and the critical path in Layout XL

$
0
0

I am writing a SKILL script to extract the overlap position (and the connected pins on the overlap path) and the longest path between input to output based on the number of transistors between them.

Q1: Starting from the overlap position script, I designed a small latch layout and I have only resistor and n-type transistor in my layout. For routing, I have a text file in which coordinates of all devices terminals are given. I read that file line by line and do point to point routing. Since I have only 2 metal layers (ITO and PEDOT_PSS), the router will form overlap at some points. I want to extract the where is the overlap and pins that are connected to the overlapping layers. Based on this information I can extract the connected pin coordinates and with the position of those coordinates in my route list I can find out which path was created first and which path was created after wards and caused an overlap. Based on the connected pin name, I assign some penalty for example. if overlap layer is connected to gate terminal "g" then it will get the highest cost, then lower cost if it is connected to drain or source and lowest of it is connected to resistance. In this way I can extract the total cost of the layout design , the higher the cost the worse the layout design is. I wrote a SKILL script that can do this for me but I am stuck at a point where I cannot restrict it to not to add cost 2 time for the same pin. For example: let say I have path1 and path2 overlapping in the layout I can first extract the paths in the layout using shapeList = setof(shape cv~>shapes member(shape~>objType '("path" "pathSeg")) && (shape~>layerName=="ITO" || shape~>layerName=="PEDOT_PSS")) and then for each shape I find the overlapping layers which are from the same net using overlapList = setof(overlap dbGetOverlaps(cv shape~>bBox) member(overlap~>objType '("path" "pathSeg"))). Since I do this for each shape, the path 1 and 2 both will be repeated . Path 1 will have overlap with path 2 and path 2 will have overlap with path 1 and then their cost will be added twice. My complete code is given below:

procedure(pinCost(pinName, gatePinCost, DSPinCost, RPinCost)
 case( pinName
  ;; GATE Pin
  ( "g"
    cost = gatePinCost
  )
 
  ;; DRAIN or Source Pin
  ( "d" || "s"
    cost = DSPinCost
  )
    
   ;; GATE Pin
  ( "PLUS" || "MINUS"
    cost = RPinCost
  )
 )
 cost
)


procedure(getOverlapCost(cv, routeList)
  gatePinCost = 10000 ;;Gate pin cost
  DSPinCost = 5000 ;;Drain-source pin cost
  RPinCost = 2000 ;;Resistor pin cost
  overlapCost = 0 ;;overlap cost initilization
  checkedBefore = list(nil) ;;if the paths was already checked before
 
  ;;Find paths on the ITO and PEDOT_PSS layer in the given cv
  shapeList = setof(shape cv~>shapes member(shape~>objType '("path" "pathSeg")) && (shape~>layerName=="ITO" || shape~>layerName=="PEDOT_PSS"))
  ;shapeList = dbGetOverlaps(cv cv~>bBox "PEDOT_PSS")
 
  foreach( shape shapeList
    ;printf("%L, %L, %L\n" shape~>lpp shape~>objType shape~>net~>name)
    ;printf("%L\n" routeList)
    ;;Find which paths are overlapping this shape
    overlapList = setof(overlap dbGetOverlaps(cv shape~>bBox) member(overlap~>objType '("path" "pathSeg")))
    ;printf("Shape: %L, overlapList: %L\n" shape~>net~>name overlapList~>net~>name)
    
    ;;If net names of the shape and overlaing shapes are different then continue otherwise skip
    if(remd(shape~>net~>name overlapList~>net~>name)
    then
      origNetSCoord=origNetECoord=diffNetSCoord=diffNetECoord=0 ;;initilaizing original net (shape~>net) and different net (start and end pin coordinates)
      ;; Which net name is different in the overlaplist
      diffNetName = setof(netName overlapList~>net~>name netName!=shape~>net~>name)
      diffNetidx = lindex(overlapList~>net~>name car(diffNetName))-1
      diffNet = nth(diffNetidx overlapList)
      ;printf("Overlapping: %L, this shape net: %L, overlapping net %L\n" overlapList~>net~>name shape~>net~>name overlapNet~>net~>name)
      
      ;; Find the start and end pin names (for the original and differnet net) and their coordinates
      origNet = shape
      origNetidx = lindex(overlapList~>net~>name origNet~>net~>name)-1
      origNetSIns = nth(origNetidx overlapList~>route~>startConn~>inst~>name)
      origNetSPin = nth(origNetidx overlapList~>route~>startConn~>term~>name)
      origNetEIns = nth(origNetidx overlapList~>route~>endConn~>inst~>name)
      origNetEPin = nth(origNetidx overlapList~>route~>endConn~>term~>name)
      
      diffNetSIns = nth(diffNetidx overlapList~>route~>startConn~>inst~>name)
      diffNetSPin = nth(diffNetidx overlapList~>route~>startConn~>term~>name)
      diffNetEIns = nth(diffNetidx overlapList~>route~>endConn~>inst~>name)
      diffNetEPin = nth(diffNetidx overlapList~>route~>endConn~>term~>name)
      ;printf("OSP:%L, OEP:%L, DSP:%L, DEP:%L\n" origNetSPin origNetEPin diffNetSPin diffNetEPin)
      
      ;; Find coordinates of the pins
      if(origNetSIns && origNetSPin
        then
        origNetSCoord = dbTransformPoint(centerBox(car(nth(origNetidx overlapList~>route~>startConn~>term~>pins)~>fig~>bBox)) nth(origNetidx overlapList~>route~>startConn~>inst~>transform))
    origRouteidx = lindex(routeList car(setof(thisList routeList abs(xCoord(origNetSCoord)-xCoord(car(thisList)))<1 && abs(yCoord(origNetSCoord)-yCoord(car(thisList)))<1)))-1
    )
      if(origNetEIns && origNetEPin
        then
        origNetECoord = dbTransformPoint(centerBox(car(nth(origNetidx overlapList~>route~>endConn~>term~>pins)~>fig~>bBox)) nth(origNetidx overlapList~>route~>endConn~>inst~>transform))
    origRouteidx = lindex(routeList car(setof(thisList routeList abs(xCoord(origNetECoord)-xCoord(cadr(thisList)))<1 && abs(yCoord(origNetECoord)-yCoord(cadr(thisList)))<1)))-1
    )
      if(diffNetSIns && diffNetSPin
        then
        diffNetSCoord = dbTransformPoint(centerBox(car(nth(diffNetidx overlapList~>route~>startConn~>term~>pins)~>fig~>bBox)) nth(diffNetidx overlapList~>route~>startConn~>inst~>transform))
    diffRouteidx = lindex(routeList car(setof(thisList routeList abs(xCoord(diffNetSCoord)-xCoord(car(thisList)))<1 && abs(yCoord(diffNetSCoord)-yCoord(car(thisList)))<1)))-1
    )
      if(diffNetEIns && diffNetEPin
      then
        diffNetECoord = dbTransformPoint(centerBox(car(nth(diffNetidx overlapList~>route~>endConn~>term~>pins)~>fig~>bBox)) nth(diffNetidx overlapList~>route~>endConn~>inst~>transform))
    diffRouteidx = lindex(routeList car(setof(thisList routeList abs(xCoord(diffNetECoord)-xCoord(cadr(thisList)))<1 && abs(yCoord(diffNetECoord)-yCoord(cadr(thisList)))<1)))-1
    )
      ;printf("OSP:%L, OEP:%L, DSP:%L, DEP:%L\n" origNetSCoord origNetECoord diffNetSCoord diffNetECoord)
      
      ;; Find which one is overlapping by comparing sequence in the route list
      ;printf("origIdx:%L, diffIdx:%L\n" origRouteidx diffRouteidx)
      if(origRouteidx < diffRouteidx ;;orig net was routed first and diff is overlapping it
      then
        checkedBefore = append(checkedBefore list(diffNet))
        if(diffNetSCoord != 0
    then
          overlapCost = overlapCost + pinCost(diffNetSPin, gatePinCost, DSPinCost, RPinCost)
    else if(diffNetECoord != 0
         then
             overlapCost = overlapCost + pinCost(diffNetEPin, gatePinCost, DSPinCost, RPinCost)
         )
    )
      else if(origRouteidx > diffRouteidx ;;diff net was routed first and orig is overlapping it
           then
       checkedBefore = append(checkedBefore list(origNet))
             if(origNetSCoord != 0
         then
               overlapCost = overlapCost + pinCost(origNetSPin, gatePinCost, DSPinCost, RPinCost)
         else if(origNetECoord != 0
              then
                  overlapCost = overlapCost + pinCost(origNetEPin, gatePinCost, DSPinCost, RPinCost)
              )
         )
       )
       )
    )
  )
  overlapCost
)

Is there any solution that I can avoid assignment of the cost 2 times for the same pin ? The overlap can be seen in the attached figure (Blue= PEDOT_PSS, grey = ITO ).

Overlap_example

Q2: My second question is is there any command to extract the critical path or the longest path from input to output ? This longest path length is based in the number of devices in between the input and the output port

For example: IN-M1 -M2-M3-M4-OUT and IN-M3-M4-OUT, The critical path is IN-M1 -M2-M3-M4-OUT becuase there are 4 transistors between IN and OUT pin.

Thanks

PS: I couldn't find the option to put my script in the CODE block.


skill code to automatically connect power pins in schematic

$
0
0

HI All,

I need to drop a piece of wire and correct power name on the pins of all the symbol in my schematic. Which mean I need to connect power automatically. 

I don't know who to start since I am a beginner of skill. Can someone help to let me know how to start ? 

thanks 

Nhumai 

Select tapping layer through SKILL without leWeChooseLayerForm

$
0
0

Hi,
I am writing a SKILL code to form a path between to coordinates. The first coordinate has two layers so when I enter the point "Choose object to Tap form appears" asking to select the terminal at the point or path segment and my SKILL code execution is stopped. Is there any way to internally set it when the values of this form that of there are multiple layers at the given point select the lowest layer or the layer that has the terminal or pin (or select that is not the path segement)?

The similar question has been asked here: https://community.cadence.com/cadence_technology_forums/f/custom-ic-skill/37820/accessing-lewechooselayerform

But It doesn't work for me. I am using Virtuoso Layout XL 6.1.7 64b. My test code is :

leHiP2P()
preXY(14707:7853)
leHiLayerTap()
;leWeChooseLayerForm->layerListBox->value= '( 1 )
addPoint(12842:5631)

applyEnterFun()

Thanks!

Adding Waveform function to Maestro

$
0
0

Hi,

I am using the following procedure:

procedure(custom_plot( signal1 signal2 ) 
let( ()

xaxis=drCreateVec('double samples)
y_data=drCreateVec('double samples)

for(i 1 samples
drSetElem(xaxis i i)
drSetElem(y_data i delay(?wf1 signal1 ?value1 thr ?edge1 "either" ?nth1 i ?td1 0 ?tol1 nil ?wf2 signal2 ?value2 0 ?edge2 "falling"))

)

win = newWindow()
wave=drCreateWaveform(xaxis y_data)
awvPlotWaveform( win list( wave ) ?expr list("xylist") )
custom_plot=wave
))

 

It works correctly because I can see how a waveform raises with the desired result, however when I try to assign this procedure to an output in Maestro, it seems that the procedure works because still the waveform raises with the correct result, however, if I plot it from the result table icon I am having the following error:

 

 ("Exception" 1 t nil ("*Error* Exception: SKILL ERROR" nil))

I would really like to remove the awvPlotWaveform from the procedure in order to assign the wave to an output in Maestro and plot it from the results table, could you please provide some guide on how to achieve this?

Thanks and regards,

Ivick.

Changes made in skill script is not reflecting in CIW

$
0
0

Changes made in SKILL script is not reflecting after loading it in CIW as

load "/home/script/joinPath.il"

But the changes are reflecting if I copy & paste the script content in CIW.

Please give any solution or suggestion for this issue.

generating via at given point

$
0
0

Hi,

1.I am trying to geerate via's using viaGenerateViasAtPoint  & i am  following below mentioned

viaGenerateViasAtPoint(cv list(0 0) t_viaOptionsObject[?topAndBottomLayers list("M1"&"M3")]) . This is giving syntax error

2.Is there any way to generate vias of specified cut class("bar")  using dbcreatevia() ?

Thanks,

Raghu

Extract critical path in the layout using SKILL

$
0
0

Hi,

 is is there any command to extract the critical path or the longest path from input to output ? This longest path length is based in the number of devices in between the input and the output port

For example: IN-M1-M2-M3-M4-OUT and IN-M3-M4-OUT,  The critical path is IN-M1 -M2-M3-M4-OUT because there are 4 transistors between IN and OUT pin.

Plot Ticks in SKILL

$
0
0

Is there a way to adjust the number of major/minor ticks in a plot from OCEAN? I don't see how to do this in the documentation but it seems like it would be an option.


question about Ocean "resultsDir"

$
0
0

hello export,

I'm trying to run an ocean script multiple times simultaneously as regression. for that, I need each simulation to go different directory without clashing other running ones. but seems ”resultsDir“ command only relocates psf result, not the netlist folder which still located at "~/simulation/top_test/ams/cosim_config/netlist/". 

should there be any other command I can use to redirect the netlist folder? 

thanks a lot,

David

IC6.1.7-64b.500.9

simulator( 'ams )
solver( 'Spectre )

; for config based case
design( "lib" "top" "cosim_config" "r")

resultsDir( result_dir )

ocnAmsSetOSSNetlister()

connectRules("ConnRules_mid")

modelFile( 
'("....._usage.scs" "tt_lib")
)
analysis('tran ?stop "1" ?errpreset "conservative" )

envOption(
'amsIEsList '((t "global" "" "1.8" "connectLib.CR_full_fast" "" "logic" "discipline=logic;" "Built-in"))
'builtinuser nil
)

temp( 27 )

run()

Can I add condition to ?choices on cdf

$
0
0

HI,

I need the output like below on cdf form.

when AspectRatio=t the choices to be display as '("1" "2" "3") 

         AspectRatio=nil the choices to be display as '("5" "6" "7" "8"))

EXAMPLE:

cdfCreateParam(cdfId
      ?name          "AspectRatio"
      ?prompt        "Aspect Ratio Switch"
      ?defValue      t  
      ?type          "boolean"
      ?storeDefault  "yes"
      ?display       "t"
    )

cdfCreateParam( cdfId
      ?name              "aspect_ratio"
      ?prompt            "Aspect Ratio"
      ?defValue          "1.0"
      ?type              "cyclic"
      ?choices           if(cdfgData->AspectRatio->value then '("1" "2" "3") else '("5" "6" "7" "8"))
      ?parseAsCEL        "yes"
      ?storeDefault      "yes"
    )

?choices           if(cdfgData->AspectRatio->value then '("1" "2" "3") else '("5" "6" "7" "8")) is not working it is always picking the first one('("1" "2" "3") ).

Track terminals name connected to a path using SKILL

$
0
0

Hi,

I am using Cadence Virtuoso Layout XL 6.1.7. I have a layout in which two terminals of 2 different devices are connected through a path with multiple bends. I am using SKILL to extract the pins that are connected to that path using SKILL. For example:

;; Extract all paths in the given layout

pathList = setof(shape cv~>shapes member(shape~>objType '("path" "pathSeg")) && (shape~>layerName=="ITO" || shape~>layerName=="PEDOT_PSS"))

;; for each path
path~>route~>startConn~>term~>name

path~>route~>endConn~>term~>name

with these commands I can extract the start and end connection terminal of this path. But due to multiple bends, the path is made up of multiple small paths and sometime I select those intermediate paths. With these intermediate paths If I try to extract the startConn and endConn then returns me nil. Is there any possibility to track back or forward to extract the startConn or endConn from this intermediate path ? Should I merge the whole path between two pins first and then extract the terminals attached to it ? or should I write a code to tract back until I reach the terminal ?

Thanks

Equivalent function for hiDisplayFileDialog in IC5

$
0
0

Hi,

In Cadence IC6, the function "hiDisplayFileDialog" is available. However, in Cadence IC5, there are no such function.

May i know what is the equivalent command for this function? or is there any alternative to pop up the file dialog box?

Thanks,

KS.

getData returns nil

$
0
0

Dear all,

To get a wave object from my simulation results, I am trying to use the getData() command. However, I am having some issues with it. For example, getData("/OUT") returns nil in the CIW after I have simulated my testbench in ADE XL. However, when I am explicitly specifying the resultDir in getData() I am not getting this error (logically). I have used openResults() in order to use getData("/OUT") but without success. When can I use getData("/OUT")?

Kind regards, 

Nicolas

skill script to add layout pin for given metal intersect

$
0
0

Hi,

Lets say I have metal 9 and metal 10 intersecting each other. I want to add layout pin at all the location where these 2 metal intersect. Pin name should be same as metal 9 label.

Is there simple script that can do the job ?

Thanks

GC

spectre syntax

$
0
0

Hello,

When I want to skip list of instances having the same name  with just the index number changing I must declare each instance separately

opt2 options skip=cut  inst=[X8SEG\<0\>.XSEG\<7\>   X8SEG\<0\>.XSEG\<6\>   X8SEG\<0\>.XSEG\<5\>   X8SEG\<0\>.XSEG\<4\>   X8SEG\<0\>.XSEG\<3\>  X8SEG\<0\>.XSEG\<2\>   X8SEG\<0\>.XSEG\<1\>]

Instead of entering the instances to be skipped one by one, I want to skip them all by using this command line :

opt2 options skip=cut  inst= [ X8SEG\<0\>.XSEG\<1:7\>  ]

i obtain this ERROR :

 Internal error found in spectre during circuit read-in.
Encountered a critical error during simulation. Submit a Service Request via Cadence Online Support, including the netlist, the Spectre log file, the behavioral model files, and any other information that can help identify the problem.
FATAL (SPECTRE-18): Segmentation fault.

Could you please tell me how to skip all of them without having to put each instance path separably.

thanks,

kotb


Code to strip outer parentheses

$
0
0

Hi,

I am calling a routine that returns either a number or a string (the routine is figuring out a parent parameter defined in some upper parent in the hierarchy). The problem is that if a string is returned it is surrounded by a set of parentheses for every hierarchical level that was traversed finding the parent parameter. So the routine could return a straight number, or it could return some text surrounded by an arbitrary amount of parentheses e.g. "blah" or "(blah)" or "((((((blah))))))".

I can't edit the original routine and I'm stumped trying to figure out a way to remove all outer pairs of parentheses - can anybody point me to some code that does this. Please note that I only want to remove OUTER pairs of parentheses i.e. if I had "(((blah(0))))" then I'd want to end up with "blah(0)".

Many thanks in advance.

Probe net across schematic hierarchy through vsource

$
0
0

Hi

I generally have lot of current probes in schematics using 0V Voltage sources. I add a net probe with geAddNetProbe() and I would like to continue the probe(on the otherside of the 0V sources) passing through the voltage sources.

I have written a following script which does the job partially. The following script looks for the currently probed net, runs across all the instances connected to the net. If there is a 0V vsource, I add another probe(with same color) on the other side of the 0V vsource.

wId = hiGetCurrentWindow()
pList = car(geGetAllProbe(wId))
pC = pList~>probeColor
pNvdc = setof(x pList~>objectId~>instTerms~>inst x~>cellName == "vsource")
foreach(p0vdc pNvdc

figs=p0vdc~>conns~>net~>figs
xy1=car(nth(0 nth(0 figs))~>points)
xy2=car(nth(0 nth(1 figs))~>points)

geAddNetProbe(wId pC xy1)
geAddNetProbe(wId pC xy2)
)

This works great at a particular schematic hierarchy. But doesn't work across hierarchies. For e.g. consider few lines of a netlist

I0 ( net1 netA) vsource type=dc dc=0
I1 ( net2 netB) vsource type=dc dc=0
I2 ( net3 netC) vsource type=dc dc=0
IX ( netA netB netC) myInst

subckt myInst (netA netB netC)
IY ( netA netA1) vsource type=dc dc=0
IZ ( netB netB1) vsource type=dc dc=0
.
.
.
ends myInst

If net1 is probed first and the aforementioned skill code is run, netA alone gets probed. But I would like to continue the probe on netA1 inside the hierarchy IX. How do I modify the code to achieve this. If there is totally a different line of thinking to achieve the same effect, that would also help!

Thanks
Shankar

selected pins move to left edge of the corresponding metals

$
0
0

Hi all,

I have lot pins to move left edge of the block and it should not to go beyond corresponding metal.

Example:

I have 3 metals M3 Drawing over that M3 pins was placed.
those pins to move left edges of the corresponding metals.

can anyone help on this / anyone having related script ?

Thanks,
Mahesh

axlAddOutputExpr() does not plot signal

$
0
0

Dear all,

I have made a simple OCEAN measurement script to sample a signal in my system and adding it to the results pane in ADE XL. Though, I am seeing in the results pane the output "Discrete Feedback Signal", but without the plotting symbol (empty field). Underneath the important part of the script:

session = axlGetWindowSession()
setupDB=axlGetMainSetupDB(session)
sessionObject=asiGetSession(session)
psfDir=asiGetPsfDir(sessionObject)
openResults(psfDir)
selectResults('tran)

;Get variable names and values

variableNames=cadr(axlGetVars(setupDB))
period=cdfParseFloatString(axlGetVarValue(axlGetVar(setupDB "tperiod")))
samples=cdfParseFloatString(axlGetVarValue(axlGetVar(setupDB "OSR")))
endTime=(samples-1)*period

;Adding and evaluating expressions in ADE XL
initTime = (period*2-period/4)
stepValue = period
axlAddOutputExpr(session testName "Discrete Feedback Signal" ?expr "sample(VT(\"/dac_out\") initTime endTime \"linear\" stepValue)" ?plot t ?save t)

Kind regards, 

Nicolas

import PSF in python

$
0
0

Hello,

For post processing purposes I want to load PSF simulation data into python.

At the moment it is done by executing skill code:

openResults(...)
res=v("/vout" ?result 'tran)
getWaveformCSV(res) --> this is a modified version of abDumpWaveformstoVCSV.il which is mentioned in 29964.

This generates a CSV like text file which can be loaded and parsed in python.

Is there a more direct way to load the PSF data into python to improve efficiency, such as exist for matlab?

Br,

Dries

Viewing all 5066 articles
Browse latest View live