• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
          • Expression-sizing
            • Expression-sizing-minutia
            • Expression-sizing-intro
            • Vl-keyvalue-pattern-collect-array-replacements
            • Vl-assignpattern-positional-replacement
            • Vl-plainarg-exprsize
            • Vl-assignpattern-keyvalue-replacement
            • Vl-keyvalue-pattern-collect-struct-replacements
            • Vl-modulelist-exprsize
            • Vl-expr-assignpattern-extend/truncate
            • Vl-structmemberlist->types
            • Vl-expr-size
              • Vl-expr-selfsize
              • Vl-expr-typedecide
              • Vl-expr-expandsizes
                • Vl-weirdint-atom-expandsizes
                • Vl-constint-atom-expandsizes
                • Vl-hidexpr-expandsizes
                • Vl-expandsizes-zeroextend
                • Vl-atom-expandsizes
                • Vl-string-atom-expandsizes
                • Vl-sign-extend-constint
              • Vl-exprlist-expandsizes
              • Vl-exprlist-size
            • Vl-expr-selfdetermine-type
            • Vl-assignpattern-multi-replacement
            • Vl-parse-keyval-pattern-struct
            • Vl-plainarglist-exprsize
            • Vl-parse-keyval-pattern-array
            • Vl-warn-about-implicit-extension
            • Vl-assigncontext-size
            • Vl-arguments-exprsize
            • Vl-assignpattern-replacement
            • Vl-packeddimensionlist-exprsize
            • Vl-namedparamvaluelist-exprsize
            • Vl-maybe-delayoreventcontrol-exprsize
            • Vl-repeateventcontrol-exprsize
            • Vl-paramvaluelist-exprsize
            • Vl-maybe-packeddimension-exprsize
            • Vl-delayoreventcontrol-exprsize
            • Vl-namedparamvalue-exprsize
            • Vl-namedarglist-exprsize
            • Vl-enumitemlist-exprsize
            • Vl-packeddimension-exprsize
            • Vl-maybe-paramvalue-exprsize
            • Vl-evatomlist-exprsize
            • Vl-atom-selfdetermine-type
            • Vl-rangelist-exprsize
            • Vl-maybe-gatedelay-exprsize
            • Vl-maybe-datatype-exprsize
            • Vl-gatedelay-exprsize
            • Vl-paramargs-exprsize
            • Vl-namedarg-exprsize
            • Vl-eventcontrol-exprsize
            • Vl-enumbasetype-exprsize
            • Vl-delaycontrol-exprsize
            • Vl-paramvalue-exprsize
            • Vl-maybe-range-exprsize
            • Vl-enumitem-exprsize
            • Vl-range-exprsize
            • Vl-paramdecl-exprsize
            • Vl-paramdecllist-exprsize
            • Vl-maybe-expr-size
            • Vl-evatom-exprsize
            • Vl-vardecllist-exprsize
            • Vl-portdecllist-exprsize
            • Vl-modinstlist-exprsize
            • Vl-initiallist-exprsize
            • Vl-gateinstlist-exprsize
            • Vl-fundecllist-exprsize
            • Vl-assign-exprsize
            • Vl-interfaceport-exprsize
            • Vl-assignlist-exprsize
            • Vl-alwayslist-exprsize
            • Vl-portlist-exprsize
            • Vl-modinst-exprsize
            • Vl-gateinst-exprsize
            • Vl-fundecl-exprsize
            • Vl-vardecl-exprsize
            • Vl-regularport-exprsize
            • Vl-portdecl-exprsize
            • Vl-initial-exprsize
            • Vl-always-exprsize
            • Vl-port-exprsize
            • Vl-lvalue-type
            • Vl-classify-extension-warning-hook
            • Welltyped
            • Vl-castexpr->datatype
            • Vl-expr-size-assigncontext
            • Vl-type-expr-pairs-sum-datatype-sizes
            • Vl-basictype->datatype
            • Vl-expr-replace-assignpatterns
            • Vl-design-exprsize
            • Vl-op-simple-vector-p
            • Vl-expr-val-alist-max-count
            • Vl-expr-has-patterns
            • Vl-exprlist-max-count
            • Vl-unsigned-when-size-zero-lst
            • Vl-type-expr-pairs
            • Append-n
            • Vl-expr-val-alist
            • Vl-datatypelist
          • Occform
          • Oprewrite
          • Expand-functions
          • Delayredux
          • Unparameterization
          • Caseelim
          • Split
          • Selresolve
          • Weirdint-elim
          • Vl-delta
          • Replicate-insts
          • Rangeresolve
          • Propagate
          • Clean-selects
          • Clean-params
          • Blankargs
          • Inline-mods
          • Expr-simp
          • Trunc
          • Always-top
          • Gatesplit
          • Gate-elim
          • Expression-optimization
          • Elim-supplies
          • Wildelim
          • Drop-blankports
          • Clean-warnings
          • Addinstnames
          • Custom-transform-hooks
          • Annotate
          • Latchcode
          • Elim-unused-vars
          • Problem-modules
        • Lint
        • Mlib
        • Server
        • Kit
        • Printer
        • Esim-vl
        • Well-formedness
      • Sv
      • Fgl
      • Vwsim
      • Vl
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Vl-expr-size

Vl-expr-expandsizes

Propagate the final width/type into a context-determined expression.

Signature
(vl-expr-expandsizes x finalwidth finaltype ss ctx warnings) 
  → 
(mv successp warnings new-x)
Arguments
x — Should be a list of context-determined expressions.
    Guard (vl-expr-p x).
finalwidth — Finalwidth to extend every expression in x to, should be determined by the first pass of the sizing algorithm.
    Guard (natp finalwidth).
finaltype — Finaltype to coerce every expression in x to, should be determined by the first pass of the sizing algorithm.
    Guard (vl-exprtype-p finaltype).
ss — Guard (vl-scopestack-p ss).
ctx — Guard (vl-context-p ctx).
warnings — Guard (vl-warninglist-p warnings).
Returns
successp — Type (booleanp successp).
warnings — Type (vl-warninglist-p warnings).
new-x — Type (vl-expr-p new-x).

Subtopics

Vl-weirdint-atom-expandsizes
Propagate the final width and type of an expression into a weird integer atom.
Vl-constint-atom-expandsizes
Propagate the final width and type of an expression into a constant integer atom.
Vl-hidexpr-expandsizes
Propagate the final width and type of an expression into an identifier or HID.
Vl-expandsizes-zeroextend
Safely zero-extend an already-sized, unsigned expression to finalwidth.
Vl-atom-expandsizes
Propagate the final width and type of an expression into an atom.
Vl-string-atom-expandsizes
Propagate the final width and type of an expression into a weird integer atom.
Vl-sign-extend-constint
(vl-sign-extend-constint value origwidth finalwidth) returns a new value, which is the sign extension of the origwidth-bit value to finalwidth bits.