Home > Community > Forums > Custom IC SKILL > skill function to create config view automatically with a specified template

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: *

 skill function to create config view automatically with a specified template 

Last post Tue, Jun 18 2013 2:29 PM by Andrew Beckett. 5 replies.
Started by teapot 13 Jun 2013 10:43 AM. Topic has 5 replies and 1121 views
Page 1 of 1 (6 items)
Sort Posts:
  • Thu, Jun 13 2013 10:43 AM

    • teapot
    • Not Ranked
    • Joined on Thu, Jun 13 2013
    • Posts 6
    • Points 90
    skill function to create config view automatically with a specified template Reply

    Hello experts

    i am wondering if you have a skill function to create a config view automatically with a specified template .. also, i want it to set a particular cell/instance to a specfied view and change the inherited view list for that cell/instance. this is for OA OSS flow

    i did a search found a relevant post/procedure CCSCreateConfigWithSpectreTemplate. i tried it, however, the template pops up is empty .. so not sure if that one actually works or i did something wrong

     i am new to skill, would really appreciate your advices on this

     thank you so much

    tea

    • Post Points: 20
  • Thu, Jun 13 2013 11:57 AM

    Re: skill function to create config view automatically with a specified template Reply

    That solution seems an excessively complicated way of doing it (I'll suggest this to the original author). It has too much dependency on the user interface.

    Here's a simpler approach, using the procedural API to interface with config views. It's not strictly building from a template, but I've given the ability to specify the libList, viewList and stopList via keyword arguments:

    procedure(CCFcreateConfigView(lib cell view topView @key
        (viewList "spectre cmos_sch cmos.sch schematic veriloga ahdl")
        (stopList "spectre")
        libList
        "ttttggg"
        )
        let((hdb)
            hdb=hdbOpen(lib cell view "w")
            unless(hdb error("Could not open %s/%s/%s for write\n" lib cell view))
            hdbSetTopCellViewName(hdb lib cell topView)
            when(stringp(libList)
                hdbSetDefaultLibListString(hdb libList)
            )
            when(stringp(viewList)
                hdbSetDefaultViewListString(hdb viewList)
            )
            when(stringp(stopList)
                hdbSetDefaultStopListString(hdb stopList)
            )
            hdbSave(hdb)
            hdbClose(hdb)
            t
        )
    )

     

    You can then call:

    CCFcreateConfigView("mylib" "mycell" "config" "schematic")

    or 

    ; create using the same options as the "AMS" config template, but with a libList specified as
    ; well
    CCFcreateConfigView("mylib" "mycell" "config_ams" "schematic" ?viewList "spectre spice verilog verilogams behavioral functional systemverilog schematic veriloga vhdl vhdlams wreal" ?stopList "spectre" ?libList "sample")

    The assumption in the code is that the lib and cell of the top cell are the same as the lib and cell of the config view; the third arg specifies the config view name and the fourth arg the name of the view for the top cellView.

    Hopefully this will do the job for you, and is cleaner.

    Regards,

    Andrew.

     

    • Post Points: 20
  • Thu, Jun 13 2013 2:28 PM

    • teapot
    • Not Ranked
    • Joined on Thu, Jun 13 2013
    • Posts 6
    • Points 90
    Re: skill function to create config view automatically with a specified template Reply

    thanks Andrew. reallly appreciate it

    i tried, it works. .Great thanks!.  if you don't mind may i ask how to specify inherited view list for a particular cell/instance please?  i want to add it to the procedure

    we would like to be able to specify template if possible .. since we have different templates .. if you or anyone else get a chance, would you please give me some suggestions on that too?

    thanks again. good day

    tea

    • Post Points: 20
  • Fri, Jun 14 2013 1:52 AM

    Re: skill function to create config view automatically with a specified template Reply

    Tea,

    To add an inherited viewList, you can use the SKILL function hdbSetObjBindRule() to do this (see the documentation in cdnshelp for details on how to use this) - you could call this within the function.

    If you really want to start from a template, you could find the path to the template using:

    templateName="spectre"
    pathToTemplate=ddGetStartup(strcat("hierEditor/templates/ templateName))

    and then copy the file (maybe by reading it and writing it, or maybe by using sh("cp ...") from the template into the expand.cfg of the config view you're creating - would need a bit of thought to do it cleanly (you could open the config for "w" to write it, save and close, copy the file in, and then open again in "a" to set the top cellView and inherited view lists and so on). You could then use ddGetObj(lib cell view "expand.cfg")->readPath to get the path to the destination file for the copy.

    Hopefully that will give you enough to be getting on with (sorry I'm short of time to write it for you).

    Kind Regards,

    Andrew.

    • Post Points: 20
  • Tue, Jun 18 2013 10:49 AM

    • teapot
    • Not Ranked
    • Joined on Thu, Jun 13 2013
    • Posts 6
    • Points 90
    Re: skill function to create config view automatically with a specified template Reply

    thanks again Andrew for your kind help

    i browsed through the hdb related functions in Virtuoso Skill manual, it seems this hdbSetObjBindRule only set lib binding/cell binding/view binding/instance binding .. it seems i can not set inherited view list binding or define a rule for it with this function .. i also looked though other functions, have not found one that actually does inherited view list binding

    you mean, i can only modify expand.cfg to achieve that, right? i am proceeding to take this route

    thanks agian so much. good day

    tea

    • Post Points: 20
  • Tue, Jun 18 2013 2:29 PM

    Re: skill function to create config view automatically with a specified template Reply

    Tea,

    with that function you can also set a view list or lib list - which is the "inherited" view or lib list - for a cell, instance or occurrence.

    So you definitely do not need to copy an expand.cfg to do that. I was only suggesting that if you really wanted to start from a real template file, rather than just specifying the same global view or stop or lib list that's in the template to a function similar to the one I showed above.

    Regards,

    Andrew 

    • Post Points: 5
Page 1 of 1 (6 items)
Sort Posts:
Started by teapot at 13 Jun 2013 10:43 AM. Topic has 5 replies.