SKILL limitations or wrong usage?

Discussion in 'Cadence' started by mm77, Jan 9, 2009.

  1. mm77

    mm77 Guest

    I have a skill script with two nested foreach loops.
    In the inner loop I run() simulations, get some results, plot to a
    window and compute some quantities from the results which are put in a
    vector.
    In the outer loop I use the output of the vector (there are actually
    four vectors), which are transformed into waveforms and plotted into
    another window

    I put a portion of the code inside a let statement and I get:
    *Error* eval: branch distance too far in the generated code

    If I put these two foreach loops in a let() statement (where those
    vectors variables are declared in the let), I get:
    *Error* eval: code size too big inside a construct (32767 max; 33341
    given)!

    Note that just commenting out one (just one!) line of code (I have 300
    with more than more than 3/5 comments) make the script work! (and the
    line is correct, just commenting out any line will work)
    What's causing those messages?
    How can solve this?
    The script is not so large. Is SKILL/OCEAN expected to work with very
    small script, or am I doing something wrong? For example all the
    variables are global (simply because it's not convenient having to
    declare all the used variable: it would much more convenient to have
    to declare global variables instead). Is that because of this?

    Thanks for any suggestion,
    Marco
     
    mm77, Jan 9, 2009
    #1
  2. mm77

    mm77 Guest

    Sorry wrong copy/paste: I get this message *without* the let wrapping
    the foreach loops.
    Marco
     
    mm77, Jan 9, 2009
    #2
  3. mm77

    layoutDesign Guest

    I have used a foreach within a foreach with no problems. I would have
    just put both inside the one let. I bet if you put both foreach inside
    the let, and double check your code, it should work fine.
     
    layoutDesign, Jan 9, 2009
    #3
  4. layoutDesign wrote, on 01/09/09 21:07:
    You've probably hit the problem described in my sourcelink solution number
    11496302. This can happen quite easily if you use the plot() function several
    times within a foreach. The plot function is actually a macro (since IC5141
    USR1) which was expanding to quite a lot of code - causing the code to end up
    being rather large, despite the fact that you had written not that much code.
    Normally this limits only gets reached in machine-generated code.

    The problem was fixed in 5.10.41.500.5.124 - it's still a macro, but much
    smaller in size, so the limit is unlikely to be reached now.

    You could use this as a workaround:

    procedure(MYplot(a) plot(a))

    and then use MYplot() instead - this would only work with a single argument call
    to plot - you might want to expand it a bit to take care of your usage. Or just
    install an ISR later than the one above. Note I think it may have just missed
    IC5141 USR6 (I've not checked, but from reading the CCR, I think that's the case).

    Regards,

    Andrew.
     
    Andrew Beckett, Jan 11, 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.