aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/simul/simul-vhdl_elab.adb3
-rw-r--r--src/synth/synth-vhdl_eval.adb10
2 files changed, 12 insertions, 1 deletions
diff --git a/src/simul/simul-vhdl_elab.adb b/src/simul/simul-vhdl_elab.adb
index eca3ac783..fed1c7d74 100644
--- a/src/simul/simul-vhdl_elab.adb
+++ b/src/simul/simul-vhdl_elab.adb
@@ -985,6 +985,9 @@ package body Simul.Vhdl_Elab is
when Iir_Kind_Package_Declaration =>
Gather_Processes_Decls
(Inst, Get_Declaration_Chain (N));
+ when Iir_Kind_Package_Instantiation_Declaration =>
+ Gather_Processes_Decls
+ (Inst, Get_Declaration_Chain (N));
when Iir_Kind_Configuration_Declaration =>
null;
when others =>
diff --git a/src/synth/synth-vhdl_eval.adb b/src/synth/synth-vhdl_eval.adb
index 31592bb59..2191e7a9c 100644
--- a/src/synth/synth-vhdl_eval.adb
+++ b/src/synth/synth-vhdl_eval.adb
@@ -27,6 +27,7 @@ with Grt.To_Strings;
with Grt.Arith;
with Grt.Fcvt;
+with Vhdl.Std_Package;
with Vhdl.Utils;
with Vhdl.Evaluation;
with Vhdl.Ieee.Std_Logic_1164; use Vhdl.Ieee.Std_Logic_1164;
@@ -776,7 +777,14 @@ package body Synth.Vhdl_Eval is
V := Read_Discrete (Param.Mem, Param.Typ);
Lit := Get_Nth_Element (Enums, Natural (V));
Lit_Id := Get_Identifier (Lit);
- if Is_Character (Lit_Id) then
+
+ -- LRM08 5.7 String representations
+ -- - For a given value of type CHARACTER, the string representation
+ -- contains one element that is the given value.
+ if Etype = Vhdl.Std_Package.Character_Type_Definition then
+ C (1) := Character'Val (V);
+ return String_To_Memtyp (C, Res_Typ);
+ elsif Is_Character (Lit_Id) then
C (1) := Get_Character (Lit_Id);
return String_To_Memtyp (C, Res_Typ);
else