diff options
author | Tristan Gingold <tgingold@free.fr> | 2023-01-28 20:12:41 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2023-01-28 20:13:20 +0100 |
commit | 8cb293a92214fa4fb46b15b0af0d1b6a0dae3546 (patch) | |
tree | b41e490b6f0bc78621b300618c1e09b3139adea9 /src/vhdl/translate/trans-chap4.adb | |
parent | 0379cdbe8f29230c20e9ccd3124da75469eaf38e (diff) | |
download | ghdl-8cb293a92214fa4fb46b15b0af0d1b6a0dae3546.tar.gz ghdl-8cb293a92214fa4fb46b15b0af0d1b6a0dae3546.tar.bz2 ghdl-8cb293a92214fa4fb46b15b0af0d1b6a0dae3546.zip |
vhdl/trans: support suspend states
Diffstat (limited to 'src/vhdl/translate/trans-chap4.adb')
-rw-r--r-- | src/vhdl/translate/trans-chap4.adb | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/vhdl/translate/trans-chap4.adb b/src/vhdl/translate/trans-chap4.adb index 0f455a83d..198bcbe62 100644 --- a/src/vhdl/translate/trans-chap4.adb +++ b/src/vhdl/translate/trans-chap4.adb @@ -1890,8 +1890,17 @@ package body Trans.Chap4 is Pop_Identifier_Prefix (Mark); end Translate_Component_Declaration; - procedure Translate_Declaration (Decl : Iir) + procedure Create_Suspend_State (Decl : Iir) is + Info : Object_Info_Acc; + begin + Info := Add_Info (Decl, Kind_Object); + + Info.Object_Var := Create_Var (Create_Var_Identifier ("STATE"), + Ghdl_Index_Type, O_Storage_Local); + end Create_Suspend_State; + + procedure Translate_Declaration (Decl : Iir) is begin case Get_Kind (Decl) is when Iir_Kind_Use_Clause => @@ -1931,6 +1940,9 @@ package body Trans.Chap4 is -- | Iir_Kind_Interface_Signal_Declaration => -- Chap4.Create_Object (Decl); + when Iir_Kind_Suspend_State_Declaration => + Create_Suspend_State (Decl); + when Iir_Kind_Variable_Declaration | Iir_Kind_Constant_Declaration => Create_Object (Decl); @@ -2676,6 +2688,9 @@ package body Trans.Chap4 is when Iir_Kind_Disconnection_Specification => Chap5.Elab_Disconnection_Specification (Decl); + when Iir_Kind_Suspend_State_Declaration => + null; + when Iir_Kind_Type_Declaration | Iir_Kind_Anonymous_Type_Declaration => Chap3.Elab_Type_Declaration (Decl); |