From 2c755f301e995b73581c435d22a189ab874d5d84 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 1 Oct 2022 05:26:58 +0200 Subject: simul: finalize declarations of procedure calls --- src/simul/simul-vhdl_simul.adb | 4 ++++ src/synth/synth-vhdl_decls.adb | 2 ++ 2 files changed, 6 insertions(+) (limited to 'src') diff --git a/src/simul/simul-vhdl_simul.adb b/src/simul/simul-vhdl_simul.adb index 92fcc920a..bee671e1b 100644 --- a/src/simul/simul-vhdl_simul.adb +++ b/src/simul/simul-vhdl_simul.adb @@ -523,6 +523,8 @@ package body Simul.Vhdl_Simul is -- Skip the resume statement. Stmt := Get_Chain (Stmt); pragma Assert (Get_Kind (Stmt) = Iir_Kind_Procedure_Call_Statement); + Synth.Vhdl_Decls.Finalize_Declarations + (Process.Instance, Get_Declaration_Chain (Bod), True); Synth_Subprogram_Back_Association (Process.Instance, Caller_Inst, Get_Interface_Declaration_Chain (Imp), @@ -806,6 +808,8 @@ package body Simul.Vhdl_Simul is -- TODO: end of call. else Execute_Sequential_Statements (Process); + Synth.Vhdl_Decls.Finalize_Declarations + (Sub_Inst, Get_Declaration_Chain (Bod), True); Synth_Subprogram_Back_Association (Sub_Inst, Inst, Inter_Chain, Assoc_Chain); Next_Stmt := Null_Node; diff --git a/src/synth/synth-vhdl_decls.adb b/src/synth/synth-vhdl_decls.adb index eb1d37e2f..0be74aeb6 100644 --- a/src/synth/synth-vhdl_decls.adb +++ b/src/synth/synth-vhdl_decls.adb @@ -878,6 +878,8 @@ package body Synth.Vhdl_Decls is null; when Iir_Kind_Use_Clause => null; + when Iir_Kind_Suspend_State_Declaration => + null; when others => Vhdl.Errors.Error_Kind ("finalize_declaration", Decl); end case; -- cgit v1.2.3