diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/synth/synth-expr.adb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb index d6651638f..ecb2bada1 100644 --- a/src/synth/synth-expr.adb +++ b/src/synth/synth-expr.adb @@ -783,8 +783,14 @@ package body Synth.Expr is Zx : Uns32; N : Net; begin + if Is_Const (Expr) then + return Create_Value_Discrete (Boolean'Pos (Cst.Scal = Expr.Scal), + Boolean_Type); + end if; + To_Logic (Cst.Scal, Cst.Typ, Val, Zx); if Zx /= 0 then + -- Equal unknown -> return X N := Build_Const_UL32 (Build_Context, 0, 1, 1); Set_Location (N, Loc); return Create_Value_Net (N, Boolean_Type); |