DB access from C++: Skill functions required in pcells not found

Discussion in 'Cadence' started by Michael Ritzert, Jun 23, 2005.

  1. Hi all,

    I'm using the itkDB interface to access my layout information from C++.
    Everything works fine except when I come across a PCell that uses
    external skill functions.
    For example the PMOS from UMC requires pcExprToString. I get the
    folllowing error:

    *WARNING* Pcell evaluation for UMC_18_CMOS/P_18_MM/layout has the
    following error(s):
    *WARNING* ("eval" 0 t nil ("*Error* eval: undefined function"
    pcExprToString))
    *WARNING* Error kept in "errorDesc" property of the label
    "pcellEvalFailed" on layer/purpose "marker/error" in the submaster.

    and the cellview of the instance is empty. I can open the layout without
    any problems from icfb, so I assume that this is because I haven't
    loaded the skill library that contains the function definition.

    How do I make pcExprToString available to my program?

    Michael
     
    Michael Ritzert, Jun 23, 2005
    #1
  2. On Thu, 23 Jun 2005 16:42:04 +0200, Michael Ritzert wrote:
    This sounds interesting!
    How can you access to a cadence cdb at all using c++ ?
    Where can I start on that ?
     
    Guenther Sohler, Jun 24, 2005
    #2
  3. Michael,

    First make sure that your itkDB code calls:

    ilInitClients(&argc, argv, NULL, 0);

    after the call to dbInit().

    Any additional code that a pcell needs should get loaded via a library
    libInit.il.

    I think though if you use ilInitClients, the pcExprToString should get
    auto-loaded from the context file it's in.

    Regards,

    Andrew.
     
    Andrew Beckett, Jun 24, 2005
    #3
  4. Thank you. That did it.
    You might consider adding this hint to the itkDB reference guide. How
    can anybody do without pcells...?

    (It seems ilInit is called automatically?)

    Michael
     
    Michael Ritzert, Jun 24, 2005
    #4
  5. Search the comp.cad.cadence archives for this 1994 jewel below.
    I made some notes (e.g., CMAN is no longer an option) but this decade
    old information still stands for most of what Ian wrote below.

    From: (Ian Dobinson)
    Subject: Re: Interfacing C with SKILL
    Organization: Cadence Spectrum Services
    Date: Tue, 15 Nov 1994 16:14:57 GMT

    There are a number of things you can do, depending on the level of
    integration you require & the amount of data that needs to be passed
    back & forth.

    1) SKILL 'system' or 'csh'
    2) IPC
    3) CMAN
    4) ITK-DB

    1) You could fire off a 'system' or 'csh' call from SKILL to call C
    programs:

    This is the simplest level. The idea is to have a SKILL program
    write
    out a data file which is used by your program, then have your
    program
    read that & write an output program which the SKILL program reads
    when the system command has finished executing.

    The disadvantage is that it is reasonably slow to start a system
    command;
    & that the CIW is blocked while waiting for the system command to
    finish.

    2) You could use IPC to run your program:

    This is the SKILL inter-process communications level. This will
    allow a C
    & SKILL program to communicate through shared pipes. So, your SKILL
    process writes out strings which the C program reads & vice versa.

    The advantage is that you have better control of the C process from
    SKILL.
    You can also run this in a background (asynchronous) mode with data
    handlers. Disadvantage is that the time required to pass data is
    slow,
    & you can of course only pass strings back & forth.

    3) Use CMAN:
    NOTE: CMAN is no longer documented nor supported by Cadence!

    The Cadence Communications Manager. This is a message-based system
    for
    passing data between programs. I don't know a massive amount about
    this
    (haven't had a chance to use it much yet) but it is apparently
    faster than
    IPC, & you can pass more complex structures, but it requires more
    customization on both the C & SKILL sides.

    4) Use ITK:
    The Cadence Integrators Toolkit. You would need to speak to your
    Cadence
    AE and/or salesman about this. I am not certain of the current
    status of
    this tool. Basically, what it allows (allowed?) was for you to write
    your
    own C procedures & have them compiled in to the Cadence executables
    (icfb, cds3, opus0 etc.) The idea is that you also have a SKILL
    wrapper,
    so that your C procedure becomes callable from the SKILL level, &
    since
    it is a compiled in procedure it runs just as any C procedure would.

    The disadvantage is that you need to pay for ITK, & it requires a
    GREAT
    DEAL of effort on your part to learn the system. You also have to
    then
    distribute the new executables to all your users, & maintain
    releases of
    what you have done, including re-integration to furture Cadence
    releases.

    Hope this information helps.
    Cheers,
    Ian Dobinson,
     
    Jim Cantellini, Jun 27, 2005
    #5
  6. Jim,

    Some comments on this:

    In fact it's no longer available (and hasn't been for quite a few releases).
    Unfortunately Ian wasn't quite correct (I'll forgive him since it was 11 years
    ago). ITK doesn't allow you to link with DFII executables. It allows you to
    create a standalone executable which accesses the database from C (or C++),
    but you'd have to invoke that executable via IPC if you want to start it from
    DFII.

    You can't write a SKILL wrapper (in C) and have it linked with DFII. I don't
    recall this ever being possible (perhaps it was 11 years ago - I've only been
    with Cadence 10 years...)

    Regards,

    Andrew.
     
    Andrew Beckett, Jun 29, 2005
    #6
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.