diff options
author | Tristan Gingold <tgingold@free.fr> | 2023-01-09 07:51:05 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2023-01-09 07:52:18 +0100 |
commit | ebb526e2ec4187c1463b87c9db5b2417c6399793 (patch) | |
tree | b76c47198301a9ba6251858527b00204b1612d8f /src/simul | |
parent | 3049de704edfc40c539896b6e6416fa1ce4c9cd9 (diff) | |
download | ghdl-ebb526e2ec4187c1463b87c9db5b2417c6399793.tar.gz ghdl-ebb526e2ec4187c1463b87c9db5b2417c6399793.tar.bz2 ghdl-ebb526e2ec4187c1463b87c9db5b2417c6399793.zip |
synth: always create shared variables
Diffstat (limited to 'src/simul')
-rw-r--r-- | src/simul/simul-vhdl_elab.adb | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/src/simul/simul-vhdl_elab.adb b/src/simul/simul-vhdl_elab.adb index 2e7f40f7f..849553d01 100644 --- a/src/simul/simul-vhdl_elab.adb +++ b/src/simul/simul-vhdl_elab.adb @@ -411,27 +411,8 @@ package body Simul.Vhdl_Elab is when Iir_Kind_Disconnection_Specification => Gather_Disconnection (Inst, Decl); when Iir_Kind_Variable_Declaration => - pragma Assert (Get_Shared_Flag (Decl)); - if Get_Default_Value (Decl) = Null_Node then - -- Elab doesn't set a value to variables with no default - -- value. - declare - V : Valtyp; - begin - V := Get_Value (Inst, Decl); - pragma Assert (V.Val = null); - Current_Pool := Global_Pool'Access; - if V.Typ.Kind = Type_Protected then - V := Synth.Vhdl_Decls.Create_Protected_Object - (Inst, Decl, V.Typ); - else - V := Create_Value_Default (V.Typ); - end if; - Current_Pool := Expr_Pool'Access; - Mutate_Object (Inst, Decl, V); - end; - end if; - + -- Variables are always created. + null; when Iir_Kind_Constant_Declaration | Iir_Kind_Non_Object_Alias_Declaration | Iir_Kind_Attribute_Declaration |