aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-01-08 20:35:40 +0100
committerTristan Gingold <tgingold@free.fr>2020-01-09 21:13:51 +0100
commit5bc69198283d48faa67eaaa0430144023f2ad176 (patch)
treed46120c15447ea02c6f3372487a9fbce1b2af16d /src/synth
parent91e5fab3e69fdcdbc04c3280c3ab9f3c8c8d5c51 (diff)
downloadghdl-5bc69198283d48faa67eaaa0430144023f2ad176.tar.gz
ghdl-5bc69198283d48faa67eaaa0430144023f2ad176.tar.bz2
ghdl-5bc69198283d48faa67eaaa0430144023f2ad176.zip
synth: simplify support of inertial associations.
Diffstat (limited to 'src/synth')
-rw-r--r--src/synth/synth-decls.adb10
-rw-r--r--src/synth/synth-insts.adb8
2 files changed, 14 insertions, 4 deletions
diff --git a/src/synth/synth-decls.adb b/src/synth/synth-decls.adb
index 737af2110..f5c60d766 100644
--- a/src/synth/synth-decls.adb
+++ b/src/synth/synth-decls.adb
@@ -677,8 +677,9 @@ package body Synth.Decls is
Create_Object (Syn_Inst, Decl, Res);
end;
when Iir_Kind_Anonymous_Signal_Declaration =>
- Create_Wire_Object (Syn_Inst, Wire_Signal, Decl);
- Create_Var_Wire (Syn_Inst, Decl, null);
+ -- Anonymous signals created by inertial associations are
+ -- simply ignored.
+ null;
when Iir_Kind_Procedure_Declaration
| Iir_Kind_Function_Declaration =>
Synth_Subprogram_Declaration (Syn_Inst, Decl);
@@ -790,10 +791,11 @@ package body Synth.Decls is
end if;
when Iir_Kind_Constant_Declaration =>
null;
- when Iir_Kind_Signal_Declaration
- | Iir_Kind_Anonymous_Signal_Declaration =>
+ when Iir_Kind_Signal_Declaration =>
pragma Assert (not Is_Subprg);
Finalize_Signal (Syn_Inst, Decl);
+ when Iir_Kind_Anonymous_Signal_Declaration =>
+ null;
when Iir_Kind_Object_Alias_Declaration =>
null;
when Iir_Kind_Procedure_Declaration
diff --git a/src/synth/synth-insts.adb b/src/synth/synth-insts.adb
index 7ebf8cc23..60db8d921 100644
--- a/src/synth/synth-insts.adb
+++ b/src/synth/synth-insts.adb
@@ -541,6 +541,14 @@ package body Synth.Insts is
Actual := Get_Default_Value (Inter);
when Iir_Kind_Association_Element_By_Expression =>
Actual := Get_Actual (Assoc);
+ if Get_Kind (Actual) = Iir_Kind_Reference_Name then
+ -- Skip inserted anonymous signal declaration.
+ -- FIXME: simply do not insert it ?
+ Actual := Get_Named_Entity (Actual);
+ pragma Assert
+ (Get_Kind (Actual) = Iir_Kind_Anonymous_Signal_Declaration);
+ Actual := Get_Expression (Actual);
+ end if;
when Iir_Kind_Association_Element_By_Individual =>
Synth_Individual_Input_Assoc (Inp, Syn_Inst, Assoc, Inter_Inst);
return;