• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • 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-nedgeflop-some-edge-sexpr

    Build a 4v-sexpr that captures when any clock has just had a posedge.

    Signature
    (vl-nedgeflop-some-edge-sexpr clks clk-prevs) → 4v-sexpr
    Arguments
    clks — E wire names for current clock values.
    clk-prevs — E wire names for previous clock values.

    The idea here is to build an expression like:

    (or (and clk1 (not clk1-prev))  ;; first clk had a posedge
        (and clk2 (not clk2-prev))  ;; second clk had a posedge
        ...)

    This is the expression that will trigger an update of the flop.

    Definitions and Theorems

    Function: vl-nedgeflop-some-edge-sexpr

    (defun vl-nedgeflop-some-edge-sexpr (clks clk-prevs)
     (declare (xargs :guard (and (consp clks)
                                 (same-lengthp clks clk-prevs))))
     (let ((__function__ 'vl-nedgeflop-some-edge-sexpr))
      (declare (ignorable __function__))
      (b* (((cons clk1 rest-clks) clks)
           ((cons clk1-prev rest-clk-prevs)
            clk-prevs)
           (edge1 (acl2::4vs-and clk1 (acl2::4vs-not clk1-prev)))
           ((when (atom rest-clks)) edge1))
        (acl2::4vs-or
             edge1
             (vl-nedgeflop-some-edge-sexpr rest-clks rest-clk-prevs)))))