aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-08-14 10:00:35 +0200
committerTristan Gingold <tgingold@free.fr>2019-08-14 10:00:35 +0200
commit3dad306e1d7159b21dbd2aeadae016b634d26692 (patch)
tree559d7c9428d2e6e94d74b154b21cfb0920b4a9d5
parentf405d16f41bead6c8785eae1a468640b61941ec6 (diff)
downloadghdl-yosys-plugin-3dad306e1d7159b21dbd2aeadae016b634d26692.tar.gz
ghdl-yosys-plugin-3dad306e1d7159b21dbd2aeadae016b634d26692.tar.bz2
ghdl-yosys-plugin-3dad306e1d7159b21dbd2aeadae016b634d26692.zip
ghdl: initialize for synthesis.
-rw-r--r--ghdl/ghdl.cc9
1 files changed, 7 insertions, 2 deletions
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<std::string> 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();