aboutsummaryrefslogtreecommitdiffstats
path: root/src/ghdldrv
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-11-28 10:43:26 +0100
committerTristan Gingold <tgingold@free.fr>2021-11-28 12:13:26 +0100
commitbbdc99ad0bdca7d327f8d8167f38461e6900be41 (patch)
treee8ad54459794d45a6095fdbe1ef77484914024c6 /src/ghdldrv
parent71f1686047bf4e05988396d4051ec4871d19ebc2 (diff)
downloadghdl-bbdc99ad0bdca7d327f8d8167f38461e6900be41.tar.gz
ghdl-bbdc99ad0bdca7d327f8d8167f38461e6900be41.tar.bz2
ghdl-bbdc99ad0bdca7d327f8d8167f38461e6900be41.zip
synth: add a hook to resolve foreign instantiation names
Diffstat (limited to 'src/ghdldrv')
-rw-r--r--src/ghdldrv/ghdlsynth.adb4
-rw-r--r--src/ghdldrv/ghdlsynth.ads4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/ghdldrv/ghdlsynth.adb b/src/ghdldrv/ghdlsynth.adb
index bde8fa62b..229edcb1b 100644
--- a/src/ghdldrv/ghdlsynth.adb
+++ b/src/ghdldrv/ghdlsynth.adb
@@ -371,6 +371,10 @@ package body Ghdlsynth is
Vhdl.Configuration.Add_Verification_Units;
+ if Foreign_Resolve_Instances /= null then
+ Foreign_Resolve_Instances.all;
+ end if;
+
if Get_Kind (Config) = Iir_Kind_Design_Unit then
-- Check (and possibly abandon) if entity can be at the top of the
-- hierarchy.
diff --git a/src/ghdldrv/ghdlsynth.ads b/src/ghdldrv/ghdlsynth.ads
index cbc669c54..2f67adcbf 100644
--- a/src/ghdldrv/ghdlsynth.ads
+++ b/src/ghdldrv/ghdlsynth.ads
@@ -29,4 +29,8 @@ package Ghdlsynth is
function Ghdl_Synth
(Init : Natural; Argc : Natural; Argv : C_String_Array_Acc)
return Module;
+
+ type Foreign_Resolve_Instances_Acc is access procedure;
+
+ Foreign_Resolve_Instances : Foreign_Resolve_Instances_Acc;
end Ghdlsynth;