How to pass skill vars to shell

Discussion in 'Cadence' started by piyush_dun, Feb 10, 2011.

  1. piyush_dun

    piyush_dun Guest

    I am writing a skill code in which I am defining some variables

    ; skill var definitions
    defvar(cell_name myMaster~>cell~>name)
    defvar(cell_lib myMaster~>lib~>name)
    defvar(cell_view "schematic")


    Now, I want to pass the variable to a shell command
    sh("icmp4 filelog cell_lib/cell_name/cell_view/sch.cdb")

    The question is ----> How to make shell recognize the skill variable.

    Is there a way to export skill vars to shell env ?
    I searched the posts found some reference to sprintf But its not clear
    how.
    Also, is it possible to do it by writing-to & reading-from a file?


    In case you guys have some idea, Pl. let me know how to do so.


    Thanks & Regards
    -Piyush
     
    piyush_dun, Feb 10, 2011
    #1
  2. piyush_dun

    piyush_dun Guest


    :: Found following workaround(sprintf) ::

    ~~~~~~~~~~~~~
    sh("touch ./rev.log")

    sprintf(cmd "icmp4 filelog %s/%s/%s/sch.cdb >> ./rev.log"
    cell_lib,cell_name,cell_view)
    println(cmd)
    sh(cmd)
    ~~~~~~~~~~~~~

    So issue is resolved



    * This question thread may be closed
     
    piyush_dun, Feb 10, 2011
    #2
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.