CommunityForums Custom IC SKILL Big Schematic Automation

Stats

  • Replies 7
  • Subscribers 128
  • Views 490
  • Members are here 0

Big Schematic Automation

Yasso
Yasso 14 days ago

Hello! I'm having some trouble trying to figure out how to create a huge schematic using SKILL IDE. What I'm trying is the following.

Example2x2

Here I have a small design that has 4 cells, 2x2. I need to make one that has 1024x1024 cells, and it's impossible to do by hand so I decided to jump into SKILL. I'm a newby, no experience in using the commands and I have been looking for examples that could help me in making such a code. I saw a code made by @Andrew Beckett, in this topic https://community.cadence.com/cadence_technology_forums/f/custom-ic-skill/36821/schematic-creation-using-skill, which I modified a little so it places my cells in a array. The code is 100% made by him, I just tried to adapt it to my problem.

(defun abCreateBigSchematic (@key (cv (geGetEditCellView)) (numInsts 4) (numParallel 2)
(lib "Trabajo_Pixel") (cell "Pixel_Block") (view "symbol")
(stepX 3) (stepY 2) (stubLength 0.125) (textHeight 0.0625)
verbose)
(let (master (x 0) (y 0) pinLocations pinMaster pinVa_arriba pinVa_abajo wire numRows wireId instId Poti)
;Poti=list Pot1 Pot2 Pot3 Pot4
(setq master (dbOpenCellViewByType lib cell view))
(setq pinMaster (dbOpenCellViewByType "basic" "iopin" "symbol"))
(foreach mapcar terminal (dbGetq master terminals)
(centerBox (dbGetq (dbGetq (car (dbGetq terminal pins)) fig) bBox))
))
(setq numRows (quotient numInsts numParallel))
(for row 1 numRows
(when (and verbose (zerop (mod row 100))) (printf "Row %d\n" row))
(setq x 0)
(for col 1 numParallel
(dbCreateInst cv master "" (list x y) "R0")
;instId=(dbCreateInst cv master "" (list x y) "R0")
;instId~>Poti=Pot
pinVa_arriba=centerBox(car(dbFindTermByName(master "Va_arriba")->pins)->fig->bBox)
pinVa_abajo=centerBox(car(dbFindTermByName(master "Va_abajo")->pins)->fig->bBox)
/*wireId=dbCreateLine(cv '("wire" "drawing") list(pinVa_arriba pinVa_abajo))*/
(foreach (pinLoc netName) pinLocations (list pinVa_arriba pinVa_abajo)
(setq pinLoc (dbTransformPoint pinLoc (list (list x y) "R0" 1)))
(setq wire (schCreateWire cv "route" "full"
(list pinLoc (list (plus (xCoord pinLoc) stubLength) (yCoord pinLoc)))
0.01 0.01 0))
)
(setq x (plus x stepX))
)
(setq x (plus x stepX))
(setq y (plus y stepY))
(setq pinVa_arriba pinVa_abajo)
)
(schCheck cv)
(dbSave cv)
t
)

Managed to place the cells, but when I tried to add the wire connections as the image shows it shows me an error, I needed to add the power lines (Vdd1, Vdd2), the RST and the conections. Tried first with the easy Va_arriba to Va_abajo but it doesnt do it properly, adds a wire far away.

Adding a property to each cell gave me an error too. I marked both sentences that I tried to use inside the loop in bold. Since it's 2 properties, the area which will be the same everytime (1.2u) and the power. I was thinking in putting a loop for that too because I need to name that variable Pot<i>, for i:length(array)

Not sure if it is possible to do that, I didnt see anything like that when I was searching. One last thing, I know in the properties you can choose the Id of the cell that you are placing (symbolToString). In the image example I tried to have the Id in order.

I'm sorry for asking so many questions in one thread, I'm not really good at coding in SKILL. Thanks for reading, any kind of hint in how to implement these things would be a life saving thing.

