• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
        • Lint
        • Mlib
          • Scopestack
          • Filtering-by-name
          • Vl-namefactory
          • Substitution
          • Allexprs
          • Hid-tools
          • Vl-consteval
          • Range-tools
          • Lvalexprs
          • Hierarchy
          • Finding-by-name
          • Expr-tools
          • Expr-slicing
          • Stripping-functions
          • Stmt-tools
          • Modnamespace
          • Vl-parse-expr-from-str
          • Welltyped
          • Reordering-by-name
          • Flat-warnings
          • Genblob
          • Expr-building
          • Datatype-tools
          • Syscalls
          • Relocate
          • Expr-cleaning
            • Vl-exprlist-clean-selects
            • Vl-expr-clean-selects1
            • Vl-maybe-merge-selects-aux
            • Vl-merge-consts
            • Vl-maybe-merge-selects
            • Vl-expr-clean-selects
            • Vl-elim-nested-concats
            • Vl-expr-clean-concats
              • Vl-spurious-concatenation-p
          • Namemangle
          • Caremask
          • Port-tools
          • Lvalues
        • Server
        • Kit
        • Printer
        • Esim-vl
        • Well-formedness
      • Sv
      • Fgl
      • Vwsim
      • Vl
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Expr-cleaning

Vl-expr-clean-concats

Flatten concatenations and try to merge adjacent, compatible wires within them into larger part-selects.

Signature
(vl-expr-clean-concats x ss) → new-x
Arguments
x — Any expression that occurs in the module mod.
    Guard (vl-expr-p x).
ss — Containing scope stack.
    Guard (vl-scopestack-p ss).
Returns
new-x — Perhaps simplified version of X.
    Type (vl-expr-p new-x).

We try to simplify the concatenations within x, by flattening out nested concatenations and merging concatenations like {foo[3:1], foo[0]} into selects like foo[3:0].

Subtopics

Vl-spurious-concatenation-p
Determine if a concatenation such as {foo} can be safely rewritten to just foo.