• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • 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
            • Vl-wirealist-p
              • Vl-msb-expr-bitlist
                • Vl-msb-partselect-bitlist
                • Vl-msb-bitselect-bitlist
                • Vl-msb-constint-bitlist
                • Vl-msb-wire-bitlist
                • Vl-msb-replicate-bitlist
                • Vl-msb-exprlist-bitlist
              • Vl-plain-wire-name
              • Vl-module-wirealist
              • Vl-emodwires-from-high-to-low
              • Vl-vardecl-msb-emodwires
              • Vl-vardecllist-to-wirealist
              • Vl-emodwires-from-msb-to-lsb
              • Vl-verilogify-emodwirelist
            • Emodwire-encoding
            • Vl-emodwire-p
            • Vl-emodwirelistlist
            • Vl-emodwirelist
          • Resolving-multiple-drivers
          • 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
      • Vwsim
      • Fgl
      • Vl
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Testing-utilities
    • Math
  • Vl-wirealist-p

Vl-msb-expr-bitlist

Produce the E-language, MSB-ordered list of bits for an expression.

Signature
(vl-msb-expr-bitlist x walist warnings) 
  → 
(mv successp warnings bits)
Arguments
x — Guard (vl-expr-p x).
walist — Guard (vl-wirealist-p walist).
warnings — Guard (vl-warninglist-p warnings).
Returns
successp — Type (booleanp successp).
warnings — Type (vl-warninglist-p warnings).
bits — Type (vl-emodwirelist-p bits).

When we translate module and gate instances into E, the arguments of the instance are Verilog expressions, and we need to convert them into E-language patterns. By the end of our simplification process, we think that each such expression should contain only:

  • Constant integers
  • Weird integers
  • Bit selects
  • Part selects
  • Concatenations
  • Replications (multiconcats)

This routine is intended to convert arbitrary expressions that include only the above forms into a list of MSB order bits.

Theorem: return-type-of-vl-msb-expr-bitlist.successp

(defthm return-type-of-vl-msb-expr-bitlist.successp
        (b* (((mv ?successp ?warnings ?bits)
              (vl-msb-expr-bitlist x walist warnings)))
            (booleanp successp))
        :rule-classes :type-prescription)

Theorem: return-type-of-vl-msb-expr-bitlist.warnings

(defthm return-type-of-vl-msb-expr-bitlist.warnings
        (b* (((mv ?successp ?warnings ?bits)
              (vl-msb-expr-bitlist x walist warnings)))
            (vl-warninglist-p warnings))
        :rule-classes :rewrite)

Theorem: return-type-of-vl-msb-expr-bitlist.bits

(defthm return-type-of-vl-msb-expr-bitlist.bits
        (b* (((mv ?successp ?warnings ?bits)
              (vl-msb-expr-bitlist x walist warnings)))
            (vl-emodwirelist-p bits))
        :rule-classes :rewrite)

Theorem: return-type-of-vl-msb-exprlist-bitlist.successp

(defthm return-type-of-vl-msb-exprlist-bitlist.successp
        (b* (((mv ?successp ?warnings ?bits)
              (vl-msb-exprlist-bitlist x walist warnings)))
            (booleanp successp))
        :rule-classes :type-prescription)

Theorem: return-type-of-vl-msb-exprlist-bitlist.warnings

(defthm return-type-of-vl-msb-exprlist-bitlist.warnings
        (b* (((mv ?successp ?warnings ?bits)
              (vl-msb-exprlist-bitlist x walist warnings)))
            (vl-warninglist-p warnings))
        :rule-classes :rewrite)

Theorem: return-type-of-vl-msb-exprlist-bitlist.bits

(defthm return-type-of-vl-msb-exprlist-bitlist.bits
        (b* (((mv ?successp ?warnings ?bits)
              (vl-msb-exprlist-bitlist x walist warnings)))
            (vl-emodwirelist-p bits))
        :rule-classes :rewrite)

Theorem: true-listp-of-vl-msb-expr-bitlist-2

(defthm
     true-listp-of-vl-msb-expr-bitlist-2
     (true-listp (mv-nth 2
                         (vl-msb-expr-bitlist x walist warnings)))
     :rule-classes :type-prescription)

Theorem: true-listp-of-vl-msb-exprlist-bitlist-2

(defthm
   true-listp-of-vl-msb-exprlist-bitlist-2
   (true-listp (mv-nth 2
                       (vl-msb-exprlist-bitlist x walist warnings)))
   :rule-classes :type-prescription)

Subtopics

Vl-msb-partselect-bitlist
Produce the vl-emodwire-ps for a part-select.
Vl-msb-bitselect-bitlist
Produce the vl-emodwire-ps for a bit-select.
Vl-msb-constint-bitlist
Produce the vl-emodwire-ps for a vl-constint-p.
Vl-msb-wire-bitlist
Produce the vl-emodwire-ps for a vl-id-p.
Vl-msb-replicate-bitlist
(vl-msb-replicate-bitlist n bits) appends bits onto itself repeatedly, making n copies of bits as a single list.
Vl-msb-exprlist-bitlist