From 59f8a3d59f23bd787c95d5ba3258e3a0384dd61c Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 27 May 2022 09:56:56 +0200 Subject: synth: handle suspend state declaration and statement --- src/synth/elab-vhdl_debug.adb | 9 +++++++++ src/synth/elab-vhdl_decls.adb | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/src/synth/elab-vhdl_debug.adb b/src/synth/elab-vhdl_debug.adb index 0f28b42d6..f15b63156 100644 --- a/src/synth/elab-vhdl_debug.adb +++ b/src/synth/elab-vhdl_debug.adb @@ -324,6 +324,15 @@ package body Elab.Vhdl_Debug is | Iir_Kind_Procedure_Body | Iir_Kind_Component_Declaration => null; + when Iir_Kind_Suspend_State_Declaration => + declare + Val : constant Valtyp := Get_Value (Instance, Decl); + begin + Put_Indent (Indent); + Put ("STATE: "); + Put_Int32 (Int32 (Read_I32 (Val.Val.Mem))); + New_Line; + end; when others => Vhdl.Errors.Error_Kind ("disp_declaration_object", Decl); end case; diff --git a/src/synth/elab-vhdl_decls.adb b/src/synth/elab-vhdl_decls.adb index 87c5dbd50..a60843716 100644 --- a/src/synth/elab-vhdl_decls.adb +++ b/src/synth/elab-vhdl_decls.adb @@ -281,6 +281,13 @@ package body Elab.Vhdl_Decls is when Iir_Kind_Signal_Attribute_Declaration => -- Not supported by synthesis. null; + when Iir_Kind_Suspend_State_Declaration => + declare + Val : Valtyp; + begin + Val := Create_Value_Memory (Create_Memory_U32 (0)); + Create_Object (Syn_Inst, Decl, Val); + end; when others => Vhdl.Errors.Error_Kind ("elab_declaration", Decl); end case; -- cgit v1.2.3