• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
          • Expression-sizing
          • 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
            • Edgesynth
            • Stmtrewrite
            • Cblock
            • Vl-always-convert-regports
            • Vl-always-convert-regs
            • Stmttemps
            • Edgesplit
            • Vl-always-check-reg
            • Vl-convert-regs
            • Latchsynth
            • Vl-always-check-regs
            • Vl-match-always-at-some-edges
            • Unelse
              • Vl-modulelist-unelse
              • Vl-alwayslist-unelse
              • Vl-ifstmt-unelse
              • Vl-stmt-unelse
              • Vl-module-unelse
              • Vl-always-unelse
              • Vl-design-unelse
            • Vl-always-convert-reg
            • Vl-design-always-backend
            • Vl-stmt-guts
            • Vl-always-convert-regport
            • Vl-always-scary-regs
            • Eliminitial
            • Ifmerge
            • Vl-edge-control-p
            • Elimalways
          • 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
  • Always-top

Unelse

Convert if/else statements into blocks of independent if-statements.

This is a preprocessing step in synthesizing always blocks.

The idea is to eliminate any else statements by turning an if/else statement into a pair of if statements with inverted conditions. That is:

if (cond)   -->   begin
   body1            if (cond) body1
else                if (!cond) body2
   body2          end

This transform used to be important, but now VL has smarter edge-triggered block handling, so it is probably not at all useful. We don't even run this until after combinational and flop-like always blocks have already been transformed, and even then, it seems unlikely that this could actually help with latch synthesis.

We expect it to be run only after expressions are sized.

Subtopics

Vl-modulelist-unelse
(vl-modulelist-unelse x) maps vl-module-unelse across a list.
Vl-alwayslist-unelse
(vl-alwayslist-unelse x) maps vl-always-unelse across a list.
Vl-ifstmt-unelse
Just handles a single if statement (not recursive).
Vl-stmt-unelse
Recursively processes all the if statements.
Vl-module-unelse
Vl-always-unelse
Vl-design-unelse
Top-level unelse transform.