4 Replies Latest reply on Jun 16, 2016 1:48 PM by jeff@viavi

    DxD Tools/Verify drc-002 rule "values" format

    Jack

      I'm trying to follow the 7.9.4 tutorial, but I don't understand the string of acceptable values in the drc-002 rules settings

      It had me change the "Values" string

      from

      ^(~?[a-zA-Z_0-9+-.]+)$

      to

      ^([a-zA-Z_0-9+-.~$]*)$

      so that the characters "~" and "$" are acceptable in net names

       

      What is the significance of removing the "?"

      What is the significance of changing the "+" to "*"

      Did the position of "~" in the string make a difference?

       

      I tried to click "HELP" from the Verify/Tools dialog, but it doesn't explain the syntax

       

      thanks,

      Jack (aka "the new guy")

       

      Here's a pic:

      drc-002.png

        • 1. Re: DxD Tools/Verify drc-002 rule "values" format
          MENTOR_Shannonk

          The second method is a little cleaner and allows partial negation of netnames in addition to the $.

          ===================================

          ^(~?[a-zA-Z_0-9+-.]+)$

          ^ is the begininig, $ is the end

          () is a capturing group

          ~? is zero or one ~ at the start of the matching string

          [a-zA-Z_0-9+-.] is the list of legal characters

          + is one or more of the characters of the legal character list

          =================================================

          ^([a-zA-Z_0-9+-.~$]*)$

          ^ is the begininig, the final $ is the end

          () is a capturing group

          [a-zA-Z_0-9+-.~$] is the list of legal characters

          * is zero or more of the characters in the legal character list

          =====================================

          1. What is the significance of removing the "?"  -- this allows for the partial negation of netnames -- net~name~fred would have the inversion bar only over name.
          2. What is the significance of changing the "+" to "*" -- one vs. zero
          3. Did the position of "~" in the string make a difference? -- see the first answer...
          1 of 1 people found this helpful
          • 2. Re: DxD Tools/Verify drc-002 rule "values" format
            Jack

            Thank You!

             

            For the record, I implied that the HELP documentation didn't explain enough,

            and then I stumbled into the "Regular Expression Syntax" area (missed it the first time)

             

            If I understand correctly,

            the "?" in the first string is just there to allow the "~" negate character at the beginning of the string?

            also, just for my own curiosity,

            How does it know that the last "-" in the list of legal characters is not a "range" symbol? (like the other two "-")

            (I'm new to regular expressions)

             

            and finally (sorry to be a burden)

            Why would the DEFAULT string NOT put the "~" in the list of legal characters?

            (If I click the "Defaults" button in Rules,it changes it back to a less useful rule?)

             

            thanks again for taking the time to respond,

            Jack

            • 3. Re: DxD Tools/Verify drc-002 rule "values" format
              MENTOR_Shannonk

              the ~? mark say 1 of these at the start or none at the start. In old versions we didn't see (maybe didn't allow?) partial negation, so only at the start made sense.

               

              The position of the last dash is what says it isn't a range character, I'm not sure where I found that info, but my notes say "don't move this or it becomes a range indicator".

               

              The defaults have changed/improved over several releases and are quite different in the VX.1.1 versions.

               

              ^(((?!((\d+\:\d+)|{.*}|[@'\\<>*,;])).)*)?$  -- you can see it is very different and uses some RE shorthand that I believe is covered in the RE section of the doc. It also has separate check for buses.

              • 4. Re: DxD Tools/Verify drc-002 rule "values" format
                jeff@viavi

                Hi Jack, I am going through all of the DRC checks right now and I agree that the help documentation could be much better.