reg inclusion of "loadi" command in code

Discussion in 'Cadence' started by noreply, Jul 8, 2009.

  1. noreply

    noreply Guest

    Dear all ,
    I want to call a procedure in my code. The procedure is around 300
    lines.
    Hence i wrote the following line inside my file:
    loadi "~/mycode.il";where "mycode.il" is the file that contains the
    procedure
    .........
    ......
    Is this a correct way of loading a procedure or is there some
    efficient way of doing it.

    Thanks and regards,
    Lokesh rajendran
     
    noreply, Jul 8, 2009
    #1
  2. noreply

    Riad KACED Guest

    Hi Lokesh,

    A 300-lines code is nothing. Leaving that procedure in your main file
    wont be harmful. Having said that, if your procedure is a kind of
    generic procedure that might be used elswhere then it's a good idea to
    put aside.
    Also, please bear in mind the difference between the Skill functions
    'load' and 'loadi'. 'loadi' is Identical to 'load', except that loadi
    ignores errors encountered during the load, prints an error message,
    and then continues loading.

    Cheers,
    Riad.
     
    Riad KACED, Jul 8, 2009
    #2
  3. Riad KACED wrote, on 07/08/09 08:21:
    Personally I think that loadi should rarely be used - because you can end up
    masking real errors which are important. Better to fix the errors than load them
    ignoring errors...

    Also, are you talking about procedures (as defined with procedure(), or defun()
    or similar)? Or are you just putting all your code in flat "scripts"?

    The best solution is to define procedures (or functions - they're the same thing
    in SKILL), and then these get byte-code compiled and you can then call them by
    name rather than having to continually load files to execute things.

    Read the SKILL Language User Guide - it's a very good place to start, as it
    covers the structure of the language, as well as efficient ways to do things.

    Regards,

    Andrew.
     
    Andrew Beckett, Jul 8, 2009
    #3
  4. noreply

    noreply Guest

    Hi andrew ,
    I at last ended up doing as you have suggested.(And also i will keep
    in my mind not to use "loadi" in my code here afterwards)
    Regards,
    Lokesh rajendran
     
    noreply, Jul 9, 2009
    #4
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.