Home > Community > Forums > Custom IC SKILL > Problem with running a c program via Cadence

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

 Problem with running a c program via Cadence 

Last post Thu, Oct 16 2008 7:26 AM by useratcad. 2 replies.
Started by useratcad 16 Oct 2008 01:55 AM. Topic has 2 replies and 2175 views
Page 1 of 1 (3 items)
Sort Posts:
  • Thu, Oct 16 2008 1:55 AM

    • useratcad
    • Not Ranked
    • Joined on Thu, Oct 16 2008
    • Posts 15
    • Points 195
    Problem with running a c program via Cadence Reply

    Hello,

    I'm trying to run a program located at ~/src/prog/myprog written in Cpp.

    But when I want to start it with
    ipcBeginProcess("~/src/prog/myprog") it won't work.

    Cadence says:
    sh: ~/src/prog/myprog: not found

    What is the problem here?

    A complete path will work, but I need the short one, like above.

    And another question: What is the best way to run commands? Via ipcBeginProcess, sh or internal functions like (CreateDir. DeleteDir, ...)
    ipcBeginProcess("mkdir -p test")

    CreateDir ("test")

    sh("mkdir -p test")

     

    Thanks Tim 

    • Post Points: 20
  • Thu, Oct 16 2008 6:59 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,587
    • Points 15,915
    Re: Problem with running a c program via Cadence Reply

     Hi Tim,

    You can use "simplifyFilename()" to expand a file name to a fully qualified path, for example:

     

    ipcBeginProcess(simplifyFilename("~/src/prog/myprog"))

    For your question about which is best, it really depends on what you need to do; if bi-directional communication is required between DFII and the external program, then use the ipc* functions, but if you just need to fire off an external command and don't need any further interaction with it, use one of the csh(), sh(), shell() or system() commands.

    Hope this answers your questions!

    Regards,

    Lawrence.

     

    Filed under:
    • Post Points: 20
  • Thu, Oct 16 2008 7:26 AM

    • useratcad
    • Not Ranked
    • Joined on Thu, Oct 16 2008
    • Posts 15
    • Points 195
    Re: Problem with running a c program via Cadence Reply

    great! Thanks for the reply. That helped a lot! 

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by useratcad at 16 Oct 2008 01:55 AM. Topic has 2 replies.