From 2f9ff04b013cd837936c4bbeef0f25ef9445e14a Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 28 Nov 2021 18:13:47 +0100 Subject: elab-vhdl_insts.adb: do not try to elaborate foreign instances twice --- src/synth/elab-vhdl_insts.adb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/synth/elab-vhdl_insts.adb b/src/synth/elab-vhdl_insts.adb index 19b02a745..eb8d6b124 100644 --- a/src/synth/elab-vhdl_insts.adb +++ b/src/synth/elab-vhdl_insts.adb @@ -509,8 +509,13 @@ package body Elab.Vhdl_Insts is is Arch : constant Node := Get_Source_Scope (Syn_Inst); Config : constant Node := Get_Instance_Config (Syn_Inst); - Entity : constant Node := Get_Entity (Arch); + Entity : Node; begin + if Get_Kind (Arch) = Iir_Kind_Foreign_Module then + return; + end if; + + Entity := Get_Entity (Arch); Apply_Block_Configuration (Config, Arch); Elab_Declarations (Syn_Inst, Get_Declaration_Chain (Entity)); -- cgit v1.2.3