aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-context.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-09-21 08:57:46 +0200
committerTristan Gingold <tgingold@free.fr>2019-09-21 08:57:46 +0200
commit098715670d1069444f186b3974255ca5778e727f (patch)
tree15b2dfd3fadffad5354894fe299a880f774c3b44 /src/synth/synth-context.adb
parent3e83d4aa5076b1a8cf2ec2214de36c4f507078c9 (diff)
downloadghdl-098715670d1069444f186b3974255ca5778e727f.tar.gz
ghdl-098715670d1069444f186b3974255ca5778e727f.tar.bz2
ghdl-098715670d1069444f186b3974255ca5778e727f.zip
synth: do not create self-instance on black-boxed modules.
Diffstat (limited to 'src/synth/synth-context.adb')
-rw-r--r--src/synth/synth-context.adb5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/synth/synth-context.adb b/src/synth/synth-context.adb
index 730f5b6aa..662dfe1fe 100644
--- a/src/synth/synth-context.adb
+++ b/src/synth/synth-context.adb
@@ -106,6 +106,7 @@ package body Synth.Context is
is
Prev_Base : constant Base_Instance_Acc := Inst.Base;
Base : Base_Instance_Acc;
+ Self_Inst : Instance;
begin
Base := new Base_Instance_Type'(Builder => Prev_Base.Builder,
Top_Module => Prev_Base.Top_Module,
@@ -113,6 +114,10 @@ package body Synth.Context is
Bit0 => No_Net,
Bit1 => No_Net);
Builders.Set_Parent (Base.Builder, M);
+
+ Self_Inst := Create_Self_Instance (M);
+ pragma Unreferenced (Self_Inst);
+
Base.Bit0 := Build_Const_UB32 (Base.Builder, 0, 1);
Base.Bit1 := Build_Const_UB32 (Base.Builder, 1, 1);
Inst.Base := Base;