From 0cb5d1c6a5c6c8c9eae14d5438be83e25d5b1868 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 12 Jan 2020 21:27:37 +0100 Subject: netlists-utils: consider 0 bit net as static. --- src/synth/netlists-utils.adb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/synth/netlists-utils.adb b/src/synth/netlists-utils.adb index 5e6a5c269..face94c0e 100644 --- a/src/synth/netlists-utils.adb +++ b/src/synth/netlists-utils.adb @@ -128,6 +128,9 @@ package body Netlists.Utils is function Is_Const_Net (N : Net) return Boolean is begin + if Get_Width (N) = 0 then + return True; + end if; return Is_Const_Module (Get_Id (Get_Net_Parent (N))); end Is_Const_Net; @@ -146,6 +149,9 @@ package body Netlists.Utils is return Uns64 (Va); end; when others => + if Get_Width (N) = 0 then + return 0; + end if; raise Internal_Error; end case; end Get_Net_Uns64; -- cgit v1.2.3