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

How can a Procedure be used in Ocean Output Expressions?

$
0
0

Hi,

I am trying to clean up the output expressions in my OceanXL file by defining and using a procedures to replace the repetitive expressions. However, whatever I try, I keep getting Undefined function Error and the calculation gives eval err... as if it does not pick up the Procedure or does not recognize it as a Procedure. Here is what I am doing:

procedure( calc_dco_start_time(dco_node supply)
          cross(VT(dco_node) (0.5 * supply) 5 "rising" nil nil nil)
         ) ;proc

ocnxlOutputExpr( "calc_dco_start_time(\"DCO_PHASE<0>\" VAR(\"VCC\"))" ?name "start_time" ?plot t ?save t)

and here is all the things I have tried so far:

1) Since it didn't work having both the procedure and the outputexpr in the body of my ocean script, I tried putting the procedure in a separate .il file, meas_funcions.il, and doing load("meas_functions.il") at the body.

2) I tried using (defInitProc "calc_dco_start_time" 'calc_dco_start_time) 

3) I added load("meas_functions.il") to ~/.oceanrc file

4) I added load("meas_functions.il") to ~/.cdsinit

Can a procedure be called inside oceanxloutputexpr or not? If so, what is it that I am missing here?

I am using Cadence IC618 and running sims with Spectre APS version 18.1. Not sure if it makes a difference or not, but I am running ocean from unix command line.

Thanks a lot!

Aynaz


Pin width change

$
0
0

Hi, 

 I am writing a code to change the pin width cyclically, and be lwo is my code

sel_pin=css()

if(sel_pin ~>objType == "rect" && sel_pin~>children != nil then

p_width=caadr(sel_path~>bBox)-caar(sel_path~>bBox)

cond(
(p_width<0.2   p_width=0.5)
(p_width<=0.2 && p_width<0.6 p_width=0.6)
(p_width>=0.6 && p_width<1 p_width=1)
(p_width>=1 && p_width<2 p_width=2)
(p_width>=2 p_width=.2)
);end cond

pin_width=p_width
crd1=car(sel_pin~>bBox)
crd2=list(car(crd1)+pin_width cadr(crd1)+pin_width)
sel_pin~>bBox=list(crd1 crd2)
sel_pin~>children~>xy=list(car(crd1)+(pin_width/2.0) cadr(crd1)+(pin_width/2.0))
sel_pin~>children~>height=(pin_width/2)

);end if

When I exucte the code for pin width 0.2, then the Cond statement not changing the p_width to 0.6.

Its taking p_width<0.2 is true when pin width is 0.2.

Please correct me if any thing is wrong

Is there anyway to lock the schematic view and make it invisible?

$
0
0

Hi ,

I am looking for a skill command that can make the schematic view invisible and only the symbol visible?

One way is to use hspice sub circuit encrypted.

But every time that I intend to run the ADE simulation I have to upload the .scs file. So I am wondering if there is a way around it to automate it as much as possible.

Regards,

Lavanya

Setting Cut Class during dbCreateVia

$
0
0

Is there any way to define the "Cut Class" for the via while using dbCreateVia() command?

Thanks

Vishal

highlighting bbox

$
0
0

I have dbid of shape & it's bbox.Is it possible to highlight the shape using bbox  using preferred markNetColor.

Thanks,

Raghu

Webinar: Writing Good SKILL Code

$
0
0

A bit of self-promotion here, but I thought I'd mention that I'm giving a webinar on Wednesday 3rd July which may be of interest to those in the community forums.

Join Custom IC AE Group Director, Andrew Beckett for this free, one-hour live webinar.

When? Wednesday, July 3, 10:30 CEST

SKILL® is the programming language used to customize various Cadence applications such as the Virtuoso® and Allegro® environments.

In this webinar, I’ll present tips on how to write good, maintainable SKILL code so that others in your team can use and understand your code.

Agenda

  • Style and formatting
  • Good coding practice
  • How to defensively check for errors
  • Strategies for writing efficient code
  • Taking advantage of the SKILL IDE
  • Optimizing programs

For more information, check out the Cadence website: Writing Good SKILL Code

To register: REGISTER NOW!

