aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-insts.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-11-17 20:41:26 +0100
committerTristan Gingold <tgingold@free.fr>2019-11-17 20:41:26 +0100
commitace275bd45bdcc8d64d02f53499d434a9ec74541 (patch)
treef93f4e0b593e5f4424fdcf0b19cfb48d044a21ae /src/synth/synth-insts.adb
parent0feb99e97f0f71858378b7378499512304bf256d (diff)
downloadghdl-ace275bd45bdcc8d64d02f53499d434a9ec74541.tar.gz
ghdl-ace275bd45bdcc8d64d02f53499d434a9ec74541.tar.bz2
ghdl-ace275bd45bdcc8d64d02f53499d434a9ec74541.zip
synth: elaborate packages body.
Diffstat (limited to 'src/synth/synth-insts.adb')
-rw-r--r--src/synth/synth-insts.adb22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/synth/synth-insts.adb b/src/synth/synth-insts.adb
index 33072da57..19d51e997 100644
--- a/src/synth/synth-insts.adb
+++ b/src/synth/synth-insts.adb
@@ -24,7 +24,6 @@ with Hash; use Hash;
with Dyn_Tables;
with Interning;
with Synthesis; use Synthesis;
-with Std_Names;
with Grt.Algos;
@@ -37,6 +36,7 @@ with Netlists.Concats;
with Vhdl.Utils; use Vhdl.Utils;
with Vhdl.Errors;
+with Vhdl.Ieee.Math_Real;
with Synth.Flags;
with Synth.Values; use Synth.Values;
@@ -921,19 +921,15 @@ package body Synth.Insts is
Bod_Unit : Node;
begin
Synth_Package_Declaration (Parent_Inst, Dep_Unit);
- if Bod /= Null_Node then
+ -- Do not try to elaborate math_real body: there are
+ -- functions with loop. Currently, try create signals,
+ -- which is not possible during package elaboration.
+ if Bod /= Null_Node
+ and then Dep_Unit /= Vhdl.Ieee.Math_Real.Math_Real_Pkg
+ then
Bod_Unit := Get_Design_Unit (Bod);
- -- Do not translate bodies of ieee packages.
- case (Get_Identifier
- (Get_Library (Get_Design_File (Bod_Unit))))
- is
- when Std_Names.Name_Ieee
- | Std_Names.Name_Std =>
- null;
- when others =>
- Synth_Dependencies (Parent_Inst, Bod_Unit);
- Synth_Package_Body (Parent_Inst, Dep_Unit, Bod);
- end case;
+ Synth_Dependencies (Parent_Inst, Bod_Unit);
+ Synth_Package_Body (Parent_Inst, Dep_Unit, Bod);
end if;
end;
when Iir_Kind_Package_Instantiation_Declaration =>