diff options
Diffstat (limited to 'src/synth')
| -rw-r--r-- | src/synth/synth-decls.adb | 10 | ||||
| -rw-r--r-- | src/synth/synth-insts.adb | 8 |
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; |
