• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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-res-sigma-p
            • Vl-res-rewrite-occs
            • Vl-add-res-modules
            • Vl-make-res-occs
              • Vl-make-n-bit-res-module
              • Vl-make-res-sexpr
              • Vl-make-res-occ
          • Vl-modulelist-make-esims
          • Vl-module-check-e-ok
          • 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
      • Fgl
      • Vwsim
      • Vl
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Resolving-multiple-drivers

Vl-make-res-occs

Convert the vl-res-sigma-p database into a list of E occurrences to drive each multiply driven wire.

(vl-make-res-occs idx sigma) takes idx, an index for fresh name generation, and sigma, which should be the already shrunk vl-res-sigma-p obtained from vl-res-rewrite-occs. Recall that the alist binds, e.g.,

W --> (W_1 W_2 ... W_n)

Where W was the name of some original, multiply-driven wire, and W_1, dots are the freshly generated names that are now being driven instead of W. The idea is to build a new occurrence that drives W to the resolution of W1...Wn, for each such W.

Definitions and Theorems

Function: vl-make-res-occs

(defun vl-make-res-occs (idx sigma)
  "Returns (MV OCCS IDX')"
  (declare (xargs :guard (and (natp idx)
                              (vl-res-sigma-p sigma))))
  (b* ((idx (lnfix idx))
       ((when (atom sigma)) (mv nil idx))
       (out1 (caar sigma))
       (ins1 (cdar sigma))
       (idx (+ 1 idx))
       (fresh (make-vl-emodwire :basename "vl_res"
                                :index idx))
       ((unless (and (true-listp ins1) (uniquep ins1)))
        (er hard? 'vl-make-res-occs
            "Failed to generate unique drivers!")
        (mv nil idx))
       (occ1 (vl-make-res-occ fresh out1 ins1))
       ((mv rest idx)
        (vl-make-res-occs idx (cdr sigma))))
    (mv (cons occ1 rest) idx)))

Theorem: vl-make-res-occs-mvtypes-0

(defthm vl-make-res-occs-mvtypes-0
  (true-listp (mv-nth 0 (vl-make-res-occs idx sigma)))
  :rule-classes :type-prescription)

Theorem: vl-make-res-occs-mvtypes-1

(defthm vl-make-res-occs-mvtypes-1
  (natp (mv-nth 1 (vl-make-res-occs idx sigma)))
  :rule-classes :type-prescription)

Theorem: good-esim-occsp-of-vl-make-res-occs

(defthm good-esim-occsp-of-vl-make-res-occs
  (implies
       (and (force (natp idx))
            (force (vl-res-sigma-p sigma)))
       (good-esim-occsp (mv-nth 0 (vl-make-res-occs idx sigma)))))

Subtopics

Vl-make-n-bit-res-module
Make an E module to resolve together N inputs into a single output.
Vl-make-res-sexpr
Generate a ACL2::4v-res expression to resolve a list of emodwires.
Vl-make-res-occ
Generate and instantiate an appropriate resolution module to drive a wire to multiple values.