• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
          • Expression-sizing
          • Occform
          • Oprewrite
          • Expand-functions
          • Delayredux
          • Unparameterization
          • Caseelim
          • Split
          • Selresolve
          • Weirdint-elim
          • Vl-delta
          • Replicate-insts
          • Rangeresolve
          • Propagate
          • Clean-selects
          • Clean-params
          • Blankargs
          • Inline-mods
          • Expr-simp
          • Trunc
          • Always-top
            • Edgesynth
            • Stmtrewrite
            • Cblock
              • Vl-stmt-cblock-p
              • Cblock-path-checking
                • Vl-modulelist-combinational-elim
                • Vl-always-check-cblock
                • Vl-filter-cblocks
                • Vl-check-sensitivity-list
                • Vl-atomicstmt-cblock-varexpr
                • Vl-cblock-synth
                • Vl-cblock-make-assign
                • Vl-module-combinational-elim
                  • Vl-cblocks-synth
                  • Vl-cblock-make-assigns
                  • Vl-cblock-pathcheck
                  • Vl-atomicstmt-cblock-pathcheck1
                  • Vl-stmt-cblock-varexpr
                  • Vl-design-combinational-elim
                  • Vl-stmtlist-cblock-pathcheck1
                  • Vl-stmt-cblock-pathcheck1
                • Cblock-expression-building
                • Vl-stmt-cblock-lvalexprs
                • Vl-stmt-cblock-rvalexprs
                • Vl-classic-control->exprs
                • Vl-classic-control-p
                • Vl-star-control-p
              • Vl-always-convert-regports
              • Vl-always-convert-regs
              • Stmttemps
              • Edgesplit
              • Vl-always-check-reg
              • Vl-convert-regs
              • Latchsynth
              • Vl-always-check-regs
              • Vl-match-always-at-some-edges
              • Unelse
              • Vl-always-convert-reg
              • Vl-design-always-backend
              • Vl-stmt-guts
              • Vl-always-convert-regport
              • Vl-always-scary-regs
              • Eliminitial
              • Ifmerge
              • Vl-edge-control-p
              • Elimalways
            • Gatesplit
            • Gate-elim
            • Expression-optimization
            • Elim-supplies
            • Wildelim
            • Drop-blankports
            • Clean-warnings
            • Addinstnames
            • Custom-transform-hooks
            • Annotate
            • Latchcode
            • Elim-unused-vars
            • Problem-modules
          • Lint
          • Mlib
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Cblock-path-checking

    Vl-module-combinational-elim

    Signature
    (vl-module-combinational-elim x) → new-x
    Arguments
    x — Guard (vl-module-p x).
    Returns
    new-x — Type (vl-module-p new-x), given the guard.

    Definitions and Theorems

    Function: vl-module-combinational-elim

    (defun vl-module-combinational-elim (x)
     (declare (xargs :guard (vl-module-p x)))
     (let ((__function__ 'vl-module-combinational-elim))
      (declare (ignorable __function__))
      (b*
       (((vl-module x) x)
        ((when (vl-module->hands-offp x)) x)
        ((unless x.alwayses) x)
        ((when x.initials)
         (b*
          ((w
            (make-vl-warning
             :type :vl-programming-error
             :msg
             "Trying to eliminate combinational always blocks, but ~
                           the module still has initial blocks?  You should have ~
                           run eliminitial first."
             :args nil
             :fatalp nil
             :fn __function__)))
          (change-vl-module x
                            :warnings (cons w x.warnings))))
        (warnings x.warnings)
        (scary (vl-always-scary-regs x.alwayses))
        ((mv cblocks ?others warnings)
         (vl-filter-cblocks x.alwayses x.vardecls scary warnings))
        ((unless cblocks)
         (change-vl-module x :warnings warnings))
        (delta (vl-starting-delta x))
        (delta (change-vl-delta delta
                                :assigns x.assigns))
        ((mv delta cvtregs)
         (vl-cblocks-synth cblocks x.vardecls delta))
        ((vl-delta delta) delta)
        ((mv fixed-vardecls fixed-portdecls)
         (vl-convert-regs cvtregs x.vardecls x.portdecls))
        (final-vardecls
             (append-without-guard fixed-vardecls delta.vardecls))
        ((unless (uniquep (vl-vardecllist->names final-vardecls)))
         (raise
            "Name clash when converting combinational blocks!  ~x0."
            (duplicated-members (vl-vardecllist->names final-vardecls)))
         x)
        (new-x (change-vl-module x
                                 :alwayses others
                                 :vardecls final-vardecls
                                 :portdecls fixed-portdecls
                                 :assigns delta.assigns
                                 :warnings delta.warnings)))
       new-x)))

    Theorem: vl-module-p-of-vl-module-combinational-elim

    (defthm vl-module-p-of-vl-module-combinational-elim
      (implies (and (force (vl-module-p x)))
               (b* ((new-x (vl-module-combinational-elim x)))
                 (vl-module-p new-x)))
      :rule-classes :rewrite)