diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-06-28 19:08:32 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-06-28 19:08:32 +0200 |
commit | ec43db0fb7543b62ab9d326e978cceb70defe58e (patch) | |
tree | 22eed14e17fedfbd140525f2aab2fa6660297217 /src/synth/netlists-utils.adb | |
parent | 40c7b033a8e005503a5719901ac420bd39145a7b (diff) | |
download | ghdl-ec43db0fb7543b62ab9d326e978cceb70defe58e.tar.gz ghdl-ec43db0fb7543b62ab9d326e978cceb70defe58e.tar.bz2 ghdl-ec43db0fb7543b62ab9d326e978cceb70defe58e.zip |
synth: disp_vhdl: merge literals.
Diffstat (limited to 'src/synth/netlists-utils.adb')
-rw-r--r-- | src/synth/netlists-utils.adb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/synth/netlists-utils.adb b/src/synth/netlists-utils.adb index 0f33002d3..1b8d08b1a 100644 --- a/src/synth/netlists-utils.adb +++ b/src/synth/netlists-utils.adb @@ -18,6 +18,8 @@ -- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, -- MA 02110-1301, USA. +with Netlists.Gates; + package body Netlists.Utils is function Get_Nbr_Inputs (Inst : Instance) return Port_Nbr is @@ -74,6 +76,19 @@ package body Netlists.Utils is return Get_Driver (Get_Input (Inst, Idx)); end Get_Input_Net; + function Is_Const (Id : Module_Id) return Boolean + is + use Netlists.Gates; + begin + case Id is + when Id_Const_UB32 + | Id_Const_UL32 => + return True; + when others => + return False; + end case; + end Is_Const; + function Is_Connected (O : Net) return Boolean is begin return Get_First_Sink (O) /= No_Input; |