aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/elab-vhdl_decls.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-09-08 18:54:58 +0200
committerTristan Gingold <tgingold@free.fr>2022-09-08 18:54:58 +0200
commitde68a6b6b024d438f2242e2fddb7dd29cca59f3b (patch)
treecfb19c2fc0840e3677ccb0df977f0e480bf738c7 /src/synth/elab-vhdl_decls.adb
parent40af9a7fa56c429669c5fbe7553ba7c46e2d4fa3 (diff)
downloadghdl-de68a6b6b024d438f2242e2fddb7dd29cca59f3b.tar.gz
ghdl-de68a6b6b024d438f2242e2fddb7dd29cca59f3b.tar.bz2
ghdl-de68a6b6b024d438f2242e2fddb7dd29cca59f3b.zip
simul: add support for protected objects
Diffstat (limited to 'src/synth/elab-vhdl_decls.adb')
-rw-r--r--src/synth/elab-vhdl_decls.adb9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/synth/elab-vhdl_decls.adb b/src/synth/elab-vhdl_decls.adb
index 4c09a656c..f873730ba 100644
--- a/src/synth/elab-vhdl_decls.adb
+++ b/src/synth/elab-vhdl_decls.adb
@@ -24,7 +24,6 @@ with Vhdl.Utils; use Vhdl.Utils;
with Elab.Vhdl_Values; use Elab.Vhdl_Values;
with Elab.Vhdl_Types; use Elab.Vhdl_Types;
with Elab.Vhdl_Files;
-with Elab.Vhdl_Errors; use Elab.Vhdl_Errors;
with Elab.Vhdl_Expr; use Elab.Vhdl_Expr;
with Elab.Vhdl_Insts;
@@ -150,17 +149,11 @@ package body Elab.Vhdl_Decls is
Force_Init : Boolean)
is
Def : constant Node := Get_Default_Value (Decl);
- Decl_Type : constant Node := Get_Type (Decl);
Marker : Mark_Type;
Init : Valtyp;
Obj_Typ : Type_Acc;
begin
Obj_Typ := Elab_Declaration_Type (Syn_Inst, Decl);
- if Get_Kind (Decl_Type) = Iir_Kind_Protected_Type_Declaration then
- Error_Msg_Elab (+Decl, "protected type not supported");
- return;
- end if;
-
Mark_Expr_Pool (Marker);
if Is_Valid (Def) then
@@ -173,6 +166,8 @@ package body Elab.Vhdl_Decls is
Init := Create_Value_Default (Obj_Typ);
Current_Pool := Expr_Pool'Access;
else
+ -- For synthesis, no need to set a value for a shared variable
+ -- (they will certainly become a memory).
Init := (Typ => Obj_Typ, Val => null);
end if;
end if;