From bbdc99ad0bdca7d327f8d8167f38461e6900be41 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 28 Nov 2021 10:43:26 +0100 Subject: synth: add a hook to resolve foreign instantiation names --- src/ghdldrv/ghdlsynth.adb | 4 ++++ src/ghdldrv/ghdlsynth.ads | 4 ++++ 2 files changed, 8 insertions(+) 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; -- cgit v1.2.3