• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
        • Svex-stvs
          • Svtv-data
          • Defsvtv$
          • Svtv-run
          • Defsvtv-phasewise
          • Svtv
          • Svtv-spec
          • Defsvtv
          • Process.lisp
          • Svtv-doc
          • Svtv-chase$
          • Svtv-versus-stv
          • Svtv-debug-fsm
          • Structure.lisp
          • Svtv-debug
            • Vcd.lisp
              • Elab-mod->vcd-wires
              • Vcd-scope
              • Vcd-wire
              • Vcd-print-4vec-aux
                • Vcd-dump-delta
                • Vcd-wirelist-add-to-wiremap
                • Vcd-print-header
                • Vcd-dump-first-snapshot-aux
                • Vcd-dump-delta-aux
                • Vcd-wiremap
                • 4vecarr
                • Vcd-print-wiredecls
                • Vcd-4vec-bitstr
                • Vcd-index->codechars
                • Vcd-wire->width
                • Vcd-index->codestr
                • Vcd-dump-first-snapshot
                • Vcd-wirelist
              • Debug.lisp
            • Def-pipeline-thm
            • Expand.lisp
            • Def-cycle-thm
            • Svtv-utilities
            • Svtv-debug$
            • Defsvtv$-phasewise
          • Svex-decomposition-methodology
          • Sv-versus-esim
          • Svex-decomp
          • Svex-compose-dfs
          • Svex-compilation
          • Moddb
          • Svmods
          • Svstmt
          • Sv-tutorial
          • Expressions
          • Symbolic-test-vector
          • Vl-to-svex
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vcd.lisp

    Vcd-print-4vec-aux

    Signature
    (vcd-print-4vec-aux upper lower firstbit p) → p1
    Arguments
    upper — Guard (integerp upper).
    lower — Guard (integerp lower).
    firstbit — Guard (natp firstbit).
    p — Guard (vl-printedlist-p p).
    Returns
    p1 — Type (vl-printedlist-p p1).

    Definitions and Theorems

    Function: vcd-print-4vec-aux

    (defun vcd-print-4vec-aux (upper lower firstbit p)
      (declare (xargs :guard (and (integerp upper)
                                  (integerp lower)
                                  (natp firstbit)
                                  (vl-printedlist-p p))))
      (let ((__function__ 'vcd-print-4vec-aux))
        (declare (ignorable __function__))
        (b* (((when (zp firstbit))
              (vl::vl-printedlist-fix p))
             (firstbit (1- firstbit))
             (ubit (logbitp firstbit upper))
             (lbit (logbitp firstbit lower))
             (char (if ubit (if lbit #\1 #\x)
                     (if lbit #\z #\0))))
          (vcd-print-4vec-aux upper lower firstbit (cons char p)))))

    Theorem: vl-printedlist-p-of-vcd-print-4vec-aux

    (defthm vl-printedlist-p-of-vcd-print-4vec-aux
      (b* ((p1 (vcd-print-4vec-aux upper lower firstbit p)))
        (vl-printedlist-p p1))
      :rule-classes :rewrite)

    Theorem: vcd-print-4vec-aux-of-ifix-upper

    (defthm vcd-print-4vec-aux-of-ifix-upper
      (equal (vcd-print-4vec-aux (ifix upper)
                                 lower firstbit p)
             (vcd-print-4vec-aux upper lower firstbit p)))

    Theorem: vcd-print-4vec-aux-int-equiv-congruence-on-upper

    (defthm vcd-print-4vec-aux-int-equiv-congruence-on-upper
     (implies (int-equiv upper upper-equiv)
              (equal (vcd-print-4vec-aux upper lower firstbit p)
                     (vcd-print-4vec-aux upper-equiv lower firstbit p)))
     :rule-classes :congruence)

    Theorem: vcd-print-4vec-aux-of-ifix-lower

    (defthm vcd-print-4vec-aux-of-ifix-lower
      (equal (vcd-print-4vec-aux upper (ifix lower)
                                 firstbit p)
             (vcd-print-4vec-aux upper lower firstbit p)))

    Theorem: vcd-print-4vec-aux-int-equiv-congruence-on-lower

    (defthm vcd-print-4vec-aux-int-equiv-congruence-on-lower
     (implies (int-equiv lower lower-equiv)
              (equal (vcd-print-4vec-aux upper lower firstbit p)
                     (vcd-print-4vec-aux upper lower-equiv firstbit p)))
     :rule-classes :congruence)

    Theorem: vcd-print-4vec-aux-of-nfix-firstbit

    (defthm vcd-print-4vec-aux-of-nfix-firstbit
      (equal (vcd-print-4vec-aux upper lower (nfix firstbit)
                                 p)
             (vcd-print-4vec-aux upper lower firstbit p)))

    Theorem: vcd-print-4vec-aux-nat-equiv-congruence-on-firstbit

    (defthm vcd-print-4vec-aux-nat-equiv-congruence-on-firstbit
     (implies (nat-equiv firstbit firstbit-equiv)
              (equal (vcd-print-4vec-aux upper lower firstbit p)
                     (vcd-print-4vec-aux upper lower firstbit-equiv p)))
     :rule-classes :congruence)