• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
        • Symbolic-test-vectors
        • Esim-primitives
        • E-conversion
          • Vl-ealist-p
          • Modinsts-to-eoccs
          • Vl-module-make-esim
          • Exploding-vectors
          • Resolving-multiple-drivers
          • Vl-modulelist-make-esims
          • Vl-module-check-e-ok
            • Vl-has-any-hid-netdecls
          • Vl-collect-design-wires
          • Adding-z-drivers
          • Vl-design-to-e
          • Vl-design-to-e-check-ports
          • Vl-design-to-e-main
          • Port-bit-checking
        • Esim-steps
        • Patterns
        • Mod-internal-paths
        • Defmodules
        • Esim-simplify-update-fns
        • Esim-tutorial
        • Esim-vl
      • Vl2014
      • Sv
      • Vwsim
      • Fgl
      • Vl
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Testing-utilities
    • Math
  • E-conversion

Vl-module-check-e-ok

Check for unsupported constructs.

Signature
(vl-module-check-e-ok x warnings) → (mv okp warnings)
Arguments
x — Guard (vl-module-p x).
warnings — Guard (vl-warninglist-p warnings).
Returns
okp — Type (booleanp okp).
warnings — Type (vl-warninglist-p warnings), given (force (vl-warninglist-p warnings)).

Definitions and Theorems

Function: vl-module-check-e-ok

(defun
 vl-module-check-e-ok (x warnings)
 (declare (xargs :guard (and (vl-module-p x)
                             (vl-warninglist-p warnings))))
 (let
  ((__function__ 'vl-module-check-e-ok))
  (declare (ignorable __function__))
  (b*
   (((vl-module x) x)
    (acc nil)
    (acc
      (if x.fundecls
          (cons (str::join (cons "function declarations: "
                                 (vl-fundecllist->names x.fundecls))
                           " ")
                acc)
          acc))
    (acc
     (if
        x.taskdecls
        (cons (str::join (cons "task declarations: "
                               (vl-taskdecllist->names x.taskdecls))
                         " ")
              acc)
        acc))
    (acc (if x.assigns (cons "assigns" acc) acc))
    (acc (if x.gateinsts (cons "gate instances" acc)
             acc))
    (acc (if x.alwayses (cons "always blocks" acc)
             acc))
    (acc (if (vl-has-any-hid-netdecls x.vardecls)
             (cons "hierarchical identifiers" acc)
             acc))
    (acc (if (vl-module->ifports x)
             (cons "interface ports" acc)
             acc))
    ((unless acc) (mv t warnings))
    (w
     (make-vl-warning
      :type :vl-unsupported
      :msg
      "Failing to build an E module for ~s0 because it still has ~
                 ~&1. We generally expect all constructs other than net ~
                 declarations and module instances to be simplified away by ~
                 other transforms before E module generation."
      :args (list x.name acc)
      :fatalp t
      :fn 'vl-module-check-e-ok)))
   (mv nil (cons w warnings)))))

Theorem: booleanp-of-vl-module-check-e-ok.okp

(defthm booleanp-of-vl-module-check-e-ok.okp
        (b* (((mv ?okp ?warnings)
              (vl-module-check-e-ok x warnings)))
            (booleanp okp))
        :rule-classes :type-prescription)

Theorem: vl-warninglist-p-of-vl-module-check-e-ok.warnings

(defthm vl-warninglist-p-of-vl-module-check-e-ok.warnings
        (implies (force (vl-warninglist-p warnings))
                 (b* (((mv ?okp ?warnings)
                       (vl-module-check-e-ok x warnings)))
                     (vl-warninglist-p warnings)))
        :rule-classes :rewrite)

Subtopics

Vl-has-any-hid-netdecls