Skip to content

Commit

Permalink
Merge pull request PrincetonUniversity#191 from Bo-Yuan-Huang/ilator_opt
Browse files Browse the repository at this point in the history
ILAtor updates
  • Loading branch information
Bo-Yuan-Huang committed Jun 18, 2020
2 parents a588908 + cf5f892 commit 9f18553
Show file tree
Hide file tree
Showing 33 changed files with 990 additions and 2,271 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
# Build directory
build/*

# other dir
.vscode/*

# Doxygen output
#html/
#latex/
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif()
# PROJECT
# name version language
# ---------------------------------------------------------------------------- #
project(ilang VERSION 1.0.4
project(ilang VERSION 1.0.5
LANGUAGES CXX
)

Expand Down
26 changes: 19 additions & 7 deletions include/ilang/target-sc/ila_sim.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,19 @@ class IlaSim {
std::string mem_map;
} st_info;

/// TODO
/// Default constructor.
IlaSim();
/// TODO
/// Construct with the target ILA model.
IlaSim(const InstrLvlAbsPtr& model_ptr);
/// TODO
/// Set the target ILA model.
void set_instr_lvl_abs(const InstrLvlAbsPtr& model_ptr);
/// TODO
/// (To be deprecated) set the path to SystemC library.
void set_systemc_path(std::string systemc_path);
/// TODO

/// Set to CMake build mode.
void enable_cmake_support();

/// Generate the simulator.
void sim_gen(std::string export_dir, bool external_mem = false,
bool readable = false, bool qemu_device = false);

Expand Down Expand Up @@ -182,16 +186,20 @@ class IlaSim {
void dfs_func_op_check(const ExprPtr& expr);
void dfs_ite_op(std::stringstream& dfs_simulator, std::string& indent,
const ExprPtr& expr);
std::string get_type_str(const ExprPtr& expr);

std::string get_arg_str(const ExprPtr& arg);
void increase_indent(std::string& indent);
void decrease_indent(std::string& indent);
int get_update_state_num(const InstrPtr& instr_expr);
bool load_from_store_analysis(const ExprPtr& expr);
void declare_variable_with_id(size_t id, std::string v_type,
std::string v_name);
void declare_variable_with_id(size_t id, const std::string& v_type,
const std::string& v_name);
void int_var_width_scan();

/// Generate files required by CMake
void generate_cmake_support();

std::string export_dir_;
std::string systemc_path_;

Expand All @@ -200,6 +208,10 @@ class IlaSim {
std::stringstream obj_list_;
std::string header_indent_;

bool cmake_support_ = false;
std::vector<std::string> source_file_list_;
std::vector<std::string> header_file_list_;

std::set<size_t> searched_id_set_;
std::set<size_t> store_ite_set_;
std::set<size_t> const_mem_set_;
Expand Down
Loading

0 comments on commit 9f18553

Please sign in to comment.