From 81150cf4c2bda2665a82a4cb98f81a21ecd6d4c6 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 20 Sep 2020 08:43:47 +0200 Subject: synth-expr: refine is_positive for wires. For #1460 --- src/synth/synth-expr.adb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb index 4d2dc7e95..8d48eb86c 100644 --- a/src/synth/synth-expr.adb +++ b/src/synth/synth-expr.adb @@ -107,8 +107,12 @@ package body Synth.Expr is when Value_Net => N := V.Val.N; when Value_Wire => - return Read_Discrete - (Synth.Environment.Get_Static_Wire (V.Val.W)) >= 0; + if Synth.Environment.Is_Static_Wire (V.Val.W) then + return Read_Discrete + (Synth.Environment.Get_Static_Wire (V.Val.W)) >= 0; + else + return False; + end if; when others => raise Internal_Error; end case; -- cgit v1.2.3