Info on abeLayerFromNet and abeLayerFromShapes function

$
0
0

I am just looking for some understanding about the function abeLayerFromNet.

Does the function get only cellview objects on the net or does it extract from the hierarchy? 

Does the abeLayerFromShapes take the hierarchy path of a shape or only at cellview level?

Paul

Is there any command to extract a Veriloga in SKILL

$
0
0

Hi ,

I am looking for a command that can  extract a Veriloga text file in SKILL. It would be great if anyone can reply.

Regards,

Lavanya


Intercept custom skill function before execution

$
0
0

Hi,

We have a custom skill script which can be called either through a menu or a keyboard shortcut inside the virtuoso schematic editor. This skill function reads a cadence variable which is set in our cdsinit file. This variable defines the root directory of where the output of the function is placed. The remainder of the directory is derived from the cell name. 

I am not able to change this function as it is used company wide. However, our team wants the option to steer the output of the function based on the virtuoso library as well as the cell. I've identified two possible ways of doing this but haven't been able to work out how to implement either of them:

  • write a function which is called any time a window gains focus. If the window is a virtuoso schematic window, update the cadence variable with the appropriate destination for that window. 
  • create a trigger which catches the function before it's called, and modify the variable before calling the function.

I can't see anything in the documentation about knowing when a window gains focus - only how to set the focus of a window. I also don't have enough SKILL knowledge to understand the custom triggers. Are either of these solutions viable - or, is there a better way to achieve the same result?

Thanks,

Alistair

SKILL code to determine if two points are connected in layout

$
0
0

Hi,

I'd like to figure out if there is a connection between two points in the layout. I know I can do that by "Connectivity->Mark Net": I define the via layers, click on one point and see if the other point is highlighted. 

But how do I write "mark net" equivalent in code? Ideally I want to take these two points as inputs, and the output would be a boolean value.

I thought I needed to use dbGetOverlaps, but I'm not sure how to define the searching bBox properly in this case as it is complicated.

Thank you very much!

How to convert '() to list()

$
0
0

Hi,

I would like to convert a list from no evaluation to evaluated list. h ow can I do that.

my code is :

yhwDrDefinePacket = list(
;( DisplayName  PacketName                   Stipple    LineStyle  Fill       Outline    [FillStyle])
'( display      M1_drawing                   metal1S    solid      blue       blue       outlineStipple)
'( display      M1_label                     blank      solid      blue       blue       outlineStipple)
'( display      M1_pin                       X          thickLin2  blue       blue       X         )
)

foreach(yhwPacket yhwDrDefinePacket
 if(drFindPacket("display" pcExprToString(nthelem(2 yhwPacket))) then
  drSetPacket(yhwPacket)
 )
)

when I run the code, it show the error below:

*Error* drSetPacket: too few arguments (at least 6 expected, 1 given) - ((display M1_drawing metal1S solid blue ... ))

So instead of passing 7 arguments, it pass just 1 arguments

Thanks for any help

Tony

Will the output of dbProduceMemName always be in order?

$
0
0

I'm writing some code to pull out bus interconnect from a schematic.  If someone swapped the bits of the bus upon entering a block, is the output of dbProduceMemName always left to right in order? For example, if a bus coming into a symbol was labeled "net1<7:0>" and the internal pin was "net1<0:7>", would I be able to use dbProduceMemName to create two lists and pull each item in the lists in order to get connectivity? Thanks in advance.

Variable overflow

$
0
0

Hi,

I wish to code the below equation:

nCr = (n!) / (r! * (n-r)!)

 

When i use the factorial function (n!)  as below:

procedure( factorial( n )
if( zerop( n ) then
1
else
n*factorial( n-1)
) ; if
) ; procedure

factorial(17) already make the data overflow. That means the max of n that i can use is only 16.

I would like to do factorial of until 5000.

Please let me know if you have any alternatives to do that.

Thanks,

Kean Sek.

Using a variable to pass value in an argument

$
0
0

Hi! I'm pretty new to SKILL, and would love some help with this.

I need to change the property "numInst" & "name" of each instance in my circuit.

I'm using a foreach loop, where I encounter each instance and compute the new value for numInst by multiplying the numInst with mult (need some help with this too)

