@@ -39,15 +39,19 @@ class IlaSim {
39
39
std::string mem_map;
40
40
} st_info;
41
41
42
- // / TODO
42
+ // / Default constructor.
43
43
IlaSim ();
44
- // / TODO
44
+ // / Construct with the target ILA model.
45
45
IlaSim (const InstrLvlAbsPtr& model_ptr);
46
- // / TODO
46
+ // / Set the target ILA model.
47
47
void set_instr_lvl_abs (const InstrLvlAbsPtr& model_ptr);
48
- // / TODO
48
+ // / (To be deprecated) set the path to SystemC library.
49
49
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.
51
55
void sim_gen (std::string export_dir, bool external_mem = false ,
52
56
bool readable = false , bool qemu_device = false );
53
57
@@ -182,16 +186,20 @@ class IlaSim {
182
186
void dfs_func_op_check (const ExprPtr& expr);
183
187
void dfs_ite_op (std::stringstream& dfs_simulator, std::string& indent,
184
188
const ExprPtr& expr);
189
+ std::string get_type_str (const ExprPtr& expr);
185
190
186
191
std::string get_arg_str (const ExprPtr& arg);
187
192
void increase_indent (std::string& indent);
188
193
void decrease_indent (std::string& indent);
189
194
int get_update_state_num (const InstrPtr& instr_expr);
190
195
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);
193
198
void int_var_width_scan ();
194
199
200
+ // / Generate files required by CMake
201
+ void generate_cmake_support ();
202
+
195
203
std::string export_dir_;
196
204
std::string systemc_path_;
197
205
@@ -200,6 +208,10 @@ class IlaSim {
200
208
std::stringstream obj_list_;
201
209
std::string header_indent_;
202
210
211
+ bool cmake_support_ = false ;
212
+ std::vector<std::string> source_file_list_;
213
+ std::vector<std::string> header_file_list_;
214
+
203
215
std::set<size_t > searched_id_set_;
204
216
std::set<size_t > store_ite_set_;
205
217
std::set<size_t > const_mem_set_;
0 commit comments