aboutsummaryrefslogtreecommitdiffstats
path: root/src/ghdldrv
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-04-05 09:20:04 +0200
committerTristan Gingold <tgingold@free.fr>2021-04-05 10:47:39 +0200
commit3c9c6023c38ed1272634a7d2aed5dbe1c318842a (patch)
tree9b0c80f87645a14fbcea51e05ecccaeb02ca6aeb /src/ghdldrv
parentf3e936f0ca532fb57f2700a46ba1ff84557f7305 (diff)
downloadghdl-3c9c6023c38ed1272634a7d2aed5dbe1c318842a.tar.gz
ghdl-3c9c6023c38ed1272634a7d2aed5dbe1c318842a.tar.bz2
ghdl-3c9c6023c38ed1272634a7d2aed5dbe1c318842a.zip
vhdl and libraries: add support for binding to a foreign module
Diffstat (limited to 'src/ghdldrv')
-rw-r--r--src/ghdldrv/ghdlsynth.adb26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/ghdldrv/ghdlsynth.adb b/src/ghdldrv/ghdlsynth.adb
index 8a21169bc..0954d3f8e 100644
--- a/src/ghdldrv/ghdlsynth.adb
+++ b/src/ghdldrv/ghdlsynth.adb
@@ -379,18 +379,20 @@ package body Ghdlsynth is
Vhdl.Configuration.Add_Verification_Units;
- -- Check (and possibly abandon) if entity can be at the top of the
- -- hierarchy.
- declare
- Entity : constant Iir :=
- Vhdl.Utils.Get_Entity_From_Configuration (Config);
- begin
- Vhdl.Configuration.Apply_Generic_Override (Entity);
- Vhdl.Configuration.Check_Entity_Declaration_Top (Entity, False);
- if Nbr_Errors > 0 then
- return Null_Iir;
- end if;
- end;
+ if Get_Kind (Config) = Iir_Kind_Configuration_Declaration then
+ -- Check (and possibly abandon) if entity can be at the top of the
+ -- hierarchy.
+ declare
+ Entity : constant Iir :=
+ Vhdl.Utils.Get_Entity_From_Configuration (Config);
+ begin
+ Vhdl.Configuration.Apply_Generic_Override (Entity);
+ Vhdl.Configuration.Check_Entity_Declaration_Top (Entity, False);
+ if Nbr_Errors > 0 then
+ return Null_Iir;
+ end if;
+ end;
+ end if;
-- Annotate all units.
Vhdl.Annotations.Initialize_Annotate;