• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • 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
          • Def-pipeline-thm
          • Expand.lisp
          • Def-cycle-thm
          • Svtv-utilities
            • Svtv->out-width
            • Svtv->in-width
              • Stv->in-width
            • Svtv->vars
            • Svtv->outs
            • Svtv->ins
          • 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
  • Svtv-utilities

Svtv->in-width

Given an input name and an SVTV, get the width of the part that is used.

Signature
(svtv->in-width name svtv) → width
Arguments
svtv — Guard (svtv-p svtv).
Returns
width — Type (natp width).

Definitions and Theorems

Function: svtv->in-width

(defun svtv->in-width (name svtv)
  (declare (xargs :guard (svtv-p svtv)))
  (let ((__function__ 'svtv->in-width))
    (declare (ignorable __function__))
    (b* ((look (hons-assoc-equal name (svtv->inmasks svtv)))
         ((unless look)
          (raise "Unknown input: ~x0~%" name)
          0))
      (integer-length (nfix (cdr look))))))

Theorem: natp-of-svtv->in-width

(defthm natp-of-svtv->in-width
  (b* ((width (svtv->in-width name svtv)))
    (natp width))
  :rule-classes :type-prescription)

Theorem: svtv->in-width-of-svtv-fix-svtv

(defthm svtv->in-width-of-svtv-fix-svtv
  (equal (svtv->in-width name (svtv-fix svtv))
         (svtv->in-width name svtv)))

Theorem: svtv->in-width-svtv-equiv-congruence-on-svtv

(defthm svtv->in-width-svtv-equiv-congruence-on-svtv
  (implies (svtv-equiv svtv svtv-equiv)
           (equal (svtv->in-width name svtv)
                  (svtv->in-width name svtv-equiv)))
  :rule-classes :congruence)

Subtopics

Stv->in-width
Same as svtv->in-width.