Home > Community > Forums > Digital Implementation > How to make a iteration of all the VIAs in SOC Encounter database?

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 How to make a iteration of all the VIAs in SOC Encounter database? 

Last post Mon, Oct 29 2007 7:45 PM by archive. 7 replies.
Started by archive 29 Oct 2007 07:45 PM. Topic has 7 replies and 2022 views
Page 1 of 1 (8 items)
Sort Posts:
  • Mon, Oct 29 2007 7:45 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,910
    How to make a iteration of all the VIAs in SOC Encounter database? Reply

    Hi, all:

    I am Roc Sun. Recently, I got a few problems.

    One is how can I iterate all the via instances in SoC Encounter. I can find the command 'dbViaCellName' or something, but I can not find the way to get via instances. As you know, in SoC52, it 'split via' utility is not working. So, I want write my own version using database command.

    The other is that, how can I get all the drc box coordinates, I mean the white boxes after we made a DRC check in SOC Encounter. I want to write this script in db commands.

    Best Regard!


    Originally posted in cdnusers.org by eminemshow
    • Post Points: 0
  • Tue, Oct 30 2007 7:16 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,910
    RE: How to make a iteration of all the VIAs in SOC Encounter database? Reply

    Perhaps the best way to get via instances is with the "editSelectVia" command. It has a lot of options for filtering that will hopefully enable you to get the vias you're interested in selected, and then you could iterate through the db pointers of the selected set with "dbForEachHeadSelPtr". You might also consider using the "editChangeVia" command to modify certain via instances. I'm not sure what you want to do with the via pointers once you've gotten them, so please do post back if additional building blocks would be helpful to you.

    I am not aware of a way to iterate through the drc boxes via TCL. In the past, when I've needed to do this, I've processed the text output of verifyGeometry to get the drc box coordinates. I realize this can be cumbersome, but hopefully this can be addressed with an enhancement to the tool in a future release.

    Hope this helps,
    Bob


    Originally posted in cdnusers.org by BobD
    • Post Points: 0
  • Tue, Oct 30 2007 5:22 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,910
    RE: How to make a iteration of all the VIAs in SOC Encounter database? Reply

    Thanks! BobD

    I think the way to iterate all the vias you proposed is workable. I will later post my own tcl to iterate all the wires and vias of a specified NET. Yesterday I follow the db manual to write, but find my script a little bit strange.

    For the way of getting all the drc boxes, I really did not find correspond db commands, sigh. But your idea has enlighted me!


    Originally posted in cdnusers.org by eminemshow
    • Post Points: 0
  • Wed, Oct 31 2007 10:22 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,910
    RE: How to make a iteration of all the VIAs in SOC Encounter database? Reply

    Bob:

    Following is my script,

    proc getNetRoute { netName } {
    set FILE [open net_physical.rpt w]
    set netPtr [dbGetNetByName $netName]
    set iter [dbIterRoutes $netPtr]
    set routePtr ""
    while { [set routePtr [dbRouteNext $iter]] != "0x0" } {
    set type [dbObjType $routePtr]
    if { $type == "dbcObjWire" } {
    puts $FILE "Wire found:"
    puts $FILE "[dbInfoWire $routePtr]"
    } elseif { $type == "dbcObjStripBox" } {
    if { [dbIsStripBoxVia $routePtr] || [dbIsStripBoxViaCell $routePtr] } {
    puts "via $routePtr found"
    dbHiliteObj $routePtr 4
    # dbHiliteObjBox $routePtr
    dbSelectObj $routePtr
    }
    puts $FILE "Wire/Via found:"
    puts $FILE "[dbInfoStripBox $routePtr]"
    puts $FILE "Z: [dbStripBoxZ $routePtr]"
    dbSelectObj $routePtr
    set netPtr [dbStripBoxStrip $routePtr]
    set objType [dbObjType $netPtr]
    if { $objType == "dbcObjNet" } {
    puts "[dbNetName $netPtr]"
    } elseif { $objType == "dbcObjSNet" } {
    puts "[dbSNetName $netPtr]"
    } else {
    }
    } elseif { $type == "dbcObjVia" } {
    puts $FILE "Via found:"
    puts $FILE "[dbInfoVia $routePtr]"
    } else {
    puts "Error found, unknown type $type"
    }
    }
    dbEndIterRoutes $iter
    close $FILE
    }

    The only way I found to get the 'vias' is using the above 'dbIterRoute' method. And it seems that SOCE now only support stripbox for all the routes (including wires and vias). We cannot get the via instances.

    For your method to select vias 1st, It also ends up with getting 'dbcObjStripBox'. I will post another question in a new thread.


    Originally posted in cdnusers.org by eminemshow
    • Post Points: 0
  • Thu, Nov 1 2007 12:32 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,910
    RE: How to make a iteration of all the VIAs in SOC Encounter database? Reply

    As you can see from your scripted example, there isn't exactly a notion of a "via instance" in SoC-E. Vias are modeled as a unique kind of wire segment that happens to be an instantiation of a via cell.

    I'd like to know (for your benefit as well as others who might come across this post) what would you do with the via instance pointer if you were able to get it? You mention that you're having trouble with a "split via" utility- but I'm not clear on what that means.

    Thanks,
    Bob


    Originally posted in cdnusers.org by BobD
    • Post Points: 0
  • Thu, Nov 1 2007 6:47 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,910
    RE: How to make a iteration of all the VIAs in SOC Encounter database? Reply

    Bob:

    In SOC Encounter 5.2, there is a utility in 'sroute' called 'split via'. It is used to split big vias into several small ones, in order to free some routing channels. You can try this using 52, but it doesn't work. I have filed a PCR in China, and Cadence has committed this. So before the next major release, I want to write this script my own. Now that I can get the via inst 'strip box'. And I can get its info using 'dbInfoStripBox', the other thing left is to 'split it'.

    My idea is to get the area of the via 'strip box' which is the overlapping area between metals, and then create a new via cell using setViaEdit & editAddVia, instantiate the new via cell. And at last change the via owner (which means 'net'). But I have several obstacles.

    1. How to get the newly created via cell, as my new post mentioned, there is a way to get all the via cells?
    2. How to change the owner (net) of the via (the newly added ones) ?

    Hopes that you can help, bob. My scope is really limited. And from the manual, I really get no further informations.

    Thanks!!


    Originally posted in cdnusers.org by eminemshow
    • Post Points: 0
  • Fri, Nov 2 2007 12:00 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,910
    RE: How to make a iteration of all the VIAs in SOC Encounter database? Reply

    Thanks for the clarifying information. It really helps narrow the scope of the solutions we might suggest. Also, I'm glad to hear that you're in contact with your local Cadence support. I trust you're in good hands, and that the issue you've come across with sroute's via splitting capabilities will be addressed in a future release. I think I understand now what you're trying to accomplish. Before I go into a script sample using FE-TCL commands, I thought I'd mention a couple of other pieces of native functionality in case they might be useful now or in the future... First, SoC-E offers several levels of automation in terms of building up power routing. Listed from most automated to most manual, ones that come to mind are:
    1) Commands like "addStripe" and "addRing" -These commands create specific types of power structure and (optionally) create vias
    2) "sroute" -I think of sroute in terms of 2 pieces of functionality: -sroute connects power pins on instances to the power structure -and- -sroute creates so-called "m1 follow pins" on standard cell rails -sroute can (optionally) create power vias while doing either of these operations
    3) "editPowerVia" -I mention editPowerVia because sometimes users prefer to run sroute *without* letting it create vias and then use editPowerVia to go in and create them after all of the power structure has been created -I've run into cases in the past where this technique has circumvented problems with sroute's via creation
    4) "editAddVia" -editAddVia (along with "setEdit" that influences what editAddVia does) corresponds to the GUI-driven interactive wire editing capabilities in Encounter
    5) "dbCreateVia" -An FE-TCL "db" command that creates vias -dbCreateVia [shape] I mention them in this order because I think it makes sense to work from the most automated commands down to the most manual only as the need arises to have full control over an operation.

    In your situation, sroute's via splitting isn't behaving the way you'd like it to, and while that mechanism is being repaired, you could try "editPowerVia" to see if it does what you're looking for. If that doesn't work, then I agree that taking to the solution with lower-level commands is needed. Below is an example solution that would replace all of the VDD and VSS wide vias with 2 discrete instatiations of vias. I don't know the exact scenario you're faced with, but I hope (as always) that you'll be able to draw some building blocks from this example to get the desired results you're looking for:

    deselectAll
    editSelectVia -nets {VDD VSS} -cut_layers V12
    Puts "Found [dbHeadNrSel] VDD/VSS vias on between M1 and M2"
    set newViaList {}
    dbForEachHeadSelPtr [dbgHead] ptr {
      if {[dbIsStripBoxVia $ptr]} {
        set box [dbStripBoxBox $ptr]
        set net [dbStripBoxNet $ptr]
        set viaCell [lindex [dbInfoVia $ptr] 1]
        set viaLayer [dbViaCellZ $viaCell]
        if {$viaLayer == 2} {
          set y [expr ([dbBoxURY $box] + [dbBoxLLY $box])/2]
          set height [dbBoxDimY $box]
          set newViaPtr [dbCreateVia $net [dbGetViaCellByName via1] [dbDBUToMicrons [expr [dbBoxLLX $box] + [expr $height/2]]] [dbDBUToMicrons $y]]
          lappend newViaList $newViaPtr
          dbCreateVia $net [dbGetViaCellByName via1] [dbDBUToMicrons [expr [dbBoxURX $box] - [expr $height/2]]] [dbDBUToMicrons $y]
          lappend newViaList $newViaPtr
        }
      }
    }
    Puts "Deleting [dbHeadNrSel] unsplit vias."
    editDelete -selected
    Puts "Done.  Created [llength $newViaList] new split vias."


    Please do post back if you have additional questions. Your questions are very good and I hope others might benefit from detailed discussions like this one. -Bob


    Originally posted in cdnusers.org by BobD
    • Post Points: 0
  • Sat, Nov 3 2007 1:36 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,910
    RE: How to make a iteration of all the VIAs in SOC Encounter database? Reply

    Bob:

    I have carefully studied your sample script.

    I just catch 2 questions:

    1. Pls use the 'dbIsRouteVia' instead of 'dbIsStripBoxVia', since the 'dbIsStripBoxVia' command will always return value 1 in SOCE 52.
    2. ‘dbCreateVia $net [dbGetViaCellByName via1]’, how do one known the viacell 'via1' is what he or she wants, I think we should create a dumb via first use setEditVia and editAddVia, then we can get a new viaCell......then use this cell.

    I will go further on this script and find a final answer. Many thanks to your GREAT help!


    Originally posted in cdnusers.org by eminemshow
    • Post Points: 0
Page 1 of 1 (8 items)
Sort Posts:
Started by archive at 29 Oct 2007 07:45 PM. Topic has 7 replies.