Skip to content

Commit 9f18553

Browse files
Merge pull request #191 from Bo-Yuan-Huang/ilator_opt
ILAtor updates
2 parents a588908 + cf5f892 commit 9f18553

33 files changed

+990
-2271
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
# Build directory
3939
build/*
4040

41+
# other dir
42+
.vscode/*
43+
4144
# Doxygen output
4245
#html/
4346
#latex/

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ endif()
1111
# PROJECT
1212
# name version language
1313
# ---------------------------------------------------------------------------- #
14-
project(ilang VERSION 1.0.4
14+
project(ilang VERSION 1.0.5
1515
LANGUAGES CXX
1616
)
1717

include/ilang/target-sc/ila_sim.h

+19-7
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,19 @@ class IlaSim {
3939
std::string mem_map;
4040
} st_info;
4141

42-
/// TODO
42+
/// Default constructor.
4343
IlaSim();
44-
/// TODO
44+
/// Construct with the target ILA model.
4545
IlaSim(const InstrLvlAbsPtr& model_ptr);
46-
/// TODO
46+
/// Set the target ILA model.
4747
void set_instr_lvl_abs(const InstrLvlAbsPtr& model_ptr);
48-
/// TODO
48+
/// (To be deprecated) set the path to SystemC library.
4949
void set_systemc_path(std::string systemc_path);
50-
/// TODO
50+
51+
/// Set to CMake build mode.
52+
void enable_cmake_support();
53+
54+
/// Generate the simulator.
5155
void sim_gen(std::string export_dir, bool external_mem = false,
5256
bool readable = false, bool qemu_device = false);
5357

@@ -182,16 +186,20 @@ class IlaSim {
182186
void dfs_func_op_check(const ExprPtr& expr);
183187
void dfs_ite_op(std::stringstream& dfs_simulator, std::string& indent,
184188
const ExprPtr& expr);
189+
std::string get_type_str(const ExprPtr& expr);
185190

186191
std::string get_arg_str(const ExprPtr& arg);
187192
void increase_indent(std::string& indent);
188193
void decrease_indent(std::string& indent);
189194
int get_update_state_num(const InstrPtr& instr_expr);
190195
bool load_from_store_analysis(const ExprPtr& expr);
191-
void declare_variable_with_id(size_t id, std::string v_type,
192-
std::string v_name);
196+
void declare_variable_with_id(size_t id, const std::string& v_type,
197+
const std::string& v_name);
193198
void int_var_width_scan();
194199

200+
/// Generate files required by CMake
201+
void generate_cmake_support();
202+
195203
std::string export_dir_;
196204
std::string systemc_path_;
197205

@@ -200,6 +208,10 @@ class IlaSim {
200208
std::stringstream obj_list_;
201209
std::string header_indent_;
202210

211+
bool cmake_support_ = false;
212+
std::vector<std::string> source_file_list_;
213+
std::vector<std::string> header_file_list_;
214+
203215
std::set<size_t> searched_id_set_;
204216
std::set<size_t> store_ite_set_;
205217
std::set<size_t> const_mem_set_;

0 commit comments

Comments
 (0)