• 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
              • Vl-edgesynth-stmt-p
              • Vl-edgetable-p
              • Vl-always-edgesynth
              • Vl-edgesynth-merge-data-ifs
              • Vl-assignstmtlist->controls
              • Vl-assignstmtlist->lhses
              • Vl-assignstmtlist->rhses
              • Vl-edgesynth-flatten-data-ifs
              • Vl-edgesynth-pattern-match
              • Nedgeflop
                • Vl-make-same-bitselect-from-each
                • Vl-primitive-mkports
                • Vl-nedgeflop-ifstmt
                • Vl-make-1-bit-n-edge-flop
                • Vl-make-nedgeflop-insts
                  • Vl-nedgeflop-always
                  • Vl-nedgeflop-clkedge-assigns
                  • Vl-nedgeflop-update-sexpr
                  • Vl-nedgeflop-e-wires
                  • Vl-make-delay-assigns
                  • Vl-nedgeflop-posedge-clks
                  • Vl-nedgeflop-data-mux
                  • Vl-nedgeflop-some-edge-sexpr
                  • Vl-modinsts-add-atts
                  • Vl-nedgeflop-or-edges
                • Vl-edgesynth-make-data-inputs
                • Vl-edgesynth-make-clock-inputs
                • Vl-edgesynth-stmt-clklift
                • Vl-edgesynth-blockelim
                • Vl-alwayslist-edgesynth
                • Vl-edgesynth-create
                • Vl-edgesynth-classify-iftest
                • Vl-module-edgesynth
                • Vl-edgesynth-normalize-ifs
                • Vl-edgesynth-delays-okp
                • Vl-edgesynth-stmt-assigns
                • Vl-make-edgetable
                • Vl-edgesynth-sort-edges
                • Vl-modulelist-edgesynth
                • Vl-modulelist-edgesynth-aux
                • Vl-assignstmtlist-p
                • Vl-edgesynth-edgelist-p
                • Vl-assigncontrols-p
                • Vl-edgesynth-stmt-conditions
                • Vl-edgesynth-edge-p
                • Vl-design-edgesynth
                • Vl-edgesynth-get-delay
                • Vl-edgesynth-iftype-p
                • Edge-tables
              • Stmtrewrite
              • Cblock
              • 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
    • Nedgeflop

    Vl-make-nedgeflop-insts

    Signature
    (vl-make-nedgeflop-insts primitive q-expr d-exprs clk-exprs n) 
      → 
    insts
    Arguments
    primitive — Guard (vl-module-p primitive).
    q-expr — Guard (vl-expr-p q-expr).
    d-exprs — Guard (vl-exprlist-p d-exprs).
    clk-exprs — Guard (vl-exprlist-p clk-exprs).
    n — Initially width.
        Guard (natp n).
    Returns
    insts — Type (vl-modinstlist-p insts), given the guard.

    Definitions and Theorems

    Function: vl-make-nedgeflop-insts

    (defun vl-make-nedgeflop-insts
           (primitive q-expr d-exprs clk-exprs n)
     (declare (xargs :guard (and (vl-module-p primitive)
                                 (vl-expr-p q-expr)
                                 (vl-exprlist-p d-exprs)
                                 (vl-exprlist-p clk-exprs)
                                 (natp n))))
     (declare (xargs :guard (same-lengthp d-exprs clk-exprs)))
     (let ((__function__ 'vl-make-nedgeflop-insts))
       (declare (ignorable __function__))
       (b* (((when (zp n)) nil)
            (n (- n 1))
            (q-bit (vl-make-bitselect q-expr n))
            (d-bits (vl-make-same-bitselect-from-each d-exprs n))
            (args (cons q-bit (append d-bits clk-exprs))))
         (cons (vl-simple-instantiate primitive
                                      (hons-copy (cat "bit" (natstr n)))
                                      args)
               (vl-make-nedgeflop-insts primitive
                                        q-expr d-exprs clk-exprs n)))))

    Theorem: vl-modinstlist-p-of-vl-make-nedgeflop-insts

    (defthm vl-modinstlist-p-of-vl-make-nedgeflop-insts
      (implies (and (force (vl-module-p primitive))
                    (force (vl-expr-p q-expr))
                    (force (vl-exprlist-p d-exprs))
                    (force (vl-exprlist-p clk-exprs))
                    (force (natp n))
                    (force (same-lengthp d-exprs clk-exprs)))
               (b* ((insts (vl-make-nedgeflop-insts
                                primitive q-expr d-exprs clk-exprs n)))
                 (vl-modinstlist-p insts)))
      :rule-classes :rewrite)