diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-01-12 21:27:37 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-01-12 21:27:37 +0100 |
commit | 0cb5d1c6a5c6c8c9eae14d5438be83e25d5b1868 (patch) | |
tree | 1fbf89f790a40206c93c95bd09324455fa79a043 /src | |
parent | 0baaab9bb57234496f1ebaf90e28f4b8cc32d29a (diff) | |
download | ghdl-0cb5d1c6a5c6c8c9eae14d5438be83e25d5b1868.tar.gz ghdl-0cb5d1c6a5c6c8c9eae14d5438be83e25d5b1868.tar.bz2 ghdl-0cb5d1c6a5c6c8c9eae14d5438be83e25d5b1868.zip |
netlists-utils: consider 0 bit net as static.
Diffstat (limited to 'src')
-rw-r--r-- | src/synth/netlists-utils.adb | 6 |
1 files changed, 6 insertions, 0 deletions
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; |