• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Vwsim
      • Fgl
      • Vl
        • Syntax
        • Loader
        • Warnings
        • Getting-started
        • Utilities
        • Printer
        • Kit
        • Mlib
        • Transforms
          • Unparameterization
          • Elaborate
          • Addnames
          • Annotate
            • Increment-elim
            • Make-implicit-wires
            • Basic-bind-elim
            • Argresolve
            • Basicsanity
            • Portdecl-sign
            • Enum-names
            • Port-resolve
              • Vl-modulelist-resolve-nonansi-interfaceports
              • Vl-interfacelist-resolve-nonansi-interfaceports
              • Vl-ansi-portdecl-resolve
              • Vl-interfacelist-resolve-ansi-portdecls
              • Vl-modulelist-resolve-ansi-portdecls
              • Vl-ansi-portdecl-to-regularport
              • Vl-ansi-portdecl-to-regularport-from-previous-regularport
              • Vl-resolve-ansi-portdecls
              • Vl-nettype-for-parsed-ansi-port
              • Vl-loaditems-remove-interfaceport-decls
              • Vl-vardecl-is-really-interfaceport
              • Vl-name-is-interface-or-type
              • Vl-interface/type-warn-about-unexpected-lookup
              • Vl-interface-resolve-nonansi-interfaceports
              • Vl-module-resolve-nonansi-interfaceports
              • Vl-interface-resolve-ansi-portdecls
              • Vl-ports-resolve-interfaces
              • Vl-module-resolve-ansi-portdecls
              • Vl-ansi-portdecl-consistency-check
                • Vl-design-resolve-nonansi-interfaceports
                • Vl-ansi-portdecl-to-interfaceport
                • Vl-ansi-portdecl-regularport-type
                • Vl-design-resolve-ansi-portdecls
              • Udp-elim
              • Vl-annotate-design
              • Vl-annotate-module
            • Clean-warnings
            • Eliminitial
            • Custom-transform-hooks
            • Problem-modules
        • Svl
        • X86isa
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Port-resolve

    Vl-ansi-portdecl-consistency-check

    Signature
    (vl-ansi-portdecl-consistency-check x) → warnings
    Arguments
    x — Guard (vl-ansi-portdecl-p x).
    Returns
    warnings — Type (vl-warninglist-p warnings).

    Definitions and Theorems

    Function: vl-ansi-portdecl-consistency-check

    (defun vl-ansi-portdecl-consistency-check (x)
     (declare (xargs :guard (vl-ansi-portdecl-p x)))
     (let ((__function__ 'vl-ansi-portdecl-consistency-check))
      (declare (ignorable __function__))
      (b*
       (((vl-ansi-portdecl x)
         (vl-ansi-portdecl-fix x))
        (warnings nil)
        (warnings
         (if
          (and x.typename
               (or x.type x.signedness x.pdims))
          (warn
           :type :vl-ansi-portdecl-programming-error
           :msg
           "~a0: If there is a typename there shouldn't ~
                                     be type, signedness, or pdims."
           :args (list x))
          warnings))
        (warnings
         (if
          (and x.type (or x.signedness x.pdims))
          (warn
           :type :vl-ansi-portdecl-programming-error
           :msg
           "~a0: If there is an explicit datatype there ~
                                     shouldn't be signedness or pdims."
           :args (list x))
          warnings))
        (warnings
         (if
          (and x.modport (not x.typename))
          (warn
           :type :vl-ansi-portdecl-programming-error
           :msg
           "~a0: If there is a modport there should be a ~
                                     typename."
           :args (list x))
          warnings))
        (warnings
         (if
          (and x.modport (or x.varp x.dir x.nettype))
          (warn
           :type :vl-ansi-portdecl-programming-error
           :msg
           "~a0: If there is a modport there shouldn't ~
                                     be a direction or nettype or the var keyword."
           :args (list x))
          warnings)))
       warnings)))

    Theorem: vl-warninglist-p-of-vl-ansi-portdecl-consistency-check

    (defthm vl-warninglist-p-of-vl-ansi-portdecl-consistency-check
      (b* ((warnings (vl-ansi-portdecl-consistency-check x)))
        (vl-warninglist-p warnings))
      :rule-classes :rewrite)

    Theorem: vl-ansi-portdecl-consistency-check-of-vl-ansi-portdecl-fix-x

    (defthm vl-ansi-portdecl-consistency-check-of-vl-ansi-portdecl-fix-x
      (equal
           (vl-ansi-portdecl-consistency-check (vl-ansi-portdecl-fix x))
           (vl-ansi-portdecl-consistency-check x)))

    Theorem: vl-ansi-portdecl-consistency-check-vl-ansi-portdecl-equiv-congruence-on-x

    (defthm
     vl-ansi-portdecl-consistency-check-vl-ansi-portdecl-equiv-congruence-on-x
     (implies (vl-ansi-portdecl-equiv x x-equiv)
              (equal (vl-ansi-portdecl-consistency-check x)
                     (vl-ansi-portdecl-consistency-check x-equiv)))
     :rule-classes :congruence)