• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
        • Svex-stvs
        • Svex-decomposition-methodology
        • Sv-versus-esim
        • Svex-decomp
        • Svex-compose-dfs
        • Svex-compilation
        • Moddb
        • Svmods
        • Svstmt
        • Sv-tutorial
        • Expressions
          • Rewriting
          • Svex
          • Bit-blasting
          • Functions
          • 4vmask
          • Why-infinite-width
          • Svex-vars
          • Evaluation
          • Values
            • 4vec
            • 4vec-<<=
            • 3vec
              • 3vec-fix
              • 3vec-equiv
              • 3vec-p!
              • 3vec-p
              • 3vec-fix-fast
            • 2vec
            • 2vecx
            • 2vecnatx
            • 4vec-x
            • 4vec-1x
            • 4vec-1z
            • 4vec-z
        • Symbolic-test-vector
        • Vl-to-svex
      • Fgl
      • Vwsim
      • Vl
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Values

3vec

A 3vec is a 4vec that has no Z bits.

In hardware modeling, Z bits (floating/undriven wires) are:

  1. relatively rare—for instance, an AND gate will never produce a Z value.
  2. often indistinguishable from X—for instance, if we give an undriven input to an OR gate, the hardware may interpret it as either a 0 or as a 1, so we may as well supplied an X instead.

In most of our 4vec-operations, we account for the second property by first ``unfloating'' our inputs, e.g., with 3vec-fix. But since Z values are relatively rare in the first place, this unfloating is often unnecessary. That is, in a circuit like:

(OR A (AND B C))

we can tell, statically, that we don't need to unfloat the result of the (AND B C) when computing the OR, because the AND can never produce a Z value anyway. This turns out to be a useful optimization during bit-blasting.

Subtopics

3vec-fix
Coerces an arbitrary 4vec to a 3vec by ``unfloating'' it, i.e., by turning any Zs into Xes.
3vec-equiv
Equivalence up to 3vec-fix.
3vec-p!
Recognizer for 3vec (without a 4vec-p guard).
3vec-p
Recognizer for 3vecs (with a 4vec-p guard).
3vec-fix-fast
Logically just 3vec-fix, but guarded with 3vec-p so that in the execution this is just the identity.