From 3dad306e1d7159b21dbd2aeadae016b634d26692 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 14 Aug 2019 10:00:35 +0200 Subject: ghdl: initialize for synthesis. --- ghdl/ghdl.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'ghdl/ghdl.cc') diff --git a/ghdl/ghdl.cc b/ghdl/ghdl.cc index c5420e1..6e8de96 100644 --- a/ghdl/ghdl.cc +++ b/ghdl/ghdl.cc @@ -533,10 +533,15 @@ struct GhdlPass : public Pass { #ifdef YOSYS_ENABLE_GHDL virtual void execute(std::vector args, RTLIL::Design *design) { + static bool initialized; log_header(design, "Executing GHDL.\n"); - // Initialize the library. There is a counter in that function that protects against multiple calls. - libghdl_init (); + // Initialize the library. + if (!initialized) { + initialized = 1; + libghdl_init (); + ghdlsynth__init_for_ghdl_synth(); + } if (args.size() == 2 && args[1] == "--disp-config") { ghdlcomp__disp_config(); -- cgit v1.2.3