Variables in Assura rule file

Discussion in 'Cadence' started by Reotaro Hashemoto, Jul 19, 2007.

  1. I want to ask a question about Assura DRC rules writing. Can variables
    be defined and assigned to certain value more than once in the same
    sequence without problems?

    Here's an example:

    A=geomAnd(B1 B2)
    B=geomAndNot(C1 A1)
    ;
    A=geomAnd(B1 B3)
    C=geomOverlap(C2 C3)
    ;
    if (! avSwitch( "Sw1" ) then
    keepLayer(B)
    )

    if( !avSwitch( "Sw2" ) then
    keepLayer(C)
    )
    ;

    How can A layer be defined twice at the same place!! Which one will be
    stored? I can't understand it. It may be error in the rule file. As I
    can basically understand, i think that variable A was overwritten and
    no longer existing!! Isn't it?

    Another question about keepLayer() , I read about it in Assura Command
    Reference and unfortunately I couldn't understand that it has an
    advantage! And can I consider the VLW as a window to display DRC
    errors in it?

    I'm originally Calibre user, and am a new user to Assura, so my
    questions may look to be very basic, but it will help me a lot if I
    got answers on them..

    Thanks and best regards,
    Ahmad.
     
    Reotaro Hashemoto, Jul 19, 2007
    #1
  2. Assura rule decks, like Diva rule decks, are SKILL scripts. The "rules"
    are actually SKILL procedures that define tasks to be executed later.

    The A in your example is a SKILL variable referring to a layer object,
    not the layer itself. When you use A you are actually using the most
    recent layer object which was assigned to A. While the compiler will
    store the variable name "A" in the layer object, the name is not used to
    find the layer object. The variable refers to the layer object directly,
    not by name.
     
    Edward Kalenda, Jul 19, 2007
    #2
  3. Thank you for your reply, but unfortunately, I couldn't understand
    what do you mean!

    In my example above, A has been overwritten (or defined again) without
    any processing on it!! Is that valid? Or it may be a mistake?

    Thanks in advance,
    Ahmad,
     
    Reotaro Hashemoto, Jul 21, 2007
    #3
  4. Reotaro Hashemoto

    S. Badel Guest

    Yes, it is valid.

    It also doesn't make too much sense, as you are pointing out, and it could be a mistake.

    Maybe A1 on line 2 was meant to be A ? Hard to tell anyway, without having the whole deck to look at.


    Stéphane
     
    S. Badel, Jul 23, 2007
    #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.