Yass

  • Reply
  • Cancel
  • Cancel
  • AurelBuche
    AurelBuche 14 days ago

    Hi,

    I guess what you want is doable in SKILL even though I'm not sure I have fully understood your needs

    Are you sure you cannot achieve your objective using hierarchy coupled with parallel and serial instances, pins etc. ?

    You can do many things in Schematics using just the right instances/pins/nets names and buses suffixes

    Cheers

    Aurel

    • Cancel
    • Up +1 Down
    • Reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 14 days ago in reply to AurelBuche

    I was thinking the same thing as Aurelien. For example, here's a schematic for a 1024 element row - and you could then produce a similar schematic instantiating an iterated instance of PixelRow to connect the rows up. It doesn't really need SKILL...

    • Cancel
    • Up +1 Down
    • Reply
    • Cancel
  • Yasso
    Yasso 14 days ago in reply to Andrew Beckett

     They told me that it was possible with busses (a college from work told me about it but I couldnt really replicate it) but my biggest fear was setting the parameters "Pot". They have to be in order for different purpouses. Is it possible to do that using ocean for example? Like

    desVar("cot0/Pot"    x )

    desVar("cot1/Pot"    x )

    desVar("cot2/Pot"    x )

    Wouldnt it repeat when trying to do it row by row with the new instance? or it would continue to cot1024,cot1025,cot1026.. . Sorry about my english, it's clunky.

    Thanks for the help!

    • Cancel
    • Up 0 Down
    • Reply
    • Cancel
  • Yasso
    Yasso 13 days ago in reply to Andrew Beckett

    I tried using a smaller design (4x4) using busses, and I get to the point of defining the power values of each cell.

    In a ocean script I have something as follows.

    desVar( "/I<0>/C<1>/IP1/Pot" 4 )
    desVar( "/I<0>/C<1>/IP2/Pot" 4 )

    But doesnt really work. The "Pot" is a CDF value from the first cell Pixel_Block (pPar("Pot")). I did search and couldnt find a way of dealing with it, is there a way of doing it like this or the value is locked as "Pot" and I cant change it?

    Thanks, Yass

    • Cancel
    • Up 0 Down
    • Reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 13 days ago in reply to Yasso

    I hadn't fully read through your original post (partly because I didn't fully get what you were trying to do) when I made my suggestion about using iterated instances and buses. You can't set "hierarchical" design variables, because design variables are not hierarchical.

    There are two types of parameters/variables:

    1. Design variables - this is where you have a component parameters - eg. on a transistor it might have w=MYWID - in that case MYWID is a design variable and is global - so has the same value throughout the circuit. For this you can set desVar("MYWID" 2u) in an OCEAN script for example
    2. Passed parameters - using pPar(). So the transistor on a block could w=pPar("wp") and then in the CDF for that block you can define the default value of wp, and on various instances of the block you can set what that instance's value of wp is - so one instance has wp=2u, one has wp=2.5u etc. Or an instance could have wp=pPar("wp1") and then pass the parameter through another level of hierarchy. You cannot set these parameters with desVar() unless the parameter is passed to a point where you have the value set to a design variable

    ADE Explorer and Assembler (and the older ADE XL) have the ability to set parameters as well as variables, and these can be the values of components in a block. So that means that you can set the values of a CDF parameter for different instances differently at simulation time. Note that these are instance parameters rather than occurrence parameters - so this means that you can set the value of a particular instance in all occurrences of the containing cell - you can't set it for a hierarchical path.

    It's not entirely clear exactly what you need to be uniquely set - so trying to give you an explanation as to what you can/can't do is rather hard.

    Perhaps you should contact customer support so you can explain this in more detail to an application engineer?

    Andrew

    • Cancel
    • Up +1 Down
    • Reply
    • Cancel
  • Yasso
    Yasso 13 days ago in reply to Andrew Beckett

    Hello, so I cant set the value "Pot"  in hierarchical circuits for different cells, that's a problem. The reason I was asking for help in the first place is about the SKILL code. I want to create a square array of these "Pixel_Block" cells in numerical order. I have to set the name in the Pot box ("Pot" is a CDF parameter of the cell) to different ones in that kind of numerical order, like Pot1, Pot2, .... Pot1024, then jump to the next row to Pot1025, Pot1026, .... , repeating this process until it reaches the Potn cell. After this I will use an ocean script that I have to set the different power values for each an everysingle one of these Pot using desVar( ) , like this

    desVar( "Pot1" 1)

    desVar( "Pot2" 2)

    desVar( "Pot3" 5)

    I too wanted to know if it was possible to set the blocks with the ID in numerical order too (in rows with I0, I1, I2, .... and then jump to I1025 for the next row, like with the Pot) . Is it possible using a foreach loop to set these 2 things in SKILL?, I cant quite figure it out. Knowing how to do these 2 things  would help me a lot, I dont mind setting the wires by copying them, but instatiating the name for each and single one of the cells when the array is nearly a million cells is impossible hahahahaha.

    If it is needed I can contact costumer support and send an application on monday (since I need to request the license id from where I work)

    Thanks in advance!

    Yass

    • Cancel
    • Up 0 Down
    • Reply
    • Cancel
  • Yasso
    Yasso 10 days ago in reply to Andrew Beckett

    Hello again, I have done small changes and now I'm able to place these blocks with different ids (names) in numerical order. I just added this to the code.

    (let k idName)
    (setq idName list("I1" "I2" "I3" "I4") )

    k = dbCreateInst(cv master "" (list x y) "R0")
    (foreach elem1 idName
    (k~>name=elem1)
    )

    It works perfectly, It places the cells with the names in order. For me is important since later I have different routes of voltages with names inside the block and they have to be in order. Now my last thing to achieve is to set the cdf property to different names but in order too. I mean this.

    Each cell has a CDF parameter called Pot, and I want it to have a different name so later I can slap any value using a script. I tried using a foreach loop too but it only set the lastest name of the loop. It sets the value to Pot4 to all the cells, and I dont want that.

    (foreach elem2 list("Pot1" "Pot2" "Pot3" "Pot4")
    (k~>Prop=elem2)
    )

    Soon I'll have the license to contact customer support and send a ticket, but I'm curious if it is possible to achieve this easily or if is more complicated.

    Thanks again for your patience.

    Yass

    • Cancel
    • Up 0 Down
    • Reply
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.