Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Fix issue where inlined cvt could cause crash #2124

Merged
merged 1 commit into from
Mar 16, 2021
Merged

Fix issue where inlined cvt could cause crash #2124

merged 1 commit into from
Mar 16, 2021

Commits on Mar 16, 2021

  1. Fix issue where inlined cvt could cause crash

    Due to inlining of Boolean expressions, the following circuit is handled
    directly by the VerilogEmitter:
    
    input a: UInt<4>
    input b: SInt<1>
    output o: UInt<5>
    o <= dshl(a, asUInt(cvt(b)))
    
    Priot to this change, this could crash due to mishandling of cvt in the
    logic to inject parentheses based on Verilog precedence rules.
    
    This is a corner case, but similar bugs would drop up if we open up the
    VerilogEmitter to more expression inlining.
    jackkoenig committed Mar 16, 2021
    Configuration menu
    Copy the full SHA
    1e95e42 View commit details
    Browse the repository at this point in the history