Skip to content

Commit

Permalink
Merge pull request PrincetonUniversity#106 from Bo-Yuan-Huang/issue103
Browse files Browse the repository at this point in the history
Issue103
  • Loading branch information
Bo-Yuan-Huang committed May 23, 2019
2 parents 1de418a + 6eed53e commit b7a697a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/CMakeLists.txt
Expand Up @@ -131,6 +131,12 @@ if(${ILANG_BUILD_SYNTH})

endif()

if(${ILANG_BUILD_SYNTH})
set(SYNTH_INTERFACE TRUE)
else()
set(SYNTH_INTERFACE FALSE)
endif()


# ---------------------------------------------------------------------------- #
# INSTALL
Expand Down
3 changes: 3 additions & 0 deletions src/config.h.in
Expand Up @@ -5,7 +5,10 @@
#define CONFIG_CMAKE_DEFINE_H__

//#cmakedefine VERILOG_IN_ENABLE

#cmakedefine Z3_LEGACY_API

#cmakedefine SYNTH_INTERFACE

#endif // CONFIG_CMAKE_DEFINE_H__

13 changes: 13 additions & 0 deletions src/ilang++.cc
Expand Up @@ -3,6 +3,7 @@

#include <ilang/ilang++.h>

#include <ilang/config.h>
#include <ilang/ila/instr_lvl_abs.h>
#include <ilang/portable/interface.h>
#include <ilang/synth-interface/synth_engine_interface.h>
Expand Down Expand Up @@ -668,15 +669,27 @@ Ila ImportIlaPortable(const std::string& file_name) {

Ila ImportSynthAbstraction(const std::string& file_name,
const std::string& ila_name) {
#ifdef SYNTH_INTERFACE
auto m = ImportSynthAbsFromFile(file_name, ila_name);
return Ila(m);
#else // SYNTH_INTERFACE
auto m = Ila(ila_name);
ILA_ERROR << "Synthesis interface not built.";
ILA_ERROR << "Empty ILA " << ila_name << " is returned.";
return m;
#endif // SYNTH_INTERFACE
}

void ImportChildSynthAbstraction(const std::string& file_name, Ila& parent,
const std::string& ila_name) {
#ifdef SYNTH_INTERFACE
auto m = ImportSynthAbsFromFileHier(file_name, parent.get(), ila_name);
ILA_NOT_NULL(m);
return;
#else
ILA_ERROR << "Synthesis interface not built.";
ILA_ERROR << "Empty ILA " << ila_name << " is returned.";
#endif
}

IlaZ3Unroller::IlaZ3Unroller(z3::context& ctx, const std::string& suff)
Expand Down

0 comments on commit b7a697a

Please sign in to comment.