I'm using schReplaceProperty which requires me to add the prop value in quotes, but I'd like to use this new variable to pass on the value.

foreach( instance cv~>instances

        name=instance~>name

        mult = instance~>m
        numInst = instance~>numInst

        inst_list='()
        inst_list=cons(instance inst_list)     

        numInst2=mult*numInst ( How do I perform this operation?) 

        schReplaceProperty( inst_List "instNum" "numInst2 (over here I want to pass the value stored in numInst2)" )

       schReplaceProperty( inst_List "name" "name<instNum-1:0>" )  ;;; for example if the current name is M0, and numInst is 4 ..then I want the new name to be M0<3:0>

          ); end foreach

How do I proceed? If there's a better way to do this without using schReplaceProperty, please let me know. 

Thank you!

writing into output file

$
0
0

I have an input file\reference file . Based on a condition met in program I want to add prefix (# or ;)  before lines into output file using line number.

Thanks,

Raghu


Automated Labelling

$
0
0

I'm making a python code that will write SKILL code that will place pads into a pad ring. As of right now, when placed, the pads all have the same exact labels. While this works for most, I do want to have some of them change. For example, there is something named P and something named PADR1. I want these names to change to P<n> and PADR1<n> where n is the number pad that is being placed. I found a post from 13 years ago that was close to solving the problem using rexMatchp and rexReplace. To call The function these were in looked something like: ReplaceFunction( "old string"  "new string"). This came really close to working. I did run into a couple problems with it, however. First, when my code places the pads for the ring, it isn't in the right view to be able to change labels. What I mean by that is that you have to double click and/or shift-f to see a view that has the labels up. So the first thing I want to know is how to get to the correct view using SKILL to be able to edit the labels. The second issue I ran into was that, when I used the ReplaceFunction, I got some funky results. For example, if I did ReplaceFunction( "P"  "P<0>"), everywhere that had a P in the name anywhere would get effected. This means that, yes P was changed to P<0>, but also that PADR1 was changed to P<0>ADR1. Is there any way make SKILL look at the whole string instead of just looking at a string, and say "This has that P at the start of a longer string, better replace it!" Any help y'all could give would be a huge help. Thank you :)

transform to current hierarchy

$
0
0

Hi,

i have  a list of cellnames . I need to lookout for these cells inside a layout having lot of hierarchies . Currently I used lesearchierarchy()  to get these cells or instances coordinates. I need to get these cells cordinates a/c to current hierarchy . I gone through dbconcatetransform() but didn't get idea how to implement this . Please let me know if anyone dealt with this before .

Thanks,

Raghu

Docking options form in an assistant

$
0
0

Hi,

I have a kind of weird wish. Would like to make the options form for any command to appear on assistant. The current solution in CIW->Options->User preference->Display options when command starts is bit annoying since the form appears in the screen in a obstructing way.

Background: Tried setting bindkeys for desired options instead of invoking the options form. This way the number of bindkeys are growing in number to remember. If displayed in an assistant it would be elegant.

-Ramakrishnan

Function to check if an object is inside an object

$
0
0

Hi,

Please let me know if there's a function to check if an object is inside another object.
For instance, consider the objects, 'shape1' and 'shape2' in the below figure.

In this case, the object 'shape2' is not entirely inside the object 'shape1'.
Please let me know if there's a built-in function(or the algorithm) to find the same.

Thanks,
Mallikarjun

Selection Problem SKILL messing with rectangle placement

$
0
0

I am gonna start off by saying that I am pretty new to SKILL. My Code is at the Bottom if you want to look at that. I'm having on odd problem with my SKILL Code. When it first places an Instance, you can move everything around independently. But, after you double click on an instance and it goes from the view with the red outline to the one with the white, things start going funky. First off, the only Pcell I can move is the one I initalliy double clicked to change the view. Second, if I move that one, any instance that is the same PCell moves with it. See Image where I move a corner cell and the other 3 move along with it.

                

If this was all that happened, it would be annoying but I could get around it. But, if I try to place a rectangle into the layout with SKILL using

rect3 = rodCreateRect(
?name "rect3"
?cvId geGetEditCellView()
?layer "Met5"
?bBox list(466:387 496:600)
)

it places 4 rectangles, each tied to one of the corners. I'm pretty sure this is based on the last thing I placed using the code since, when I tested it using PANALOG_S as the last thing I place, I ended with many rectangles. How can I make it only place one rectangle?

One last thing, if y'all are willing to help me with this as well. When I'm in the view with the red outline, the one where an instance if first placed, I am having trouble placing rectangles in any layer other than background. Can you do that with SKILL? I know that if the layout is in the other view, the one with white outlines, that I can make the rectangles place using that bit of code above. How can you change the view using SKILL? Thank Y'all again. And before you say anything about which pads I have where, I know that it is nonsensical. I am just trying to figure out the code so this is a test run.

procedure(placePadFrame1( @optional no_pads )

(setq no_pads 6.0)

(if (null no_pads) then

(setq no_pads (enterNumber ?prompts '("Please enter the number of pads on a side"))))

(setq xpointh 593)

(setq ypointh 300)

(setq xpointv 503)

(setq ypointv 849)

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PBREAK_T" "layout") nil (list xpointv+(40*-1) ypointh-223) "R0")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PANALOG_S" "layout") nil (list xpointv+(40*0) ypointh-223) "R0")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PAVDD_S" "layout") nil (list xpointv+(40*1) ypointh-223) "R0")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PAVDD_T" "layout") nil (list xpointv+(40*2) ypointh-223) "R0")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PANALOG_S" "layout") nil (list xpointv+(40*3) ypointh-223) "R0")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PAVDD_T" "layout") nil (list xpointv+(40*4) ypointh-223) "R0")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PANALOG_S" "layout") nil (list xpointv+no_pads*40+346 ypointv+(40*0)-386) "R90")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PAVDD_T" "layout") nil (list xpointv+no_pads*40+346 ypointv+(40*1)-386) "R90")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PBREAK_T" "layout") nil (list xpointv+no_pads*40+346 ypointv+(40*2)-386) "R90")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PANALOG_S" "layout") nil (list xpointv+no_pads*40+346 ypointv+(40*3)-386) "R90")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PAVDD_T" "layout") nil (list xpointv+no_pads*40+346 ypointv+(40*4)-386) "R90")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PANALOG_S" "layout") nil (list xpointv+no_pads*40+346 ypointv+(40*5)-386) "R90")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PANALOG_S" "layout") nil (list xpointv+(40*0) ypointv+no_pads*40) "R180")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PAVDD_T" "layout") nil (list xpointv+(40*1) ypointv+no_pads*40) "R180")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PANALOG_S" "layout") nil (list xpointv+(40*2) ypointv+no_pads*40) "R180")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PAVDD_T" "layout") nil (list xpointv+(40*3) ypointv+no_pads*40) "R180")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PANALOG_S" "layout") nil (list xpointv+(40*4) ypointv+no_pads*40) "R180")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PAVDD_T" "layout") nil (list xpointv+(40*5) ypointv+no_pads*40) "R180")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PANALOG_S" "layout") nil (list xpointv-426 ypointh-70+(40*1)+233) "R270")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PBREAK_T" "layout") nil (list xpointv-426 ypointh-70+(40*2)+233) "R270")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PANALOG_S" "layout") nil (list xpointv-426 ypointh-70+(40*3)+233) "R270")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PAVDD_T" "layout") nil (list xpointv-426 ypointh-70+(40*4)+233) "R270")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PANALOG_S" "layout") nil (list xpointv-426 ypointh-70+(40*5)+233) "R270")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PAVDD_T" "layout") nil (list xpointv-426 ypointh-70+(40*6)+233) "R270")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PCORNER_T" "layout") nil (list xpointv-426 ypointh+no_pads*40+549) "R270")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PCORNER_T" "layout") nil (list xpointv+no_pads*40+346 ypointh+no_pads*40+549) "R180")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PCORNER_T" "layout") nil (list xpointv+no_pads*40+346 ypointh-223) "R90")

(dbCreateInst (getEditRep) (dbOpenCellViewByType "Pad_Library" "PCORNER_T" "layout") nil (list xpointv-426 ypointh-223) "R0")

)

Viewing all 5069 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>