From cf5f892bf05c41a05e42b132ba0c15f40952f04d Mon Sep 17 00:00:00 2001 From: Bo-Yuan Huang Date: Thu, 18 Jun 2020 17:01:11 -0400 Subject: [PATCH] Bug fixes, disable legacy tests, improve performance and readability --- include/ilang/target-sc/ila_sim.h | 14 +- src/target-sc/dfs.cc | 171 +++++------ src/target-sc/ila_sim.cc | 81 +++-- src/target-sc/sim_gen_decode.cc | 9 +- src/target-sc/sim_gen_execute.cc | 222 +++++++------- src/target-sc/sim_gen_init.cc | 10 +- src/target-sc/sim_gen_input.cc | 3 +- src/target-sc/sim_gen_state.cc | 1 + src/target-sc/sim_gen_state_update.cc | 13 +- test/CMakeLists.txt | 1 + test/t_ila_sim.cc | 10 +- test/t_ila_sim_cmake.cc | 88 ++++++ .../ila_sim_test/compute_external_mem.cc | 90 ------ test/unit-data/ila_sim_test/decode_115572.cc | 18 -- .../decode_115572_update_TEST_address.cc | 14 - .../ila_sim_test/decode_TEST_WRITE_ADDRESS.cc | 18 -- .../decode_TEST_WRITE_ADDRESS_qemu.cc | 17 -- ..._TEST_WRITE_ADDRESS_update_TEST_address.cc | 16 - ..._WRITE_ADDRESS_update_TEST_address_qemu.cc | 17 -- test/unit-data/ila_sim_test/mk.sh | 20 -- .../unit-data/ila_sim_test/mk_external_mem.sh | 20 -- test/unit-data/ila_sim_test/mk_qemu.sh | 20 -- test/unit-data/ila_sim_test/mk_readable.sh | 20 -- .../ila_sim_test/mk_readable_qemu.sh | 20 -- test/unit-data/ila_sim_test/test.h | 263 ----------------- .../ila_sim_test/test_external_mem.h | 279 ------------------ test/unit-data/ila_sim_test/test_qemu.h | 264 ----------------- test/unit-data/ila_sim_test/test_readable.h | 263 ----------------- .../ila_sim_test/test_readable_qemu.h | 264 ----------------- 29 files changed, 349 insertions(+), 1897 deletions(-) create mode 100644 test/t_ila_sim_cmake.cc delete mode 100644 test/unit-data/ila_sim_test/compute_external_mem.cc delete mode 100644 test/unit-data/ila_sim_test/decode_115572.cc delete mode 100644 test/unit-data/ila_sim_test/decode_115572_update_TEST_address.cc delete mode 100644 test/unit-data/ila_sim_test/decode_TEST_WRITE_ADDRESS.cc delete mode 100644 test/unit-data/ila_sim_test/decode_TEST_WRITE_ADDRESS_qemu.cc delete mode 100644 test/unit-data/ila_sim_test/decode_TEST_WRITE_ADDRESS_update_TEST_address.cc delete mode 100644 test/unit-data/ila_sim_test/decode_TEST_WRITE_ADDRESS_update_TEST_address_qemu.cc delete mode 100644 test/unit-data/ila_sim_test/mk.sh delete mode 100644 test/unit-data/ila_sim_test/mk_external_mem.sh delete mode 100644 test/unit-data/ila_sim_test/mk_qemu.sh delete mode 100644 test/unit-data/ila_sim_test/mk_readable.sh delete mode 100644 test/unit-data/ila_sim_test/mk_readable_qemu.sh delete mode 100644 test/unit-data/ila_sim_test/test.h delete mode 100644 test/unit-data/ila_sim_test/test_external_mem.h delete mode 100644 test/unit-data/ila_sim_test/test_qemu.h delete mode 100644 test/unit-data/ila_sim_test/test_readable.h delete mode 100644 test/unit-data/ila_sim_test/test_readable_qemu.h diff --git a/include/ilang/target-sc/ila_sim.h b/include/ilang/target-sc/ila_sim.h index 88047ba5a..26ccb7f41 100644 --- a/include/ilang/target-sc/ila_sim.h +++ b/include/ilang/target-sc/ila_sim.h @@ -39,19 +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); - /// Generate receipes for CMake build system + /// Set to CMake build mode. void enable_cmake_support(); - /// TODO + /// Generate the simulator. void sim_gen(std::string export_dir, bool external_mem = false, bool readable = false, bool qemu_device = false); @@ -186,7 +186,7 @@ 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_out_type_str(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); diff --git a/src/target-sc/dfs.cc b/src/target-sc/dfs.cc index 0b6065ccf..5a2c27466 100644 --- a/src/target-sc/dfs.cc +++ b/src/target-sc/dfs.cc @@ -8,7 +8,7 @@ namespace ilang { -std::string IlaSim::get_out_type_str(const ExprPtr& expr) { +std::string IlaSim::get_type_str(const ExprPtr& expr) { if (expr->is_bv()) { return (qemu_device_) ? fmt::format("uint{}_t", expr->sort()->bit_width()) @@ -65,29 +65,20 @@ void IlaSim::dfs_external_mem_load(const ExprPtr& expr) { void IlaSim::dfs_uninterpreted_func_decl(const FuncPtr& func) { auto func_name = func->name().str(); auto func_out_sort = func->out(); + header_ << header_indent_; + if (func_out_sort->is_bool()) { - header_ << "bool " << func_name << "("; - } else if (func_out_sort->is_bv()) { - if (qemu_device_) { - header_ << fmt::format("uint{}_t {} (", - std::to_string(func_out_sort->bit_width()), - func_name); - } else { - header_ << fmt::format("sc_biguint<{}> {} (", - std::to_string(func_out_sort->bit_width()), - func_name); - } - } else if (func_out_sort->is_mem()) { - ILA_WARN << "Warning: 2d array might have trouble as function output"; - if (qemu_device_) { - header_ << fmt::format("uint{}_t* {} (", - std::to_string(func_out_sort->bit_width()), - func_name); - } else { - header_ << fmt::format("sc_biguint<{}>* {} (", - std::to_string(func_out_sort->data_width()), - func_name); + header_ << fmt::format("bool {} (", func_name); + } else { + auto out_width = func_out_sort->is_bv() ? func_out_sort->bit_width() + : func_out_sort->data_width(); + auto out_type = (qemu_device_) ? fmt::format("uint{}_t", out_width) + : fmt::format("sc_biguint<{}>", out_width); + if (func_out_sort->is_bv()) { + header_ << fmt::format("{} {} (", out_type, func_name); + } else { // is_mem() + header_ << fmt::format("{}* {} (", out_type, func_name); } } @@ -95,26 +86,15 @@ void IlaSim::dfs_uninterpreted_func_decl(const FuncPtr& func) { if (i != 0) { header_ << ", "; } - auto arg_sort = func->arg(i); - if (arg_sort->is_bool()) { - header_ << "bool arg_" << i; - } else if (arg_sort->is_bv()) { - if (qemu_device_) { - header_ << fmt::format("uint{}_t arg_{}", - std::to_string(arg_sort->bit_width()), i); - } else { - header_ << fmt::format("sc_biguint<{}> arg_{}", - std::to_string(arg_sort->bit_width()), i); - } + + auto arg_i = func->arg(i); + if (arg_i->is_bool()) { + header_ << fmt::format("bool arg_{}", i); } else { - // TODO(yuex): add func_decl with memory arg. - if (qemu_device_) { - header_ << fmt::format("uint{}_t arg_{}", - std::to_string(arg_sort->data_width()), i); - } else { - header_ << fmt::format("sc_biguint<{}> arg_{}", - std::to_string(arg_sort->data_width()), i); - } + auto width = arg_i->is_bv() ? arg_i->bit_width() : arg_i->data_width(); + auto type = (qemu_device_) ? fmt::format("uint{}_t", width) + : fmt::format("sc_biguint<{}>", width); + header_ << fmt::format("{} arg_{}", type, i); } } header_ << ");\n"; @@ -187,7 +167,7 @@ void IlaSim::dfs_unary_op(std::stringstream& dfs_simulator, std::string& indent, }; // siwtch GetUidExprOp(expr) // TODO(yuex): be careful with the diff between NEG and COMPL - auto out_type_str = get_out_type_str(expr); + auto out_type_str = get_type_str(expr); declare_variable_with_id(id, out_type_str, out_str); dfs_simulator << indent << out_str << " = " << op_str << arg_str << ";\n"; @@ -261,7 +241,7 @@ void IlaSim::dfs_binary_op_non_mem(std::stringstream& dfs_simulator, std::string arg1_str = get_arg_str(expr->arg(1)); std::string out_str = "c_" + std::to_string(expr->name().id()); - auto out_type_str = get_out_type_str(expr); + auto out_type_str = get_type_str(expr); std::string op_str = ""; auto uid = GetUidExprOp(expr); @@ -364,7 +344,7 @@ void IlaSim::dfs_binary_op_mem(std::stringstream& dfs_simulator, std::string out_str = "c_" + std::to_string(expr->name().id()); - auto out_type_str = get_out_type_str(expr); + auto out_type_str = get_type_str(expr); bool is_load = GetUidExprOp(expr) == AST_UID_EXPR_OP::LOAD; auto arg0_uid = GetUidExpr(expr->arg(0)); @@ -385,19 +365,23 @@ void IlaSim::dfs_binary_op_mem(std::stringstream& dfs_simulator, } if (is_load) { if ((EXTERNAL_MEM_) && (arg0_uid == AST_UID_EXPR::VAR)) { - std::string buff = ""; - buff += indent + fmt::format("if ({}_ctrl == 0) {{\n", out_str); - buff += indent + fmt::format(" {}_ctrl = 1;\n", out_str); - buff += indent + " return 0;\n"; - buff += indent + fmt::format("}} else if ({}_ctrl == 1) {{\n", out_str); - buff += indent + " return 0;\n"; - buff += indent + fmt::format("}} else if ({}_ctrl != 2) {{\n", out_str); - buff += indent + " cout << \"Error: Load wrong\" << endl;\n"; - dfs_simulator << buff << indent << "}\n"; - } else + + dfs_simulator << fmt::format( + "{0}if ({1}_ctrl == 0) {{\n" + "{0} {1}_ctrl = 1;\n" + "{0} return 0;\n" + "{0}}} else if ({1}_ctrl == 1) {{\n" + "{0} return 0;\n" + "{0}}} else if ({1}_ctrl != 2) {{\n" + "{0} cout << \"Error: Load wrong\" << endl;\n" + "{0}}}\n", + indent, out_str); + + } else { dfs_simulator << indent << fmt::format("{} = {}[{}];\n", out_str, arg0_str, arg1_str); + } } else { std::string arg2_str = get_arg_str(expr->arg(2)); if (qemu_device_) { @@ -412,6 +396,7 @@ void IlaSim::dfs_binary_op_mem(std::stringstream& dfs_simulator, ? arg2_str : arg2_str + ".to_int()"; } + dfs_simulator << indent << fmt::format("mem_update_map[{}] = {};\n", arg1_str, arg2_str); @@ -426,26 +411,32 @@ void IlaSim::dfs_extract_op(std::stringstream& dfs_simulator, auto param1 = static_cast(expr->param(1)); auto out_str = "c_" + std::to_string(expr->name().id()); - auto out_type_str = get_out_type_str(expr); + auto out_type_str = get_type_str(expr); declare_variable_with_id(id, out_type_str, out_str); if (qemu_device_) { - std::string tmp_str = "tmp_" + std::to_string(expr->name().id()); + auto tmp_str = fmt::format("tmp_{}", expr->name().id()); int cast_length = param0 - param1 + 1; - std::string buff = ""; - buff += - indent + fmt::format("uint{}_t {} = 0 - 1;\n", cast_length, tmp_str); - buff += - indent + fmt::format("{} = static_cast (({} >> {}) & {});\n", - out_str, cast_length, arg_str, param1, tmp_str); - dfs_simulator << buff; - + dfs_simulator << fmt::format( + "{0}uint{1}_t {2} = 0 - 1;\n" + "{0}{3} = static_cast (({4} >> {5}) & {2});\n", + indent, // 0 + cast_length, // 1 + tmp_str, // 2 + out_str, // 3 + arg_str, // 4 + param1 // 5 + ); } else { - dfs_simulator << indent - << fmt::format("{} = {}.range({}, {});\n", out_str, arg_str, - param0, param1); + dfs_simulator << fmt::format("{0}{1} = {2}.range({3}, {4});\n", + indent, // 0 + out_str, // 1 + arg_str, // 2 + param0, // 3 + param1 // 4 + ); } } @@ -455,7 +446,7 @@ void IlaSim::dfs_ext_op(std::stringstream& dfs_simulator, std::string& indent, auto arg = expr->arg(0); std::string arg_str = get_arg_str(arg); auto out_str = "c_" + std::to_string(expr->name().id()); - auto out_type_str = get_out_type_str(expr); + auto out_type_str = get_type_str(expr); declare_variable_with_id(id, out_type_str, out_str); @@ -470,29 +461,25 @@ void IlaSim::dfs_ext_op(std::stringstream& dfs_simulator, std::string& indent, } } else { if (qemu_device_) { - std::string buff = ""; - buff += indent; - buff += fmt::format("{} = static_cast({});\n", out_str, - expr->sort()->bit_width(), arg_str); - buff += indent; - buff += fmt::format("{0} = ({1} >> {2}) ? static_cast(~{1}) : " - "static_cast({1});\n", - out_str, arg_str, (arg->sort()->bit_width() - 1), - expr->sort()->bit_width()); - buff += indent; - buff += fmt::format("{0} = ({1} >> {2}) ? (~{0}) : {0};\n", out_str, - arg_str, (arg->sort()->bit_width() - 1)); - dfs_simulator << buff; + dfs_simulator << fmt::format( + "{0}{1} = static_cast({2});\n" + "{0}{1} = ({2} >> {4}) ? static_cast(~{2})\n" + "{0} : static_cast({2});\n" + "{0}{1} = ({2} >> {4}) ? (~{1}) : {1};\n", + indent, // 0 + out_str, // 1 + arg_str, // 2 + expr->sort()->bit_width(), // 3 + (arg->sort()->bit_width() - 1) // 4 + ); } else { - // FIXME why? this seems redundant... - std::string buff = ""; - buff += indent; - buff += fmt::format("{0} = ({1}[{2}] == 1) ? (~{1}): {1};\n", out_str, - arg_str, (arg->sort()->bit_width() - 1)); - buff += indent; - buff += fmt::format("{0} = ({1}[{2}] == 1) ? (~{0}) : {0};\n", out_str, - arg_str, (arg->sort()->bit_width() - 1)); - dfs_simulator << buff; + dfs_simulator << fmt::format("{0}{1} = ({2}[{3}] == 1) ? (~{2}) : {2};\n" + "{0}{1} = ({2}[{3}] == 1) ? (~{1}) : {1};\n", + indent, // 0 + out_str, // 1 + arg_str, // 2 + (arg->sort()->bit_width() - 1) // 3 + ); } } } @@ -514,7 +501,7 @@ void IlaSim::dfs_func_op(std::stringstream& dfs_simulator, std::string& indent, dfs_uninterpreted_func_decl(func); } auto out_str = "c_" + std::to_string(expr->name().id()); - auto out_type_str = get_out_type_str(expr); + auto out_type_str = get_type_str(expr); declare_variable_with_id(id, out_type_str, out_str); dfs_simulator << indent << out_str << " = " << func_name << "("; @@ -533,7 +520,7 @@ void IlaSim::dfs_ite_op(std::stringstream& dfs_simulator, std::string& indent, auto true_str = get_arg_str(expr->arg(1)); auto false_str = get_arg_str(expr->arg(2)); auto out_str = "c_" + std::to_string(expr->name().id()); - auto out_type_str = get_out_type_str(expr); + auto out_type_str = get_type_str(expr); if (!expr->is_mem()) { declare_variable_with_id(id, out_type_str, out_str); diff --git a/src/target-sc/ila_sim.cc b/src/target-sc/ila_sim.cc index 61dde9f5b..c8024c9c1 100644 --- a/src/target-sc/ila_sim.cc +++ b/src/target-sc/ila_sim.cc @@ -33,6 +33,16 @@ void IlaSim::sim_gen(std::string export_dir, bool external_mem, bool readable, if (cmake_support_) { auto res = os_portable_mkdir(export_dir); ILA_INFO_IF(res) << "Create new dir " << export_dir; + + auto source_dir = os_portable_append_dir(export_dir, "src"); + auto header_dir = os_portable_append_dir(export_dir, "include"); + auto extern_dir = os_portable_append_dir(export_dir, "extern"); + auto scmain_dir = os_portable_append_dir(export_dir, "app"); + + os_portable_mkdir(source_dir); + os_portable_mkdir(header_dir); + os_portable_mkdir(extern_dir); + os_portable_mkdir(scmain_dir); } sim_gen_init(export_dir, external_mem, readable, qemu_device); @@ -102,7 +112,7 @@ void IlaSim::sim_gen_init_header() { header_ << header_indent_ << fmt::format( "typedef number > uint{0}_t;\n", + "unsigned_magnitude, unchecked, void>> uint{0}_t;\n", std::to_string(*int_width)); } header_ << header_indent_ << "#include \n"; @@ -167,7 +177,7 @@ void IlaSim::sim_gen_decode() { ILA_INFO << "current_ila_instr:" << current_ila->instr(i)->name(); create_decode(current_ila->instr(i)); } - ILA_INFO << std::endl; + ILA_INFO << "\n"; } DebugLog::Disable("ILA hierarchy"); } @@ -237,8 +247,6 @@ void IlaSim::sim_gen_execute_invoke() { header_ << header_indent_ << "SC_METHOD(compute);\n"; header_ << header_indent_ << "sensitive"; for (unsigned int i = 0; i < model_ptr_->input_num(); i++) { - header_ << " << " << model_ptr_->name() << "_" - << model_ptr_->input(i)->name() << "_in"; header_ << fmt::format(" << {}_{}_in", model_ptr_->name().str(), model_ptr_->input(i)->name().str()); } @@ -254,6 +262,11 @@ void IlaSim::sim_gen_execute_invoke() { void IlaSim::sim_gen_export() { std::ofstream outFile; auto file_name = fmt::format("{}.h", model_ptr_->name().str()); + + if (cmake_support_) { + file_name = os_portable_append_dir("include", file_name); + } + outFile.open(os_portable_append_dir(export_dir_, file_name)); outFile << header_.rdbuf(); outFile.close(); @@ -301,38 +314,13 @@ void IlaSim::generate_cmake_support() { auto extern_dir = os_portable_append_dir(export_dir_, "extern"); auto scmain_dir = os_portable_append_dir(export_dir_, "app"); - // move files - os_portable_mkdir(source_dir); - os_portable_mkdir(header_dir); - os_portable_mkdir(extern_dir); - os_portable_mkdir(scmain_dir); - - for (auto f : source_file_list_) { - auto src = os_portable_append_dir(export_dir_, f); - auto dst = os_portable_append_dir(source_dir, f); - if (os_portable_compare_file(src, dst)) { - os_portable_remove_file(src); - } else { - os_portable_move_file_to_dir(src, dst); - } - } - - for (auto f : header_file_list_) { - auto src = os_portable_append_dir(export_dir_, f); - auto dst = os_portable_append_dir(header_dir, f); - if (os_portable_compare_file(src, dst)) { - os_portable_remove_file(src); - } else { - os_portable_move_file_to_dir(src, dst); - } - } - // gen recipe std::stringstream fb; - fb << fmt::format("# CMakeLists.txt for {}\n", proj); - fb << "cmake_minimum_required(VERSION 3.9.6)\n"; - fb << fmt::format("project({} LANGUAGES CXX)\n\n", proj); + fb << fmt::format("# CMakeLists.txt for {0}\n" + "cmake_minimum_required(VERSION 3.9.6)\n" + "project({0} LANGUAGES CXX)\n\n", + proj); // system c lib searching #if 0 @@ -369,16 +357,18 @@ void IlaSim::generate_cmake_support() { << "set(CMAKE_CXX_STANDARD ${SystemC_CXX_STANDARD})\n\n"; #endif - fb << "aux_source_directory(extern extern_src)\n"; - fb << fmt::format("add_executable({}\n", proj); - fb << " ${CMAKE_CURRENT_SOURCE_DIR}/app/main.cc\n"; + fb << fmt::format("aux_source_directory(extern extern_src)\n" + "add_executable({}\n" + " ${{CMAKE_CURRENT_SOURCE_DIR}}/app/main.cc\n", + proj); for (auto f : source_file_list_) { fb << fmt::format(" ${{CMAKE_CURRENT_SOURCE_DIR}}/src/{}\n", f); } fb << " ${extern_src})\n"; - fb << fmt::format("target_include_directories({} PRIVATE include)\n", proj); - fb << fmt::format("target_link_libraries({} SystemC::systemc)\n", proj); + fb << fmt::format("target_include_directories({0} PRIVATE include)\n" + "target_link_libraries({0} SystemC::systemc)\n", + proj); std::ofstream fw(file); fw << fb.rdbuf(); @@ -389,14 +379,13 @@ void IlaSim::generate_cmake_support() { if (!os_portable_compare_file(app_template, app_template)) { // no file exist, create template fb.clear(); - fb << "#include \n"; - fb << fmt::format("#include <{}.h>\n\n", proj); - fb << "int sc_main(int argc, char* argv[]) {\n"; - // fb << fmt::format(" {} sim();\n", proj); - // fb << " sc_start();\n"; - // fb << " return (0);\n"; - fb << "return 0; \n"; - fb << "}"; + + fb << fmt::format("#include \n" + "#include <{0}.h>\n\n" + "int sc_main(int argc, char* argv[]) {{\n" + " return 0; \n" + "}}\n", + proj); fw.open(app_template); fw << fb.rdbuf(); diff --git a/src/target-sc/sim_gen_decode.cc b/src/target-sc/sim_gen_decode.cc index 3cd6ee4b8..a9eb14770 100644 --- a/src/target-sc/sim_gen_decode.cc +++ b/src/target-sc/sim_gen_decode.cc @@ -88,8 +88,13 @@ void IlaSim::decode_return(std::stringstream& decode_function, void IlaSim::decode_export(std::stringstream& decode_function, std::string& decode_func_name) { std::ofstream outFile; - std::stringstream out_file; // FIXME not used? - outFile.open(os_portable_append_dir(export_dir_, decode_func_name + ".cc")); + + auto file_name = fmt::format("{}.cc", decode_func_name); + if (cmake_support_) { + file_name = os_portable_append_dir("src", file_name); + } + + outFile.open(os_portable_append_dir(export_dir_, file_name)); outFile << decode_function.rdbuf(); outFile.close(); } diff --git a/src/target-sc/sim_gen_execute.cc b/src/target-sc/sim_gen_execute.cc index 36491fd2e..76223cc5d 100644 --- a/src/target-sc/sim_gen_execute.cc +++ b/src/target-sc/sim_gen_execute.cc @@ -94,7 +94,10 @@ void IlaSim::execute_instruction(std::stringstream& execute_kernel, if (EXTERNAL_MEM_) { execute_external_mem_load_end(execute_kernel, indent); } + // print current instruction information to the terminal + execute_kernel << "#ifdef ILATOR_VERBOSE\n"; + execute_kernel << indent << "instr_log << " << "\"Instr NO.\" << " << "std::to_string(instr_cntr) << "; @@ -107,6 +110,8 @@ void IlaSim::execute_instruction(std::stringstream& execute_kernel, execute_kernel << "\"is activated\\n\"; \n"; execute_kernel << indent << "instr_cntr++;\n"; + execute_kernel << "#endif // ILATOR_VERBOSE\n"; + decrease_indent(indent); execute_kernel << indent << "}\n"; } @@ -132,29 +137,34 @@ void IlaSim::execute_state_update_func(std::stringstream& execute_kernel, std::string& indent, const InstrPtr& instr_expr, const ExprPtr& updated_state) { - auto updated_state_type = get_out_type_str(updated_state); + auto updated_state_type = get_type_str(updated_state); - std::string updated_state_name = - updated_state->host()->name().str() + "_" + updated_state->name().str(); + auto updated_state_name = + fmt::format("{}_{}", updated_state->host()->name().str(), + updated_state->name().str()); - std::string decode_func_name; - if (readable_) { - decode_func_name = "decode_" + instr_expr->host()->name().str() + "_" + - instr_expr->name().str(); - } else { - decode_func_name = - "decode_" + std::to_string(instr_expr->decode()->name().id()); - } - std::string state_update_func_name = - decode_func_name + "_update_" + updated_state_name; - std::string mem_update_map = state_update_func_name + "_map"; + auto decode_func_name = + (readable_) + ? fmt::format("decode_{}_{}", instr_expr->host()->name().str(), + instr_expr->name().str()) + : fmt::format("decode_{}", instr_expr->decode()->name().id()); + + auto state_update_func_name = + fmt::format("{}_update_{}", decode_func_name, updated_state_name); + + auto mem_update_map = state_update_func_name + "_map"; if (updated_state->is_mem()) { - execute_kernel << indent << state_update_func_name << "(" << mem_update_map - << ");\n"; + execute_kernel << fmt::format("{0}{1}({2});\n", indent, // 0 + state_update_func_name, // 1 + mem_update_map // 2 + ); } else { - execute_kernel << indent << updated_state_type << updated_state_name - << "_next = " << state_update_func_name << "();\n"; + execute_kernel << fmt::format("{0}{1} {2}_next = {3}();\n", indent, // 0 + updated_state_type, // 1 + updated_state_name, // 2 + state_update_func_name // 3 + ); } } @@ -162,37 +172,35 @@ void IlaSim::execute_update_state(std::stringstream& execute_kernel, std::string& indent, const InstrPtr& instr_expr, const ExprPtr& updated_state) { - std::string updated_state_name = - updated_state->host()->name().str() + "_" + updated_state->name().str(); - std::string decode_func_name; - if (readable_) { - decode_func_name = "decode_" + instr_expr->host()->name().str() + "_" + - instr_expr->name().str(); - } else { - decode_func_name = - "decode_" + std::to_string(instr_expr->decode()->name().id()); - } - std::string state_update_func_name = - decode_func_name + "_update_" + updated_state_name; - std::string mem_update_map = state_update_func_name + "_map"; + auto updated_state_name = + fmt::format("{}_{}", updated_state->host()->name().str(), + updated_state->name().str()); + + auto decode_func_name = + (readable_) + ? fmt::format("decode_{}_{}", instr_expr->host()->name().str(), + instr_expr->name().str()) + : fmt::format("decode_{}", instr_expr->decode()->name().id()); + + auto state_update_func_name = + fmt::format("{}_update_{}", decode_func_name, updated_state_name); + + auto mem_update_map = state_update_func_name + "_map"; if (updated_state->is_mem()) { if (EXTERNAL_MEM_) { return; } - execute_kernel << indent; execute_kernel << fmt::format( - "for (auto it = {0}.begin(); it != {0}.end(); it++) {{\n", - mem_update_map); + "{0}for (auto it = {1}.begin(); it != {1}.end(); it++) {{\n" + "{0} {2}[it->first] = it->second;\n" + "{0}}}\n", + indent, // 0 + mem_update_map, // 1 + updated_state_name // 2 + ); - increase_indent(indent); - - execute_kernel << indent; - execute_kernel << fmt::format("{}[it->first] = it->second;\n", - updated_state_name); - decrease_indent(indent); - execute_kernel << indent << "}\n"; } else { execute_kernel << indent; execute_kernel << fmt::format("{0} = {0}_next;\n", updated_state_name); @@ -218,11 +226,12 @@ void IlaSim::execute_external_mem_load_begin(std::stringstream& execute_kernel, } if (!dfs_ld_search_set_.empty()) { execute_kernel << indent << "if ("; - for (auto iter = dfs_ld_search_set_.begin(); - iter != dfs_ld_search_set_.end(); iter++) { - execute_kernel << "((c_" << (*iter) << "_ctrl == 0) | " - << "(c_" << (*iter) << "_ctrl == 2)) & "; + + for (auto& elem : dfs_ld_search_set_) { + execute_kernel << fmt::format( + "((c_{0}_ctrl == 0) | (c_{0}_ctrl == 2)) & ", elem); } + execute_kernel << "1) {\n"; increase_indent(indent); } @@ -242,56 +251,37 @@ void IlaSim::execute_write_external_mem(std::stringstream& execute_kernel, for (auto it = external_st_set_.begin(); it != external_st_set_.end(); it++) { std::string mem_iterator = it->mem_map + "_iter"; std::string mem_map = it->mem_map + "_map"; - std::string mem_map_size = mem_map + ".size()"; std::string mem_write_valid = it->mem_str + "_write_valid"; std::string mem_write_ready = it->mem_str + "_write_ready"; std::string mem_write_address = it->mem_str + "_write_address"; std::string mem_write_data = it->mem_str + "_write_data"; - std::string buff = ""; - - buff += indent; - buff += fmt::format("if ({} < {}) {{\n", mem_iterator, mem_map_size); - - increase_indent(indent); - - buff += indent; - buff += fmt::format("{}.write(1);\n", mem_write_valid); - buff += indent; - buff += fmt::format("auto it = {}.begin();\n", mem_map); - buff += indent; - buff += fmt::format("for (int i = 0; i < {}; i++)\n", mem_iterator); - buff += indent + " it++;\n"; - buff += indent; - buff += fmt::format("{}.write(it->first);\n", mem_write_address); - buff += indent; - buff += fmt::format("{}.write(it->second);\n", mem_write_data); - - decrease_indent(indent); - - buff += indent + "}\n"; - buff += indent; - buff += fmt::format("if ({} < {}.size()) {{\n", mem_iterator, mem_map); - - increase_indent(indent); - - buff += indent; - buff += fmt::format("if ({}.read() == 1)\n", mem_write_ready); - - increase_indent(indent); - - buff += indent; - buff += fmt::format("{}++;\n", mem_iterator); - - decrease_indent(indent); - - buff += indent + "return;\n"; - - decrease_indent(indent); - - buff += indent + "}\n"; - - execute_kernel << buff; + execute_kernel << fmt::format("{0}if ({1} < {2}.size()) {{\n" + "{0} {3}.write(1);\n" + "{0} auto it = {2}.begin();\n" + "{0} for (int i = 0; i < {1}; i++)\n" + "{0} it++;\n" + "{0} {4}.write(it->first);\n" + "{0} {5}.write(it->second);\n" + "{0}}}\n", + indent, // 0 + mem_iterator, // 1 + mem_map, // 2 + mem_write_valid, // 3 + mem_write_address, // 4 + mem_write_data // 5 + ); + + execute_kernel << fmt::format("{0}if ({1} < {2}.size()) {{\n" + "{0} if ({3}.read() == 1)\n" + "{0} {1}++;\n" + "{0} return;\n" + "{0}}}\n", + indent, // 0 + mem_iterator, // 1 + mem_map, // 2 + mem_write_ready // 3 + ); } } @@ -304,33 +294,35 @@ void IlaSim::execute_read_external_mem(std::stringstream& execute_kernel, auto mem_read_address = it->mem_str + "_read_address"; auto mem_read_data = it->mem_str + "_data"; - execute_kernel << indent << "if (" << mem_read_ctrl << " == 1) {\n"; - increase_indent(indent); - execute_kernel << indent << "if (" << mem_read_valid << ".read() == 1) {\n"; - increase_indent(indent); - execute_kernel << indent << mem_read_ctrl << " = 2;\n"; - execute_kernel << indent << it->dest_str << " = " << mem_read_data - << ".read();\n"; - execute_kernel << indent << mem_read_ready << ".write(0);\n"; - decrease_indent(indent); - execute_kernel << indent << "} else {\n"; - increase_indent(indent); - execute_kernel << indent << mem_read_address << ".write(" << it->addr_str - << ");\n"; - execute_kernel << indent << mem_read_ready << ".write(1);\n"; - execute_kernel << indent << "return;\n"; - decrease_indent(indent); - execute_kernel << indent << "}\n"; - decrease_indent(indent); - execute_kernel << indent << "}\n"; + execute_kernel << fmt::format("{0}if ({1} == 1) {{\n" + "{0} if ({2}.read() == 1) {{\n" + "{0} {1} = 2;\n" + "{0} {3} = {4}.read();\n" + "{0} {5}.write(0);\n" + "{0} }} else {{\n" + "{0} {6}.write({7});\n" + "{0} {5}.write(1);\n" + "{0} return;\n" + "{0} }}\n" + "{0}}}\n", + indent, // 0 + mem_read_ctrl, // 1 + mem_read_valid, // 2 + it->dest_str, // 3 + mem_read_data, // 4 + mem_read_ready, // 5 + mem_read_address, // 6 + it->addr_str // 7 + ); } } void IlaSim::execute_external_mem_before_input( std::stringstream& execute_kernel, std::string& indent) { execute_kernel << indent << "if ("; - for (auto it = external_ld_set_.begin(); it != external_ld_set_.end(); it++) - execute_kernel << "(" << it->dest_str << "_ctrl == 0) & "; + for (auto it = external_ld_set_.begin(); it != external_ld_set_.end(); it++) { + execute_kernel << fmt::format("({}_ctrl == 0) & ", it->dest_str); + } execute_kernel << "1) {\n"; increase_indent(indent); } @@ -401,7 +393,13 @@ void IlaSim::execute_write_output(std::stringstream& execute_kernel, void IlaSim::execute_kernel_export(std::stringstream& execute_kernel) { std::ofstream outFile; - outFile.open(os_portable_append_dir(export_dir_, "compute.cc")); + + std::string file_name = "compute.cc"; + if (cmake_support_) { + file_name = os_portable_append_dir("src", file_name); + } + + outFile.open(os_portable_append_dir(export_dir_, file_name)); outFile << execute_kernel.rdbuf(); outFile.close(); } diff --git a/src/target-sc/sim_gen_init.cc b/src/target-sc/sim_gen_init.cc index 16af0b7c7..a285b1792 100644 --- a/src/target-sc/sim_gen_init.cc +++ b/src/target-sc/sim_gen_init.cc @@ -92,9 +92,13 @@ void IlaSim::init_return(std::stringstream& init_function, void IlaSim::init_export(std::stringstream& init_function, std::string& init_func_name) { std::ofstream outFile; - // FIXME no use? - std::stringstream out_file; - outFile.open(os_portable_append_dir(export_dir_, init_func_name + ".cc")); + + auto file_name = fmt::format("{}.cc", init_func_name); + if (cmake_support_) { + file_name = os_portable_append_dir("src", file_name); + } + + outFile.open(os_portable_append_dir(export_dir_, file_name)); outFile << init_function.rdbuf(); outFile.close(); } diff --git a/src/target-sc/sim_gen_input.cc b/src/target-sc/sim_gen_input.cc index 264f00af5..5e9bd6077 100644 --- a/src/target-sc/sim_gen_input.cc +++ b/src/target-sc/sim_gen_input.cc @@ -1,6 +1,5 @@ -#include - #include +#include #include namespace ilang { diff --git a/src/target-sc/sim_gen_state.cc b/src/target-sc/sim_gen_state.cc index 825f1cd4e..cff969e86 100644 --- a/src/target-sc/sim_gen_state.cc +++ b/src/target-sc/sim_gen_state.cc @@ -94,6 +94,7 @@ void IlaSim::create_external_mem_port(const ExprPtr& expr) { if (state_not_defined) { defined_state_set_.insert(id); + // FIXME sc_in only works in non-qemu mode header_ << fmt::format("{0}sc_in> {1}_read_valid;\n" "{0}sc_in> {1}_read_data;\n" "{0}sc_out> {1}_read_ready;\n" diff --git a/src/target-sc/sim_gen_state_update.cc b/src/target-sc/sim_gen_state_update.cc index b8d564583..0f6458dac 100644 --- a/src/target-sc/sim_gen_state_update.cc +++ b/src/target-sc/sim_gen_state_update.cc @@ -93,10 +93,13 @@ void IlaSim::mem_state_update_decl(std::stringstream& state_update_function, void IlaSim::state_update_export(std::stringstream& state_update_function, std::string& state_update_func_name) { std::ofstream outFile; - // FIXME what use? - std::stringstream out_file; - outFile.open( - os_portable_append_dir(export_dir_, state_update_func_name + ".cc")); + + auto file_name = fmt::format("{}.cc", state_update_func_name); + if (cmake_support_) { + file_name = os_portable_append_dir("src", file_name); + } + + outFile.open(os_portable_append_dir(export_dir_, file_name)); outFile << state_update_function.rdbuf(); outFile.close(); } @@ -176,7 +179,7 @@ void IlaSim::state_update_decl(std::stringstream& state_update_function, state_update_func_name, arg_list); if ((updated_state->is_mem()) && (EXTERNAL_MEM_)) { - header_ << header_indent_ << "int " << state_update_func_name << "_iter\n"; + header_ << header_indent_ << "int " << state_update_func_name << "_iter;\n"; auto mem_map_str = state_update_func_name; auto mem_str = updated_state->host()->name().str() + "_" + updated_state->name().str(); diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index fcc979a87..5571694ef 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -61,6 +61,7 @@ package_add_test(${ILANG_TEST_MAIN} t_hash_ast.cc t_ila.cc t_ila_sim.cc + t_ila_sim_cmake.cc t_instr.cc t_instr_seq.cc t_keyvec.cc diff --git a/test/t_ila_sim.cc b/test/t_ila_sim.cc index 34c58d0a6..0c1fbbf60 100644 --- a/test/t_ila_sim.cc +++ b/test/t_ila_sim.cc @@ -30,7 +30,7 @@ int get_word_number(std::string& s) { return count; } -TEST(TestIlaSimSC, hashed_file_name) { +TEST(DISABLED_TestIlaSimSC, hashed_file_name) { // This test should be muted, if the basic structure of ILA is changed, // such as how state/decode/state_update are changed. // Specifically, the test on "decode_stream" and "update_stream". @@ -114,7 +114,7 @@ TEST(TestIlaSimSC, hashed_file_name) { } } -TEST(TestIlaSimSC, readable_file_name) { +TEST(DISABLED_TestIlaSimSC, readable_file_name) { IlaSimTest ila_sim_test; IlaSim ila_sim; ila_sim.set_instr_lvl_abs(ila_sim_test.model.get()); @@ -197,7 +197,7 @@ TEST(TestIlaSimSC, readable_file_name) { } } -TEST(TestIlaSimSC, external_mem) { +TEST(DISABLED_TestIlaSimSC, external_mem) { IlaSimTest ila_sim_test; IlaSim ila_sim(ila_sim_test.model.get()); ila_sim.set_systemc_path("/home/yuex/bin/systemc-2.3.1/"); @@ -260,7 +260,7 @@ TEST(TestIlaSimSC, external_mem) { } } -TEST(TestIlaSimQemu, hashed_file_name) { +TEST(DISABLED_TestIlaSimQemu, hashed_file_name) { // This test should be muted, if the basic structure of ILA is changed, // such as how state/decode/state_update are changed. // Specifically, the test on "decode_stream" and "update_stream". @@ -310,7 +310,7 @@ TEST(TestIlaSimQemu, hashed_file_name) { } } -TEST(TestIlaSimQemu, readable_file_name) { +TEST(DISABLED_TestIlaSimQemu, readable_file_name) { IlaSimTest ila_sim_test; IlaSim ila_sim; ila_sim.set_instr_lvl_abs(ila_sim_test.model.get()); diff --git a/test/t_ila_sim_cmake.cc b/test/t_ila_sim_cmake.cc new file mode 100644 index 000000000..d112b6edf --- /dev/null +++ b/test/t_ila_sim_cmake.cc @@ -0,0 +1,88 @@ +#include + +//#include +//#include +//#include + +#include +#include +#include + +#include "unit-include/config.h" +#include "unit-include/ila_sim_test.h" +#include "unit-include/util.h" + +namespace ilang { + +class TestIlaSimCMake : public ::testing::Test { +public: + TestIlaSimCMake() {} + ~TestIlaSimCMake() {} + + void SetUp() { + out_dir = GetRandomFileName(fs::temp_directory_path()); + os_portable_mkdir(out_dir); + + ilator.set_instr_lvl_abs(m.model.get()); + ilator.enable_cmake_support(); + } + + void TearDown() { + // for CI tests, may be needed for out-of-scope build tests + os_portable_remove_directory(out_dir); + } + + IlaSimTest m; + IlaSim ilator; + fs::path out_dir; + + void SanityCheck() { + // TODO config and build + // - setup systemc lib in CI + // - provide uninterpreted func impl. for all + // - provide external memory for T** + } + +}; // TestIlaSimCmake + +TEST_F(TestIlaSimCMake, FFF) { + ilator.sim_gen(out_dir, false, false, false); + SanityCheck(); +} + +TEST_F(TestIlaSimCMake, FFT) { + ilator.sim_gen(out_dir, false, false, true); + SanityCheck(); +} + +TEST_F(TestIlaSimCMake, FTF) { + ilator.sim_gen(out_dir, false, true, false); + SanityCheck(); +} + +TEST_F(TestIlaSimCMake, FTT) { + ilator.sim_gen(out_dir, false, true, true); + SanityCheck(); +} + +TEST_F(TestIlaSimCMake, TFF) { + ilator.sim_gen(out_dir, true, false, false); + SanityCheck(); +} + +TEST_F(TestIlaSimCMake, DISABLED_TFT) { + ilator.sim_gen(out_dir, true, false, true); + SanityCheck(); +} + +TEST_F(TestIlaSimCMake, TTF) { + ilator.sim_gen(out_dir, true, true, false); + SanityCheck(); +} + +TEST_F(TestIlaSimCMake, DISABLED_TTT) { + ilator.sim_gen(out_dir, true, true, true); + SanityCheck(); +} + +} // namespace ilang diff --git a/test/unit-data/ila_sim_test/compute_external_mem.cc b/test/unit-data/ila_sim_test/compute_external_mem.cc deleted file mode 100644 index 754465fe6..000000000 --- a/test/unit-data/ila_sim_test/compute_external_mem.cc +++ /dev/null @@ -1,90 +0,0 @@ -#include "systemc.h" -#include "TEST.h" -void TEST::compute() { - if (decode_1692064_update_TEST_XRAM_iter < decode_1692064_update_TEST_XRAM_map.size()) { - TEST_XRAM_write_valid.write(1); - std::map::iterator it = decode_1692064_update_TEST_XRAM_map.begin(); - for (int i = 0; i < decode_1692064_update_TEST_XRAM_iter; i++) - it++; - TEST_XRAM_write_address.write(it->first); - TEST_XRAM_write_data.write(it->second); - } - if (decode_1692064_update_TEST_XRAM_iter < decode_1692064_update_TEST_XRAM_map.size()) { - if (TEST_XRAM_write_ready.read() == 1) - decode_1692064_update_TEST_XRAM_iter++; - return; - } - if (c_1691774_ctrl == 1) { - if (TEST_XRAM_read_valid.read() == 1) { - c_1691774_ctrl = 2; - c_1691774 = TEST_XRAM_data.read(); - TEST_XRAM_read_ready.write(0); - } else { - TEST_XRAM_read_address.write(c_1691773.to_int()); - TEST_XRAM_read_ready.write(1); - return; - } - } - if ((c_1691774_ctrl == 0) & 1) { - TEST_cmd = TEST_cmd_in.read(); - TEST_cmdaddr = TEST_cmdaddr_in.read(); - TEST_cmddata = TEST_cmddata_in.read(); - TEST_cmdflag = TEST_cmdflag_in.read(); - } - if (decode_1691690()) { - sc_biguint<16> TEST_address_next = decode_1691690_update_TEST_address(); - bool TEST_flag_next = decode_1691690_update_TEST_flag(); - TEST_address = TEST_address_next; - TEST_flag = TEST_flag_next; - } - if (decode_1691729()) { - sc_biguint<2> TEST_status_next = decode_1691729_update_TEST_status(); - TEST_status = TEST_status_next; - } - init_ENCRYPT(); - while (1) { - int schedule_counter = 0; - if (decode_1691765()) { - sc_biguint<4> ENCRYPT_byte_cnt_next = decode_1691765_update_ENCRYPT_byte_cnt(); - sc_biguint<128> ENCRYPT_rd_data_next = decode_1691765_update_ENCRYPT_rd_data(); - sc_biguint<2> TEST_status_next = decode_1691765_update_TEST_status(); - if (((c_1691774_ctrl == 0) | (c_1691774_ctrl == 2)) & 1) { - ENCRYPT_byte_cnt = ENCRYPT_byte_cnt_next; - ENCRYPT_rd_data = ENCRYPT_rd_data_next; - TEST_status = TEST_status_next; - schedule_counter++; - } - } - if (decode_1692042()) { - sc_biguint<128> ENCRYPT_enc_data_next = decode_1692042_update_ENCRYPT_enc_data(); - sc_biguint<2> TEST_status_next = decode_1692042_update_TEST_status(); - ENCRYPT_enc_data = ENCRYPT_enc_data_next; - TEST_status = TEST_status_next; - schedule_counter++; - } - if (decode_1692064()) { - decode_1692064_update_TEST_XRAM(decode_1692064_update_TEST_XRAM_map); - sc_biguint<16> ENCRYPT_blk_cnt_next = decode_1692064_update_ENCRYPT_blk_cnt(); - sc_biguint<4> ENCRYPT_byte_cnt_next = decode_1692064_update_ENCRYPT_byte_cnt(); - sc_biguint<2> TEST_status_next = decode_1692064_update_TEST_status(); - ENCRYPT_blk_cnt = ENCRYPT_blk_cnt_next; - ENCRYPT_byte_cnt = ENCRYPT_byte_cnt_next; - TEST_status = TEST_status_next; - schedule_counter++; - } - if (schedule_counter == 0) - break; - } - if ((decode_1692064_update_TEST_XRAM_iter < decode_1692064_update_TEST_XRAM_map.size())) - return; - if ((c_1691774_ctrl == 1)) - return; - c_1691774_ctrl = 0; - decode_1692064_update_TEST_XRAM_map.clear(); - decode_1692064_update_TEST_XRAM_iter = 0; - TEST_status_out.write(TEST_status); - TEST_address_out.write(TEST_address); - TEST_length_out.write(TEST_length); - TEST_counter_out.write(TEST_counter); - TEST_flag_out.write(TEST_flag); -}; diff --git a/test/unit-data/ila_sim_test/decode_115572.cc b/test/unit-data/ila_sim_test/decode_115572.cc deleted file mode 100644 index c4cb7d0ea..000000000 --- a/test/unit-data/ila_sim_test/decode_115572.cc +++ /dev/null @@ -1,18 +0,0 @@ -#include "systemc.h" -#include "test.h" -bool TEST::decode_115572() { - c_115544 = TEST_cmd == 1; - c_115540 = TEST_cmd == 2; - c_115546 = (c_115544 | c_115540); - if (!c_115546) { - return false; - } - c_115569 = TEST_cmd == 2; - c_115562 = TEST_cmdaddr == 65282; - c_115564 = TEST_cmdaddr > 65282; - c_115566 = (c_115562 | c_115564); - c_115571 = (c_115569 & c_115566); - c_115558 = TEST_cmdaddr < 65284; - c_115572 = (c_115571 & c_115558); - return c_115572; -}; diff --git a/test/unit-data/ila_sim_test/decode_115572_update_TEST_address.cc b/test/unit-data/ila_sim_test/decode_115572_update_TEST_address.cc deleted file mode 100644 index cffc584be..000000000 --- a/test/unit-data/ila_sim_test/decode_115572_update_TEST_address.cc +++ /dev/null @@ -1,14 +0,0 @@ -#include "systemc.h" -#include "test.h" -sc_biguint<16> TEST::decode_115572_update_TEST_address() { - c_115549 = TEST_status == 0; - c_115584 = TEST_cmdaddr == 65283; - c_115580 = TEST_address.range(15, 8); - c_115586 = (c_115584) ? TEST_cmddata : c_115580; - c_115577 = TEST_cmdaddr == 65282; - c_115573 = TEST_address.range(7, 0); - c_115579 = (c_115577) ? TEST_cmddata : c_115573; - c_115591 = (c_115586, c_115579); - c_115593 = (c_115549) ? c_115591 : TEST_address; - return c_115593; -}; diff --git a/test/unit-data/ila_sim_test/decode_TEST_WRITE_ADDRESS.cc b/test/unit-data/ila_sim_test/decode_TEST_WRITE_ADDRESS.cc deleted file mode 100644 index 58e98f927..000000000 --- a/test/unit-data/ila_sim_test/decode_TEST_WRITE_ADDRESS.cc +++ /dev/null @@ -1,18 +0,0 @@ -#include "systemc.h" -#include "TEST.h" -bool TEST::decode_TEST_WRITE_ADDRESS() { - c_1690967 = TEST_cmd == 1; - c_1690963 = TEST_cmd == 2; - c_1690969 = (c_1690967 | c_1690963); - if (!c_1690969) { - return false; - } - c_1690992 = TEST_cmd == 2; - c_1690985 = TEST_cmdaddr == 65282; - c_1690987 = TEST_cmdaddr > 65282; - c_1690989 = (c_1690985 | c_1690987); - c_1690994 = (c_1690992 & c_1690989); - c_1690981 = TEST_cmdaddr < 65284; - c_1690995 = (c_1690994 & c_1690981); - return c_1690995; -}; diff --git a/test/unit-data/ila_sim_test/decode_TEST_WRITE_ADDRESS_qemu.cc b/test/unit-data/ila_sim_test/decode_TEST_WRITE_ADDRESS_qemu.cc deleted file mode 100644 index 8322aa5f3..000000000 --- a/test/unit-data/ila_sim_test/decode_TEST_WRITE_ADDRESS_qemu.cc +++ /dev/null @@ -1,17 +0,0 @@ -#include "TEST.h" -bool TEST::decode_TEST_WRITE_ADDRESS() { - c_1693068 = TEST_cmd == 1; - c_1693064 = TEST_cmd == 2; - c_1693070 = (c_1693068 | c_1693064); - if (!c_1693070) { - return false; - } - c_1693093 = TEST_cmd == 2; - c_1693086 = TEST_cmdaddr == 65282; - c_1693088 = TEST_cmdaddr > 65282; - c_1693090 = (c_1693086 | c_1693088); - c_1693095 = (c_1693093 & c_1693090); - c_1693082 = TEST_cmdaddr < 65284; - c_1693096 = (c_1693095 & c_1693082); - return c_1693096; -}; diff --git a/test/unit-data/ila_sim_test/decode_TEST_WRITE_ADDRESS_update_TEST_address.cc b/test/unit-data/ila_sim_test/decode_TEST_WRITE_ADDRESS_update_TEST_address.cc deleted file mode 100644 index 1b4111dac..000000000 --- a/test/unit-data/ila_sim_test/decode_TEST_WRITE_ADDRESS_update_TEST_address.cc +++ /dev/null @@ -1,16 +0,0 @@ -#include "systemc.h" -#include "TEST.h" -sc_biguint<16> TEST::decode_TEST_WRITE_ADDRESS_update_TEST_address() { - c_1690972 = TEST_status == 0; - c_1691009 = TEST_cmdaddr == 65283; - c_1691006 = (TEST_cmddata/TEST_cmddata); - c_1691004 = TEST_address.range(15, 8); - c_1691011 = (c_1691009) ? c_1691006 : c_1691004; - c_1691001 = TEST_cmdaddr == 65282; - c_1690998 = (TEST_cmddata * TEST_cmddata); - c_1690996 = TEST_address.range(7, 0); - c_1691003 = (c_1691001) ? c_1690998 : c_1690996; - c_1691016 = (c_1691011, c_1691003); - c_1691018 = (c_1690972) ? c_1691016 : TEST_address; - return c_1691018; -}; diff --git a/test/unit-data/ila_sim_test/decode_TEST_WRITE_ADDRESS_update_TEST_address_qemu.cc b/test/unit-data/ila_sim_test/decode_TEST_WRITE_ADDRESS_update_TEST_address_qemu.cc deleted file mode 100644 index d1dea2582..000000000 --- a/test/unit-data/ila_sim_test/decode_TEST_WRITE_ADDRESS_update_TEST_address_qemu.cc +++ /dev/null @@ -1,17 +0,0 @@ -#include "TEST.h" -uint16_t TEST::decode_TEST_WRITE_ADDRESS_update_TEST_address() { - c_1693073 = TEST_status == 0; - c_1693110 = TEST_cmdaddr == 65283; - c_1693107 = (TEST_cmddata/TEST_cmddata); - uint8_t tmp_1693105 = 0 - 1; - c_1693105 = static_cast ((TEST_address >> 8) & tmp_1693105); - c_1693112 = (c_1693110) ? c_1693107 : c_1693105; - c_1693102 = TEST_cmdaddr == 65282; - c_1693099 = (TEST_cmddata * TEST_cmddata); - uint8_t tmp_1693097 = 0 - 1; - c_1693097 = static_cast ((TEST_address >> 0) & tmp_1693097); - c_1693104 = (c_1693102) ? c_1693099 : c_1693097; - c_1693117 = (static_cast(c_1693112) << 8) + (static_cast(c_1693104)); - c_1693119 = (c_1693073) ? c_1693117 : TEST_address; - return c_1693119; -}; diff --git a/test/unit-data/ila_sim_test/mk.sh b/test/unit-data/ila_sim_test/mk.sh deleted file mode 100644 index 9704c30f8..000000000 --- a/test/unit-data/ila_sim_test/mk.sh +++ /dev/null @@ -1,20 +0,0 @@ -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o init_ENCRYPT.o init_ENCRYPT.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1690300.o decode_1690300.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1690339.o decode_1690339.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1690375.o decode_1690375.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1690652.o decode_1690652.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1690674.o decode_1690674.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1690300_update_TEST_address.o decode_1690300_update_TEST_address.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1690300_update_TEST_flag.o decode_1690300_update_TEST_flag.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1690339_update_TEST_status.o decode_1690339_update_TEST_status.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1690375_update_ENCRYPT_byte_cnt.o decode_1690375_update_ENCRYPT_byte_cnt.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1690375_update_ENCRYPT_rd_data.o decode_1690375_update_ENCRYPT_rd_data.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1690375_update_TEST_status.o decode_1690375_update_TEST_status.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1690652_update_ENCRYPT_enc_data.o decode_1690652_update_ENCRYPT_enc_data.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1690652_update_TEST_status.o decode_1690652_update_TEST_status.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1690674_update_TEST_XRAM.o decode_1690674_update_TEST_XRAM.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1690674_update_ENCRYPT_blk_cnt.o decode_1690674_update_ENCRYPT_blk_cnt.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1690674_update_ENCRYPT_byte_cnt.o decode_1690674_update_ENCRYPT_byte_cnt.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1690674_update_TEST_status.o decode_1690674_update_TEST_status.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o compute.o compute.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o uninterpreted_func.o ../../uninterpreted_func/uninterpreted_func.cc -lsystemc diff --git a/test/unit-data/ila_sim_test/mk_external_mem.sh b/test/unit-data/ila_sim_test/mk_external_mem.sh deleted file mode 100644 index 620088968..000000000 --- a/test/unit-data/ila_sim_test/mk_external_mem.sh +++ /dev/null @@ -1,20 +0,0 @@ -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o init_ENCRYPT.o init_ENCRYPT.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1691690.o decode_1691690.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1691729.o decode_1691729.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1691765.o decode_1691765.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1692042.o decode_1692042.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1692064.o decode_1692064.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1691690_update_TEST_address.o decode_1691690_update_TEST_address.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1691690_update_TEST_flag.o decode_1691690_update_TEST_flag.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1691729_update_TEST_status.o decode_1691729_update_TEST_status.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1691765_update_ENCRYPT_byte_cnt.o decode_1691765_update_ENCRYPT_byte_cnt.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1691765_update_ENCRYPT_rd_data.o decode_1691765_update_ENCRYPT_rd_data.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1691765_update_TEST_status.o decode_1691765_update_TEST_status.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1692042_update_ENCRYPT_enc_data.o decode_1692042_update_ENCRYPT_enc_data.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1692042_update_TEST_status.o decode_1692042_update_TEST_status.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1692064_update_TEST_XRAM.o decode_1692064_update_TEST_XRAM.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1692064_update_ENCRYPT_blk_cnt.o decode_1692064_update_ENCRYPT_blk_cnt.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1692064_update_ENCRYPT_byte_cnt.o decode_1692064_update_ENCRYPT_byte_cnt.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_1692064_update_TEST_status.o decode_1692064_update_TEST_status.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o compute.o compute.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o uninterpreted_func.o ../../uninterpreted_func/uninterpreted_func.cc -lsystemc diff --git a/test/unit-data/ila_sim_test/mk_qemu.sh b/test/unit-data/ila_sim_test/mk_qemu.sh deleted file mode 100644 index da07e5d2d..000000000 --- a/test/unit-data/ila_sim_test/mk_qemu.sh +++ /dev/null @@ -1,20 +0,0 @@ -g++ -I./ -c -o init_ENCRYPT.o init_ENCRYPT.cc -g++ -I./ -c -o decode_1692401.o decode_1692401.cc -g++ -I./ -c -o decode_1692440.o decode_1692440.cc -g++ -I./ -c -o decode_1692476.o decode_1692476.cc -g++ -I./ -c -o decode_1692753.o decode_1692753.cc -g++ -I./ -c -o decode_1692775.o decode_1692775.cc -g++ -I./ -c -o decode_1692401_update_TEST_address.o decode_1692401_update_TEST_address.cc -g++ -I./ -c -o decode_1692401_update_TEST_flag.o decode_1692401_update_TEST_flag.cc -g++ -I./ -c -o decode_1692440_update_TEST_status.o decode_1692440_update_TEST_status.cc -g++ -I./ -c -o decode_1692476_update_ENCRYPT_byte_cnt.o decode_1692476_update_ENCRYPT_byte_cnt.cc -g++ -I./ -c -o decode_1692476_update_ENCRYPT_rd_data.o decode_1692476_update_ENCRYPT_rd_data.cc -g++ -I./ -c -o decode_1692476_update_TEST_status.o decode_1692476_update_TEST_status.cc -g++ -I./ -c -o decode_1692753_update_ENCRYPT_enc_data.o decode_1692753_update_ENCRYPT_enc_data.cc -g++ -I./ -c -o decode_1692753_update_TEST_status.o decode_1692753_update_TEST_status.cc -g++ -I./ -c -o decode_1692775_update_TEST_XRAM.o decode_1692775_update_TEST_XRAM.cc -g++ -I./ -c -o decode_1692775_update_ENCRYPT_blk_cnt.o decode_1692775_update_ENCRYPT_blk_cnt.cc -g++ -I./ -c -o decode_1692775_update_ENCRYPT_byte_cnt.o decode_1692775_update_ENCRYPT_byte_cnt.cc -g++ -I./ -c -o decode_1692775_update_TEST_status.o decode_1692775_update_TEST_status.cc -g++ -I./ -c -o compute.o compute.cc -g++ -I./ -c -o help.o ../../uninterpreted_func/uninterpreted_func.cc diff --git a/test/unit-data/ila_sim_test/mk_readable.sh b/test/unit-data/ila_sim_test/mk_readable.sh deleted file mode 100644 index a4d79d89a..000000000 --- a/test/unit-data/ila_sim_test/mk_readable.sh +++ /dev/null @@ -1,20 +0,0 @@ -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o init_ENCRYPT.o init_ENCRYPT.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_TEST_WRITE_ADDRESS.o decode_TEST_WRITE_ADDRESS.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_TEST_START_ENCRYPT.o decode_TEST_START_ENCRYPT.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_ENCRYPT_LOAD.o decode_ENCRYPT_LOAD.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_ENCRYPT_ENC.o decode_ENCRYPT_ENC.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_ENCRYPT_STORE.o decode_ENCRYPT_STORE.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_TEST_WRITE_ADDRESS_update_TEST_address.o decode_TEST_WRITE_ADDRESS_update_TEST_address.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_TEST_WRITE_ADDRESS_update_TEST_flag.o decode_TEST_WRITE_ADDRESS_update_TEST_flag.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_TEST_START_ENCRYPT_update_TEST_status.o decode_TEST_START_ENCRYPT_update_TEST_status.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_ENCRYPT_LOAD_update_ENCRYPT_byte_cnt.o decode_ENCRYPT_LOAD_update_ENCRYPT_byte_cnt.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_ENCRYPT_LOAD_update_ENCRYPT_rd_data.o decode_ENCRYPT_LOAD_update_ENCRYPT_rd_data.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_ENCRYPT_LOAD_update_TEST_status.o decode_ENCRYPT_LOAD_update_TEST_status.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_ENCRYPT_ENC_update_ENCRYPT_enc_data.o decode_ENCRYPT_ENC_update_ENCRYPT_enc_data.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_ENCRYPT_ENC_update_TEST_status.o decode_ENCRYPT_ENC_update_TEST_status.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_ENCRYPT_STORE_update_TEST_XRAM.o decode_ENCRYPT_STORE_update_TEST_XRAM.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_ENCRYPT_STORE_update_ENCRYPT_blk_cnt.o decode_ENCRYPT_STORE_update_ENCRYPT_blk_cnt.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_ENCRYPT_STORE_update_ENCRYPT_byte_cnt.o decode_ENCRYPT_STORE_update_ENCRYPT_byte_cnt.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o decode_ENCRYPT_STORE_update_TEST_status.o decode_ENCRYPT_STORE_update_TEST_status.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o compute.o compute.cc -lsystemc -g++ -I. -I /home/yuex/bin/systemc-2.3.1//include/ -L. -L /home/yuex/bin/systemc-2.3.1//lib-linux64/ -Wl,-rpath=/home/yuex/bin/systemc-2.3.1//lib-linux64/ -std=c++11 -c -o uninterpreted_func.o ../../uninterpreted_func/uninterpreted_func.cc -lsystemc diff --git a/test/unit-data/ila_sim_test/mk_readable_qemu.sh b/test/unit-data/ila_sim_test/mk_readable_qemu.sh deleted file mode 100644 index 1a8ea0edc..000000000 --- a/test/unit-data/ila_sim_test/mk_readable_qemu.sh +++ /dev/null @@ -1,20 +0,0 @@ -g++ -I./ -c -o init_ENCRYPT.o init_ENCRYPT.cc -g++ -I./ -c -o decode_TEST_WRITE_ADDRESS.o decode_TEST_WRITE_ADDRESS.cc -g++ -I./ -c -o decode_TEST_START_ENCRYPT.o decode_TEST_START_ENCRYPT.cc -g++ -I./ -c -o decode_ENCRYPT_LOAD.o decode_ENCRYPT_LOAD.cc -g++ -I./ -c -o decode_ENCRYPT_ENC.o decode_ENCRYPT_ENC.cc -g++ -I./ -c -o decode_ENCRYPT_STORE.o decode_ENCRYPT_STORE.cc -g++ -I./ -c -o decode_TEST_WRITE_ADDRESS_update_TEST_address.o decode_TEST_WRITE_ADDRESS_update_TEST_address.cc -g++ -I./ -c -o decode_TEST_WRITE_ADDRESS_update_TEST_flag.o decode_TEST_WRITE_ADDRESS_update_TEST_flag.cc -g++ -I./ -c -o decode_TEST_START_ENCRYPT_update_TEST_status.o decode_TEST_START_ENCRYPT_update_TEST_status.cc -g++ -I./ -c -o decode_ENCRYPT_LOAD_update_ENCRYPT_byte_cnt.o decode_ENCRYPT_LOAD_update_ENCRYPT_byte_cnt.cc -g++ -I./ -c -o decode_ENCRYPT_LOAD_update_ENCRYPT_rd_data.o decode_ENCRYPT_LOAD_update_ENCRYPT_rd_data.cc -g++ -I./ -c -o decode_ENCRYPT_LOAD_update_TEST_status.o decode_ENCRYPT_LOAD_update_TEST_status.cc -g++ -I./ -c -o decode_ENCRYPT_ENC_update_ENCRYPT_enc_data.o decode_ENCRYPT_ENC_update_ENCRYPT_enc_data.cc -g++ -I./ -c -o decode_ENCRYPT_ENC_update_TEST_status.o decode_ENCRYPT_ENC_update_TEST_status.cc -g++ -I./ -c -o decode_ENCRYPT_STORE_update_TEST_XRAM.o decode_ENCRYPT_STORE_update_TEST_XRAM.cc -g++ -I./ -c -o decode_ENCRYPT_STORE_update_ENCRYPT_blk_cnt.o decode_ENCRYPT_STORE_update_ENCRYPT_blk_cnt.cc -g++ -I./ -c -o decode_ENCRYPT_STORE_update_ENCRYPT_byte_cnt.o decode_ENCRYPT_STORE_update_ENCRYPT_byte_cnt.cc -g++ -I./ -c -o decode_ENCRYPT_STORE_update_TEST_status.o decode_ENCRYPT_STORE_update_TEST_status.cc -g++ -I./ -c -o compute.o compute.cc -g++ -I./ -c -o help.o ../../uninterpreted_func/uninterpreted_func.cc diff --git a/test/unit-data/ila_sim_test/test.h b/test/unit-data/ila_sim_test/test.h deleted file mode 100644 index b56490fca..000000000 --- a/test/unit-data/ila_sim_test/test.h +++ /dev/null @@ -1,263 +0,0 @@ -#include "systemc.h" -#include -SC_MODULE(TEST) { - sc_in< sc_biguint<2> > TEST_cmd_in; - sc_biguint<2> TEST_cmd; - sc_in< sc_biguint<16> > TEST_cmdaddr_in; - sc_biguint<16> TEST_cmdaddr; - sc_in< sc_biguint<8> > TEST_cmddata_in; - sc_biguint<8> TEST_cmddata; - sc_in TEST_cmdflag_in; - bool TEST_cmdflag; - sc_out< sc_biguint<2> > TEST_status_out; - sc_biguint<2> TEST_status; - sc_out< sc_biguint<16> > TEST_address_out; - sc_biguint<16> TEST_address; - sc_out< sc_biguint<16> > TEST_length_out; - sc_biguint<16> TEST_length; - sc_out< sc_biguint<128> > TEST_counter_out; - sc_biguint<128> TEST_counter; - sc_biguint<8> TEST_XRAM[65536]; - sc_out TEST_flag_out; - bool TEST_flag; - std::map< sc_biguint<32>, sc_biguint<32> > TEST_big_ram; - sc_biguint<128> ENCRYPT_rd_data; - sc_biguint<128> ENCRYPT_enc_data; - sc_biguint<4> ENCRYPT_byte_cnt; - sc_biguint<16> ENCRYPT_blk_cnt; - void init_ENCRYPT(); - bool c_1690353; - bool c_1690355; - bool decode_1690300(); - bool c_1690272; - bool c_1690268; - bool c_1690274; - bool c_1690297; - bool c_1690290; - bool c_1690292; - bool c_1690294; - bool c_1690299; - bool c_1690286; - bool c_1690300; - bool decode_1690339(); - bool c_1690336; - bool c_1690332; - bool c_1690338; - bool c_1690328; - bool c_1690339; - bool decode_1690375(); - bool c_1690375; - bool decode_1690652(); - bool c_1690650; - bool c_1690646; - bool c_1690652; - bool decode_1690674(); - bool c_1690674; - sc_biguint<16> decode_1690300_update_TEST_address(); - bool c_1690277; - bool c_1690314; - sc_biguint<8> c_1690311; - sc_biguint<8> c_1690309; - sc_biguint<8> c_1690316; - bool c_1690306; - sc_biguint<8> c_1690303; - sc_biguint<8> c_1690301; - sc_biguint<8> c_1690308; - sc_biguint<16> c_1690321; - sc_biguint<16> c_1690323; - bool decode_1690300_update_TEST_flag(); - bool c_1690324; - sc_biguint<2> decode_1690339_update_TEST_status(); - sc_biguint<2> unknown0(); - sc_biguint<2> c_1690342; - sc_biguint<2> c_1690345; - sc_biguint<4> decode_1690375_update_ENCRYPT_byte_cnt(); - sc_biguint<4> c_1690379; - sc_biguint<128> decode_1690375_update_ENCRYPT_rd_data(); - sc_biguint<4> c_1690624; - bool c_1690627; - sc_biguint<16> c_1690382; - sc_biguint<16> c_1690380; - sc_biguint<16> c_1690383; - sc_biguint<8> c_1690384; - sc_biguint<8> c_1690620; - sc_biguint<8> c_1690629; - sc_biguint<4> c_1690608; - bool c_1690611; - sc_biguint<8> c_1690604; - sc_biguint<8> c_1690613; - sc_biguint<4> c_1690592; - bool c_1690595; - sc_biguint<8> c_1690588; - sc_biguint<8> c_1690597; - sc_biguint<4> c_1690576; - bool c_1690579; - sc_biguint<8> c_1690572; - sc_biguint<8> c_1690581; - sc_biguint<4> c_1690560; - bool c_1690563; - sc_biguint<8> c_1690556; - sc_biguint<8> c_1690565; - sc_biguint<4> c_1690544; - bool c_1690547; - sc_biguint<8> c_1690540; - sc_biguint<8> c_1690549; - sc_biguint<4> c_1690528; - bool c_1690531; - sc_biguint<8> c_1690524; - sc_biguint<8> c_1690533; - sc_biguint<4> c_1690512; - bool c_1690515; - sc_biguint<8> c_1690508; - sc_biguint<8> c_1690517; - sc_biguint<4> c_1690496; - bool c_1690499; - sc_biguint<8> c_1690492; - sc_biguint<8> c_1690501; - sc_biguint<4> c_1690480; - bool c_1690483; - sc_biguint<8> c_1690476; - sc_biguint<8> c_1690485; - sc_biguint<4> c_1690464; - bool c_1690467; - sc_biguint<8> c_1690460; - sc_biguint<8> c_1690469; - sc_biguint<4> c_1690448; - bool c_1690451; - sc_biguint<8> c_1690444; - sc_biguint<8> c_1690453; - sc_biguint<4> c_1690432; - bool c_1690435; - sc_biguint<8> c_1690428; - sc_biguint<8> c_1690437; - sc_biguint<4> c_1690416; - bool c_1690419; - sc_biguint<8> c_1690412; - sc_biguint<8> c_1690421; - sc_biguint<4> c_1690400; - bool c_1690403; - sc_biguint<8> c_1690396; - sc_biguint<8> c_1690405; - sc_biguint<4> c_1690390; - bool c_1690393; - sc_biguint<8> c_1690386; - sc_biguint<8> c_1690395; - sc_biguint<16> c_1690410; - sc_biguint<24> c_1690426; - sc_biguint<32> c_1690442; - sc_biguint<40> c_1690458; - sc_biguint<48> c_1690474; - sc_biguint<56> c_1690490; - sc_biguint<64> c_1690506; - sc_biguint<72> c_1690522; - sc_biguint<80> c_1690538; - sc_biguint<88> c_1690554; - sc_biguint<96> c_1690570; - sc_biguint<104> c_1690586; - sc_biguint<112> c_1690602; - sc_biguint<120> c_1690618; - sc_biguint<128> c_1690634; - sc_biguint<2> decode_1690375_update_TEST_status(); - bool c_1690640; - sc_biguint<2> c_1690642; - sc_biguint<128> decode_1690652_update_ENCRYPT_enc_data(); - const sc_biguint<128> c_1690654[16] = {0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - sc_biguint<128> c_1690662; - sc_biguint<128> c_1690664; - sc_biguint<128> c_1690658; - sc_biguint<128> c_1690665; - sc_biguint<128> c_1690656; - sc_biguint<128> c_1690666; - sc_biguint<128> process128(sc_biguint<128> arg_0, sc_biguint<128> arg_1); - sc_biguint<128> c_1690667; - sc_biguint<128> c_1690668; - sc_biguint<2> decode_1690652_update_TEST_status(); - void ite_1690836(std::map& mem_update_map); - sc_biguint<16> c_1690678; - sc_biguint<16> c_1690676; - sc_biguint<16> c_1690679; - sc_biguint<4> c_1690829; - bool c_1690832; - sc_biguint<8> c_1690825; - sc_biguint<4> c_1690819; - bool c_1690822; - sc_biguint<8> c_1690815; - sc_biguint<4> c_1690809; - bool c_1690812; - sc_biguint<8> c_1690805; - sc_biguint<4> c_1690799; - bool c_1690802; - sc_biguint<8> c_1690795; - sc_biguint<4> c_1690789; - bool c_1690792; - sc_biguint<8> c_1690785; - sc_biguint<4> c_1690779; - bool c_1690782; - sc_biguint<8> c_1690775; - sc_biguint<4> c_1690769; - bool c_1690772; - sc_biguint<8> c_1690765; - sc_biguint<4> c_1690759; - bool c_1690762; - sc_biguint<8> c_1690755; - sc_biguint<4> c_1690749; - bool c_1690752; - sc_biguint<8> c_1690745; - sc_biguint<4> c_1690739; - bool c_1690742; - sc_biguint<8> c_1690735; - sc_biguint<4> c_1690729; - bool c_1690732; - sc_biguint<8> c_1690725; - sc_biguint<4> c_1690719; - bool c_1690722; - sc_biguint<8> c_1690715; - sc_biguint<4> c_1690709; - bool c_1690712; - sc_biguint<8> c_1690705; - sc_biguint<4> c_1690699; - bool c_1690702; - sc_biguint<8> c_1690695; - sc_biguint<4> c_1690689; - bool c_1690692; - sc_biguint<8> c_1690685; - sc_biguint<8> c_1690683; - sc_biguint<8> c_1690694; - sc_biguint<8> c_1690704; - sc_biguint<8> c_1690714; - sc_biguint<8> c_1690724; - sc_biguint<8> c_1690734; - sc_biguint<8> c_1690744; - sc_biguint<8> c_1690754; - sc_biguint<8> c_1690764; - sc_biguint<8> c_1690774; - sc_biguint<8> c_1690784; - sc_biguint<8> c_1690794; - sc_biguint<8> c_1690804; - sc_biguint<8> c_1690814; - sc_biguint<8> c_1690824; - sc_biguint<8> c_1690834; - std::map decode_1690674_update_TEST_XRAM_map; - void decode_1690674_update_TEST_XRAM(std::map& mem_update_map); - sc_biguint<16> decode_1690674_update_ENCRYPT_blk_cnt(); - bool c_1690848; - sc_biguint<16> c_1690842; - bool c_1690843; - sc_biguint<16> c_1690839; - sc_biguint<16> c_1690845; - sc_biguint<16> c_1690850; - sc_biguint<4> decode_1690674_update_ENCRYPT_byte_cnt(); - sc_biguint<4> c_1690682; - sc_biguint<2> decode_1690674_update_TEST_status(); - bool c_1690863; - sc_biguint<16> c_1690857; - bool c_1690858; - sc_biguint<2> c_1690860; - sc_biguint<2> c_1690865; - void compute(); - SC_HAS_PROCESS(TEST); - TEST(sc_module_name name_) : sc_module(name_) { - SC_METHOD(compute); - sensitive << TEST_cmd_in << TEST_cmdaddr_in << TEST_cmddata_in << TEST_cmdflag_in; - } -}; diff --git a/test/unit-data/ila_sim_test/test_external_mem.h b/test/unit-data/ila_sim_test/test_external_mem.h deleted file mode 100644 index 9babd31a4..000000000 --- a/test/unit-data/ila_sim_test/test_external_mem.h +++ /dev/null @@ -1,279 +0,0 @@ -#include "systemc.h" -#include -SC_MODULE(TEST) { - sc_in< sc_biguint<2> > TEST_cmd_in; - sc_biguint<2> TEST_cmd; - sc_in< sc_biguint<16> > TEST_cmdaddr_in; - sc_biguint<16> TEST_cmdaddr; - sc_in< sc_biguint<8> > TEST_cmddata_in; - sc_biguint<8> TEST_cmddata; - sc_in TEST_cmdflag_in; - bool TEST_cmdflag; - sc_out< sc_biguint<2> > TEST_status_out; - sc_biguint<2> TEST_status; - sc_out< sc_biguint<16> > TEST_address_out; - sc_biguint<16> TEST_address; - sc_out< sc_biguint<16> > TEST_length_out; - sc_biguint<16> TEST_length; - sc_out< sc_biguint<128> > TEST_counter_out; - sc_biguint<128> TEST_counter; - sc_in< sc_biguint<1> > TEST_XRAM_read_valid; - sc_in< sc_biguint<8> > TEST_XRAM_read_data; - sc_out< sc_biguint<1> >TEST_XRAM_read_ready; - sc_out< sc_biguint<16> > TEST_XRAM_read_address; - sc_in< sc_biguint<1> > TEST_XRAM_write_ready; - sc_out< sc_biguint<16> > TEST_XRAM_write_address; - sc_out< sc_biguint<1> > TEST_XRAM_write_valid; - sc_out< sc_biguint<8> > TEST_XRAM_write_data; - sc_out TEST_flag_out; - bool TEST_flag; - sc_in< sc_biguint<1> > TEST_big_ram_read_valid; - sc_in< sc_biguint<32> > TEST_big_ram_read_data; - sc_out< sc_biguint<1> >TEST_big_ram_read_ready; - sc_out< sc_biguint<32> > TEST_big_ram_read_address; - sc_in< sc_biguint<1> > TEST_big_ram_write_ready; - sc_out< sc_biguint<32> > TEST_big_ram_write_address; - sc_out< sc_biguint<1> > TEST_big_ram_write_valid; - sc_out< sc_biguint<32> > TEST_big_ram_write_data; - sc_biguint<128> ENCRYPT_rd_data; - sc_biguint<128> ENCRYPT_enc_data; - sc_biguint<4> ENCRYPT_byte_cnt; - sc_biguint<16> ENCRYPT_blk_cnt; - void init_ENCRYPT(); - bool c_1691743; - bool c_1691745; - bool decode_1691690(); - bool c_1691662; - bool c_1691658; - bool c_1691664; - bool c_1691687; - bool c_1691680; - bool c_1691682; - bool c_1691684; - bool c_1691689; - bool c_1691676; - bool c_1691690; - bool decode_1691729(); - bool c_1691726; - bool c_1691722; - bool c_1691728; - bool c_1691718; - bool c_1691729; - bool decode_1691765(); - bool c_1691765; - bool decode_1692042(); - bool c_1692040; - bool c_1692036; - bool c_1692042; - bool decode_1692064(); - bool c_1692064; - sc_biguint<16> decode_1691690_update_TEST_address(); - bool c_1691667; - bool c_1691704; - sc_biguint<8> c_1691701; - sc_biguint<8> c_1691699; - sc_biguint<8> c_1691706; - bool c_1691696; - sc_biguint<8> c_1691693; - sc_biguint<8> c_1691691; - sc_biguint<8> c_1691698; - sc_biguint<16> c_1691711; - sc_biguint<16> c_1691713; - bool decode_1691690_update_TEST_flag(); - bool c_1691714; - sc_biguint<2> decode_1691729_update_TEST_status(); - sc_biguint<2> unknown0(); - sc_biguint<2> c_1691732; - sc_biguint<2> c_1691735; - sc_biguint<4> decode_1691765_update_ENCRYPT_byte_cnt(); - sc_biguint<4> c_1691769; - sc_biguint<128> decode_1691765_update_ENCRYPT_rd_data(); - sc_biguint<4> c_1692014; - bool c_1692017; - sc_biguint<16> c_1691772; - sc_biguint<16> c_1691770; - sc_biguint<16> c_1691773; - sc_biguint<8> c_1691774; - int c_1691774_ctrl; - sc_biguint<8> c_1692010; - sc_biguint<8> c_1692019; - sc_biguint<4> c_1691998; - bool c_1692001; - sc_biguint<8> c_1691994; - sc_biguint<8> c_1692003; - sc_biguint<4> c_1691982; - bool c_1691985; - sc_biguint<8> c_1691978; - sc_biguint<8> c_1691987; - sc_biguint<4> c_1691966; - bool c_1691969; - sc_biguint<8> c_1691962; - sc_biguint<8> c_1691971; - sc_biguint<4> c_1691950; - bool c_1691953; - sc_biguint<8> c_1691946; - sc_biguint<8> c_1691955; - sc_biguint<4> c_1691934; - bool c_1691937; - sc_biguint<8> c_1691930; - sc_biguint<8> c_1691939; - sc_biguint<4> c_1691918; - bool c_1691921; - sc_biguint<8> c_1691914; - sc_biguint<8> c_1691923; - sc_biguint<4> c_1691902; - bool c_1691905; - sc_biguint<8> c_1691898; - sc_biguint<8> c_1691907; - sc_biguint<4> c_1691886; - bool c_1691889; - sc_biguint<8> c_1691882; - sc_biguint<8> c_1691891; - sc_biguint<4> c_1691870; - bool c_1691873; - sc_biguint<8> c_1691866; - sc_biguint<8> c_1691875; - sc_biguint<4> c_1691854; - bool c_1691857; - sc_biguint<8> c_1691850; - sc_biguint<8> c_1691859; - sc_biguint<4> c_1691838; - bool c_1691841; - sc_biguint<8> c_1691834; - sc_biguint<8> c_1691843; - sc_biguint<4> c_1691822; - bool c_1691825; - sc_biguint<8> c_1691818; - sc_biguint<8> c_1691827; - sc_biguint<4> c_1691806; - bool c_1691809; - sc_biguint<8> c_1691802; - sc_biguint<8> c_1691811; - sc_biguint<4> c_1691790; - bool c_1691793; - sc_biguint<8> c_1691786; - sc_biguint<8> c_1691795; - sc_biguint<4> c_1691780; - bool c_1691783; - sc_biguint<8> c_1691776; - sc_biguint<8> c_1691785; - sc_biguint<16> c_1691800; - sc_biguint<24> c_1691816; - sc_biguint<32> c_1691832; - sc_biguint<40> c_1691848; - sc_biguint<48> c_1691864; - sc_biguint<56> c_1691880; - sc_biguint<64> c_1691896; - sc_biguint<72> c_1691912; - sc_biguint<80> c_1691928; - sc_biguint<88> c_1691944; - sc_biguint<96> c_1691960; - sc_biguint<104> c_1691976; - sc_biguint<112> c_1691992; - sc_biguint<120> c_1692008; - sc_biguint<128> c_1692024; - sc_biguint<2> decode_1691765_update_TEST_status(); - bool c_1692030; - sc_biguint<2> c_1692032; - sc_biguint<128> decode_1692042_update_ENCRYPT_enc_data(); - const sc_biguint<128> c_1692044[16] = {0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - sc_biguint<128> c_1692052; - sc_biguint<128> c_1692054; - sc_biguint<128> c_1692048; - sc_biguint<128> c_1692055; - sc_biguint<128> c_1692046; - sc_biguint<128> c_1692056; - sc_biguint<128> process128(sc_biguint<128> arg_0, sc_biguint<128> arg_1); - sc_biguint<128> c_1692057; - sc_biguint<128> c_1692058; - sc_biguint<2> decode_1692042_update_TEST_status(); - void ite_1692226(std::map& mem_update_map); - sc_biguint<16> c_1692068; - sc_biguint<16> c_1692066; - sc_biguint<16> c_1692069; - sc_biguint<4> c_1692219; - bool c_1692222; - sc_biguint<8> c_1692215; - sc_biguint<4> c_1692209; - bool c_1692212; - sc_biguint<8> c_1692205; - sc_biguint<4> c_1692199; - bool c_1692202; - sc_biguint<8> c_1692195; - sc_biguint<4> c_1692189; - bool c_1692192; - sc_biguint<8> c_1692185; - sc_biguint<4> c_1692179; - bool c_1692182; - sc_biguint<8> c_1692175; - sc_biguint<4> c_1692169; - bool c_1692172; - sc_biguint<8> c_1692165; - sc_biguint<4> c_1692159; - bool c_1692162; - sc_biguint<8> c_1692155; - sc_biguint<4> c_1692149; - bool c_1692152; - sc_biguint<8> c_1692145; - sc_biguint<4> c_1692139; - bool c_1692142; - sc_biguint<8> c_1692135; - sc_biguint<4> c_1692129; - bool c_1692132; - sc_biguint<8> c_1692125; - sc_biguint<4> c_1692119; - bool c_1692122; - sc_biguint<8> c_1692115; - sc_biguint<4> c_1692109; - bool c_1692112; - sc_biguint<8> c_1692105; - sc_biguint<4> c_1692099; - bool c_1692102; - sc_biguint<8> c_1692095; - sc_biguint<4> c_1692089; - bool c_1692092; - sc_biguint<8> c_1692085; - sc_biguint<4> c_1692079; - bool c_1692082; - sc_biguint<8> c_1692075; - sc_biguint<8> c_1692073; - sc_biguint<8> c_1692084; - sc_biguint<8> c_1692094; - sc_biguint<8> c_1692104; - sc_biguint<8> c_1692114; - sc_biguint<8> c_1692124; - sc_biguint<8> c_1692134; - sc_biguint<8> c_1692144; - sc_biguint<8> c_1692154; - sc_biguint<8> c_1692164; - sc_biguint<8> c_1692174; - sc_biguint<8> c_1692184; - sc_biguint<8> c_1692194; - sc_biguint<8> c_1692204; - sc_biguint<8> c_1692214; - sc_biguint<8> c_1692224; - std::map decode_1692064_update_TEST_XRAM_map; - void decode_1692064_update_TEST_XRAM(std::map& mem_update_map); - int decode_1692064_update_TEST_XRAM_iter - sc_biguint<16> decode_1692064_update_ENCRYPT_blk_cnt(); - bool c_1692238; - sc_biguint<16> c_1692232; - bool c_1692233; - sc_biguint<16> c_1692229; - sc_biguint<16> c_1692235; - sc_biguint<16> c_1692240; - sc_biguint<4> decode_1692064_update_ENCRYPT_byte_cnt(); - sc_biguint<4> c_1692072; - sc_biguint<2> decode_1692064_update_TEST_status(); - bool c_1692253; - sc_biguint<16> c_1692247; - bool c_1692248; - sc_biguint<2> c_1692250; - sc_biguint<2> c_1692255; - void compute(); - SC_HAS_PROCESS(TEST); - TEST(sc_module_name name_) : sc_module(name_) { - SC_METHOD(compute); - sensitive << TEST_cmd_in << TEST_cmdaddr_in << TEST_cmddata_in << TEST_cmdflag_in; - } -}; diff --git a/test/unit-data/ila_sim_test/test_qemu.h b/test/unit-data/ila_sim_test/test_qemu.h deleted file mode 100644 index 394055b42..000000000 --- a/test/unit-data/ila_sim_test/test_qemu.h +++ /dev/null @@ -1,264 +0,0 @@ -#include -using namespace boost::multiprecision; -typedef number > uint2_t; -typedef number > uint4_t; -typedef number > uint24_t; -typedef number > uint40_t; -typedef number > uint48_t; -typedef number > uint56_t; -typedef number > uint72_t; -typedef number > uint80_t; -typedef number > uint88_t; -typedef number > uint96_t; -typedef number > uint104_t; -typedef number > uint112_t; -typedef number > uint120_t; -#include -class TEST { -public: - uint2_t TEST_cmd; - uint16_t TEST_cmdaddr; - uint8_t TEST_cmddata; - bool TEST_cmdflag; - uint2_t TEST_status; - uint16_t TEST_address; - uint16_t TEST_length; - uint128_t TEST_counter; - uint8_t TEST_XRAM[65536]; - bool TEST_flag; - std::mapTEST_big_ram; - uint128_t ENCRYPT_rd_data; - uint128_t ENCRYPT_enc_data; - uint4_t ENCRYPT_byte_cnt; - uint16_t ENCRYPT_blk_cnt; - void init_ENCRYPT(); - bool c_1692454; - bool c_1692456; - bool decode_1692401(); - bool c_1692373; - bool c_1692369; - bool c_1692375; - bool c_1692398; - bool c_1692391; - bool c_1692393; - bool c_1692395; - bool c_1692400; - bool c_1692387; - bool c_1692401; - bool decode_1692440(); - bool c_1692437; - bool c_1692433; - bool c_1692439; - bool c_1692429; - bool c_1692440; - bool decode_1692476(); - bool c_1692476; - bool decode_1692753(); - bool c_1692751; - bool c_1692747; - bool c_1692753; - bool decode_1692775(); - bool c_1692775; - uint16_t decode_1692401_update_TEST_address(); - bool c_1692378; - bool c_1692415; - uint8_t c_1692412; - uint8_t c_1692410; - uint8_t c_1692417; - bool c_1692407; - uint8_t c_1692404; - uint8_t c_1692402; - uint8_t c_1692409; - uint16_t c_1692422; - uint16_t c_1692424; - bool decode_1692401_update_TEST_flag(); - bool c_1692425; - uint2_t decode_1692440_update_TEST_status(); - uint2_t unknown0(); - uint2_t c_1692443; - uint2_t c_1692446; - uint4_t decode_1692476_update_ENCRYPT_byte_cnt(); - uint4_t c_1692480; - uint128_t decode_1692476_update_ENCRYPT_rd_data(); - uint4_t c_1692725; - bool c_1692728; - uint16_t c_1692483; - uint16_t c_1692481; - uint16_t c_1692484; - uint8_t c_1692485; - uint8_t c_1692721; - uint8_t c_1692730; - uint4_t c_1692709; - bool c_1692712; - uint8_t c_1692705; - uint8_t c_1692714; - uint4_t c_1692693; - bool c_1692696; - uint8_t c_1692689; - uint8_t c_1692698; - uint4_t c_1692677; - bool c_1692680; - uint8_t c_1692673; - uint8_t c_1692682; - uint4_t c_1692661; - bool c_1692664; - uint8_t c_1692657; - uint8_t c_1692666; - uint4_t c_1692645; - bool c_1692648; - uint8_t c_1692641; - uint8_t c_1692650; - uint4_t c_1692629; - bool c_1692632; - uint8_t c_1692625; - uint8_t c_1692634; - uint4_t c_1692613; - bool c_1692616; - uint8_t c_1692609; - uint8_t c_1692618; - uint4_t c_1692597; - bool c_1692600; - uint8_t c_1692593; - uint8_t c_1692602; - uint4_t c_1692581; - bool c_1692584; - uint8_t c_1692577; - uint8_t c_1692586; - uint4_t c_1692565; - bool c_1692568; - uint8_t c_1692561; - uint8_t c_1692570; - uint4_t c_1692549; - bool c_1692552; - uint8_t c_1692545; - uint8_t c_1692554; - uint4_t c_1692533; - bool c_1692536; - uint8_t c_1692529; - uint8_t c_1692538; - uint4_t c_1692517; - bool c_1692520; - uint8_t c_1692513; - uint8_t c_1692522; - uint4_t c_1692501; - bool c_1692504; - uint8_t c_1692497; - uint8_t c_1692506; - uint4_t c_1692491; - bool c_1692494; - uint8_t c_1692487; - uint8_t c_1692496; - uint16_t c_1692511; - uint24_t c_1692527; - uint32_t c_1692543; - uint40_t c_1692559; - uint48_t c_1692575; - uint56_t c_1692591; - uint64_t c_1692607; - uint72_t c_1692623; - uint80_t c_1692639; - uint88_t c_1692655; - uint96_t c_1692671; - uint104_t c_1692687; - uint112_t c_1692703; - uint120_t c_1692719; - uint128_t c_1692735; - uint2_t decode_1692476_update_TEST_status(); - bool c_1692741; - uint2_t c_1692743; - uint128_t decode_1692753_update_ENCRYPT_enc_data(); - const uint128_t c_1692755[16] = {0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - uint128_t c_1692763; - uint128_t c_1692765; - uint128_t c_1692759; - uint128_t c_1692766; - uint128_t c_1692757; - uint128_t c_1692767; - uint128_t process128(uint128_t arg_0, uint128_t arg_1); - uint128_t c_1692768; - uint128_t c_1692769; - uint2_t decode_1692753_update_TEST_status(); - void ite_1692937(std::map& mem_update_map); - uint16_t c_1692779; - uint16_t c_1692777; - uint16_t c_1692780; - uint4_t c_1692930; - bool c_1692933; - uint8_t c_1692926; - uint4_t c_1692920; - bool c_1692923; - uint8_t c_1692916; - uint4_t c_1692910; - bool c_1692913; - uint8_t c_1692906; - uint4_t c_1692900; - bool c_1692903; - uint8_t c_1692896; - uint4_t c_1692890; - bool c_1692893; - uint8_t c_1692886; - uint4_t c_1692880; - bool c_1692883; - uint8_t c_1692876; - uint4_t c_1692870; - bool c_1692873; - uint8_t c_1692866; - uint4_t c_1692860; - bool c_1692863; - uint8_t c_1692856; - uint4_t c_1692850; - bool c_1692853; - uint8_t c_1692846; - uint4_t c_1692840; - bool c_1692843; - uint8_t c_1692836; - uint4_t c_1692830; - bool c_1692833; - uint8_t c_1692826; - uint4_t c_1692820; - bool c_1692823; - uint8_t c_1692816; - uint4_t c_1692810; - bool c_1692813; - uint8_t c_1692806; - uint4_t c_1692800; - bool c_1692803; - uint8_t c_1692796; - uint4_t c_1692790; - bool c_1692793; - uint8_t c_1692786; - uint8_t c_1692784; - uint8_t c_1692795; - uint8_t c_1692805; - uint8_t c_1692815; - uint8_t c_1692825; - uint8_t c_1692835; - uint8_t c_1692845; - uint8_t c_1692855; - uint8_t c_1692865; - uint8_t c_1692875; - uint8_t c_1692885; - uint8_t c_1692895; - uint8_t c_1692905; - uint8_t c_1692915; - uint8_t c_1692925; - uint8_t c_1692935; - std::map decode_1692775_update_TEST_XRAM_map; - void decode_1692775_update_TEST_XRAM(std::map& mem_update_map); - uint16_t decode_1692775_update_ENCRYPT_blk_cnt(); - bool c_1692949; - uint16_t c_1692943; - bool c_1692944; - uint16_t c_1692940; - uint16_t c_1692946; - uint16_t c_1692951; - uint4_t decode_1692775_update_ENCRYPT_byte_cnt(); - uint4_t c_1692783; - uint2_t decode_1692775_update_TEST_status(); - bool c_1692964; - uint16_t c_1692958; - bool c_1692959; - uint2_t c_1692961; - uint2_t c_1692966; - void compute(); -}; diff --git a/test/unit-data/ila_sim_test/test_readable.h b/test/unit-data/ila_sim_test/test_readable.h deleted file mode 100644 index 2a50e888a..000000000 --- a/test/unit-data/ila_sim_test/test_readable.h +++ /dev/null @@ -1,263 +0,0 @@ -#include "systemc.h" -#include -SC_MODULE(TEST) { - sc_in< sc_biguint<2> > TEST_cmd_in; - sc_biguint<2> TEST_cmd; - sc_in< sc_biguint<16> > TEST_cmdaddr_in; - sc_biguint<16> TEST_cmdaddr; - sc_in< sc_biguint<8> > TEST_cmddata_in; - sc_biguint<8> TEST_cmddata; - sc_in TEST_cmdflag_in; - bool TEST_cmdflag; - sc_out< sc_biguint<2> > TEST_status_out; - sc_biguint<2> TEST_status; - sc_out< sc_biguint<16> > TEST_address_out; - sc_biguint<16> TEST_address; - sc_out< sc_biguint<16> > TEST_length_out; - sc_biguint<16> TEST_length; - sc_out< sc_biguint<128> > TEST_counter_out; - sc_biguint<128> TEST_counter; - sc_biguint<8> TEST_XRAM[65536]; - sc_out TEST_flag_out; - bool TEST_flag; - std::map< sc_biguint<32>, sc_biguint<32> > TEST_big_ram; - sc_biguint<128> ENCRYPT_rd_data; - sc_biguint<128> ENCRYPT_enc_data; - sc_biguint<4> ENCRYPT_byte_cnt; - sc_biguint<16> ENCRYPT_blk_cnt; - void init_ENCRYPT(); - bool c_1691048; - bool c_1691050; - bool decode_TEST_WRITE_ADDRESS(); - bool c_1690967; - bool c_1690963; - bool c_1690969; - bool c_1690992; - bool c_1690985; - bool c_1690987; - bool c_1690989; - bool c_1690994; - bool c_1690981; - bool c_1690995; - bool decode_TEST_START_ENCRYPT(); - bool c_1691031; - bool c_1691027; - bool c_1691033; - bool c_1691023; - bool c_1691034; - bool decode_ENCRYPT_LOAD(); - bool c_1691070; - bool decode_ENCRYPT_ENC(); - bool c_1691345; - bool c_1691341; - bool c_1691347; - bool decode_ENCRYPT_STORE(); - bool c_1691369; - sc_biguint<16> decode_TEST_WRITE_ADDRESS_update_TEST_address(); - bool c_1690972; - bool c_1691009; - sc_biguint<8> c_1691006; - sc_biguint<8> c_1691004; - sc_biguint<8> c_1691011; - bool c_1691001; - sc_biguint<8> c_1690998; - sc_biguint<8> c_1690996; - sc_biguint<8> c_1691003; - sc_biguint<16> c_1691016; - sc_biguint<16> c_1691018; - bool decode_TEST_WRITE_ADDRESS_update_TEST_flag(); - bool c_1691019; - sc_biguint<2> decode_TEST_START_ENCRYPT_update_TEST_status(); - sc_biguint<2> unknown0(); - sc_biguint<2> c_1691037; - sc_biguint<2> c_1691040; - sc_biguint<4> decode_ENCRYPT_LOAD_update_ENCRYPT_byte_cnt(); - sc_biguint<4> c_1691074; - sc_biguint<128> decode_ENCRYPT_LOAD_update_ENCRYPT_rd_data(); - sc_biguint<4> c_1691319; - bool c_1691322; - sc_biguint<16> c_1691077; - sc_biguint<16> c_1691075; - sc_biguint<16> c_1691078; - sc_biguint<8> c_1691079; - sc_biguint<8> c_1691315; - sc_biguint<8> c_1691324; - sc_biguint<4> c_1691303; - bool c_1691306; - sc_biguint<8> c_1691299; - sc_biguint<8> c_1691308; - sc_biguint<4> c_1691287; - bool c_1691290; - sc_biguint<8> c_1691283; - sc_biguint<8> c_1691292; - sc_biguint<4> c_1691271; - bool c_1691274; - sc_biguint<8> c_1691267; - sc_biguint<8> c_1691276; - sc_biguint<4> c_1691255; - bool c_1691258; - sc_biguint<8> c_1691251; - sc_biguint<8> c_1691260; - sc_biguint<4> c_1691239; - bool c_1691242; - sc_biguint<8> c_1691235; - sc_biguint<8> c_1691244; - sc_biguint<4> c_1691223; - bool c_1691226; - sc_biguint<8> c_1691219; - sc_biguint<8> c_1691228; - sc_biguint<4> c_1691207; - bool c_1691210; - sc_biguint<8> c_1691203; - sc_biguint<8> c_1691212; - sc_biguint<4> c_1691191; - bool c_1691194; - sc_biguint<8> c_1691187; - sc_biguint<8> c_1691196; - sc_biguint<4> c_1691175; - bool c_1691178; - sc_biguint<8> c_1691171; - sc_biguint<8> c_1691180; - sc_biguint<4> c_1691159; - bool c_1691162; - sc_biguint<8> c_1691155; - sc_biguint<8> c_1691164; - sc_biguint<4> c_1691143; - bool c_1691146; - sc_biguint<8> c_1691139; - sc_biguint<8> c_1691148; - sc_biguint<4> c_1691127; - bool c_1691130; - sc_biguint<8> c_1691123; - sc_biguint<8> c_1691132; - sc_biguint<4> c_1691111; - bool c_1691114; - sc_biguint<8> c_1691107; - sc_biguint<8> c_1691116; - sc_biguint<4> c_1691095; - bool c_1691098; - sc_biguint<8> c_1691091; - sc_biguint<8> c_1691100; - sc_biguint<4> c_1691085; - bool c_1691088; - sc_biguint<8> c_1691081; - sc_biguint<8> c_1691090; - sc_biguint<16> c_1691105; - sc_biguint<24> c_1691121; - sc_biguint<32> c_1691137; - sc_biguint<40> c_1691153; - sc_biguint<48> c_1691169; - sc_biguint<56> c_1691185; - sc_biguint<64> c_1691201; - sc_biguint<72> c_1691217; - sc_biguint<80> c_1691233; - sc_biguint<88> c_1691249; - sc_biguint<96> c_1691265; - sc_biguint<104> c_1691281; - sc_biguint<112> c_1691297; - sc_biguint<120> c_1691313; - sc_biguint<128> c_1691329; - sc_biguint<2> decode_ENCRYPT_LOAD_update_TEST_status(); - bool c_1691335; - sc_biguint<2> c_1691337; - sc_biguint<128> decode_ENCRYPT_ENC_update_ENCRYPT_enc_data(); - const sc_biguint<128> c_1691349[16] = {0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - sc_biguint<128> c_1691357; - sc_biguint<128> c_1691359; - sc_biguint<128> c_1691353; - sc_biguint<128> c_1691360; - sc_biguint<128> c_1691351; - sc_biguint<128> c_1691361; - sc_biguint<128> process128(sc_biguint<128> arg_0, sc_biguint<128> arg_1); - sc_biguint<128> c_1691362; - sc_biguint<128> c_1691363; - sc_biguint<2> decode_ENCRYPT_ENC_update_TEST_status(); - void ite_1691531(std::map& mem_update_map); - sc_biguint<16> c_1691373; - sc_biguint<16> c_1691371; - sc_biguint<16> c_1691374; - sc_biguint<4> c_1691524; - bool c_1691527; - sc_biguint<8> c_1691520; - sc_biguint<4> c_1691514; - bool c_1691517; - sc_biguint<8> c_1691510; - sc_biguint<4> c_1691504; - bool c_1691507; - sc_biguint<8> c_1691500; - sc_biguint<4> c_1691494; - bool c_1691497; - sc_biguint<8> c_1691490; - sc_biguint<4> c_1691484; - bool c_1691487; - sc_biguint<8> c_1691480; - sc_biguint<4> c_1691474; - bool c_1691477; - sc_biguint<8> c_1691470; - sc_biguint<4> c_1691464; - bool c_1691467; - sc_biguint<8> c_1691460; - sc_biguint<4> c_1691454; - bool c_1691457; - sc_biguint<8> c_1691450; - sc_biguint<4> c_1691444; - bool c_1691447; - sc_biguint<8> c_1691440; - sc_biguint<4> c_1691434; - bool c_1691437; - sc_biguint<8> c_1691430; - sc_biguint<4> c_1691424; - bool c_1691427; - sc_biguint<8> c_1691420; - sc_biguint<4> c_1691414; - bool c_1691417; - sc_biguint<8> c_1691410; - sc_biguint<4> c_1691404; - bool c_1691407; - sc_biguint<8> c_1691400; - sc_biguint<4> c_1691394; - bool c_1691397; - sc_biguint<8> c_1691390; - sc_biguint<4> c_1691384; - bool c_1691387; - sc_biguint<8> c_1691380; - sc_biguint<8> c_1691378; - sc_biguint<8> c_1691389; - sc_biguint<8> c_1691399; - sc_biguint<8> c_1691409; - sc_biguint<8> c_1691419; - sc_biguint<8> c_1691429; - sc_biguint<8> c_1691439; - sc_biguint<8> c_1691449; - sc_biguint<8> c_1691459; - sc_biguint<8> c_1691469; - sc_biguint<8> c_1691479; - sc_biguint<8> c_1691489; - sc_biguint<8> c_1691499; - sc_biguint<8> c_1691509; - sc_biguint<8> c_1691519; - sc_biguint<8> c_1691529; - std::map decode_ENCRYPT_STORE_update_TEST_XRAM_map; - void decode_ENCRYPT_STORE_update_TEST_XRAM(std::map& mem_update_map); - sc_biguint<16> decode_ENCRYPT_STORE_update_ENCRYPT_blk_cnt(); - bool c_1691543; - sc_biguint<16> c_1691537; - bool c_1691538; - sc_biguint<16> c_1691534; - sc_biguint<16> c_1691540; - sc_biguint<16> c_1691545; - sc_biguint<4> decode_ENCRYPT_STORE_update_ENCRYPT_byte_cnt(); - sc_biguint<4> c_1691377; - sc_biguint<2> decode_ENCRYPT_STORE_update_TEST_status(); - bool c_1691558; - sc_biguint<16> c_1691552; - bool c_1691553; - sc_biguint<2> c_1691555; - sc_biguint<2> c_1691560; - void compute(); - SC_HAS_PROCESS(TEST); - TEST(sc_module_name name_) : sc_module(name_) { - SC_METHOD(compute); - sensitive << TEST_cmd_in << TEST_cmdaddr_in << TEST_cmddata_in << TEST_cmdflag_in; - } -}; diff --git a/test/unit-data/ila_sim_test/test_readable_qemu.h b/test/unit-data/ila_sim_test/test_readable_qemu.h deleted file mode 100644 index 95d929c88..000000000 --- a/test/unit-data/ila_sim_test/test_readable_qemu.h +++ /dev/null @@ -1,264 +0,0 @@ -#include -using namespace boost::multiprecision; -typedef number > uint2_t; -typedef number > uint4_t; -typedef number > uint24_t; -typedef number > uint40_t; -typedef number > uint48_t; -typedef number > uint56_t; -typedef number > uint72_t; -typedef number > uint80_t; -typedef number > uint88_t; -typedef number > uint96_t; -typedef number > uint104_t; -typedef number > uint112_t; -typedef number > uint120_t; -#include -class TEST { -public: - uint2_t TEST_cmd; - uint16_t TEST_cmdaddr; - uint8_t TEST_cmddata; - bool TEST_cmdflag; - uint2_t TEST_status; - uint16_t TEST_address; - uint16_t TEST_length; - uint128_t TEST_counter; - uint8_t TEST_XRAM[65536]; - bool TEST_flag; - std::mapTEST_big_ram; - uint128_t ENCRYPT_rd_data; - uint128_t ENCRYPT_enc_data; - uint4_t ENCRYPT_byte_cnt; - uint16_t ENCRYPT_blk_cnt; - void init_ENCRYPT(); - bool c_1693149; - bool c_1693151; - bool decode_TEST_WRITE_ADDRESS(); - bool c_1693068; - bool c_1693064; - bool c_1693070; - bool c_1693093; - bool c_1693086; - bool c_1693088; - bool c_1693090; - bool c_1693095; - bool c_1693082; - bool c_1693096; - bool decode_TEST_START_ENCRYPT(); - bool c_1693132; - bool c_1693128; - bool c_1693134; - bool c_1693124; - bool c_1693135; - bool decode_ENCRYPT_LOAD(); - bool c_1693171; - bool decode_ENCRYPT_ENC(); - bool c_1693446; - bool c_1693442; - bool c_1693448; - bool decode_ENCRYPT_STORE(); - bool c_1693470; - uint16_t decode_TEST_WRITE_ADDRESS_update_TEST_address(); - bool c_1693073; - bool c_1693110; - uint8_t c_1693107; - uint8_t c_1693105; - uint8_t c_1693112; - bool c_1693102; - uint8_t c_1693099; - uint8_t c_1693097; - uint8_t c_1693104; - uint16_t c_1693117; - uint16_t c_1693119; - bool decode_TEST_WRITE_ADDRESS_update_TEST_flag(); - bool c_1693120; - uint2_t decode_TEST_START_ENCRYPT_update_TEST_status(); - uint2_t unknown0(); - uint2_t c_1693138; - uint2_t c_1693141; - uint4_t decode_ENCRYPT_LOAD_update_ENCRYPT_byte_cnt(); - uint4_t c_1693175; - uint128_t decode_ENCRYPT_LOAD_update_ENCRYPT_rd_data(); - uint4_t c_1693420; - bool c_1693423; - uint16_t c_1693178; - uint16_t c_1693176; - uint16_t c_1693179; - uint8_t c_1693180; - uint8_t c_1693416; - uint8_t c_1693425; - uint4_t c_1693404; - bool c_1693407; - uint8_t c_1693400; - uint8_t c_1693409; - uint4_t c_1693388; - bool c_1693391; - uint8_t c_1693384; - uint8_t c_1693393; - uint4_t c_1693372; - bool c_1693375; - uint8_t c_1693368; - uint8_t c_1693377; - uint4_t c_1693356; - bool c_1693359; - uint8_t c_1693352; - uint8_t c_1693361; - uint4_t c_1693340; - bool c_1693343; - uint8_t c_1693336; - uint8_t c_1693345; - uint4_t c_1693324; - bool c_1693327; - uint8_t c_1693320; - uint8_t c_1693329; - uint4_t c_1693308; - bool c_1693311; - uint8_t c_1693304; - uint8_t c_1693313; - uint4_t c_1693292; - bool c_1693295; - uint8_t c_1693288; - uint8_t c_1693297; - uint4_t c_1693276; - bool c_1693279; - uint8_t c_1693272; - uint8_t c_1693281; - uint4_t c_1693260; - bool c_1693263; - uint8_t c_1693256; - uint8_t c_1693265; - uint4_t c_1693244; - bool c_1693247; - uint8_t c_1693240; - uint8_t c_1693249; - uint4_t c_1693228; - bool c_1693231; - uint8_t c_1693224; - uint8_t c_1693233; - uint4_t c_1693212; - bool c_1693215; - uint8_t c_1693208; - uint8_t c_1693217; - uint4_t c_1693196; - bool c_1693199; - uint8_t c_1693192; - uint8_t c_1693201; - uint4_t c_1693186; - bool c_1693189; - uint8_t c_1693182; - uint8_t c_1693191; - uint16_t c_1693206; - uint24_t c_1693222; - uint32_t c_1693238; - uint40_t c_1693254; - uint48_t c_1693270; - uint56_t c_1693286; - uint64_t c_1693302; - uint72_t c_1693318; - uint80_t c_1693334; - uint88_t c_1693350; - uint96_t c_1693366; - uint104_t c_1693382; - uint112_t c_1693398; - uint120_t c_1693414; - uint128_t c_1693430; - uint2_t decode_ENCRYPT_LOAD_update_TEST_status(); - bool c_1693436; - uint2_t c_1693438; - uint128_t decode_ENCRYPT_ENC_update_ENCRYPT_enc_data(); - const uint128_t c_1693450[16] = {0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - uint128_t c_1693458; - uint128_t c_1693460; - uint128_t c_1693454; - uint128_t c_1693461; - uint128_t c_1693452; - uint128_t c_1693462; - uint128_t process128(uint128_t arg_0, uint128_t arg_1); - uint128_t c_1693463; - uint128_t c_1693464; - uint2_t decode_ENCRYPT_ENC_update_TEST_status(); - void ite_1693632(std::map& mem_update_map); - uint16_t c_1693474; - uint16_t c_1693472; - uint16_t c_1693475; - uint4_t c_1693625; - bool c_1693628; - uint8_t c_1693621; - uint4_t c_1693615; - bool c_1693618; - uint8_t c_1693611; - uint4_t c_1693605; - bool c_1693608; - uint8_t c_1693601; - uint4_t c_1693595; - bool c_1693598; - uint8_t c_1693591; - uint4_t c_1693585; - bool c_1693588; - uint8_t c_1693581; - uint4_t c_1693575; - bool c_1693578; - uint8_t c_1693571; - uint4_t c_1693565; - bool c_1693568; - uint8_t c_1693561; - uint4_t c_1693555; - bool c_1693558; - uint8_t c_1693551; - uint4_t c_1693545; - bool c_1693548; - uint8_t c_1693541; - uint4_t c_1693535; - bool c_1693538; - uint8_t c_1693531; - uint4_t c_1693525; - bool c_1693528; - uint8_t c_1693521; - uint4_t c_1693515; - bool c_1693518; - uint8_t c_1693511; - uint4_t c_1693505; - bool c_1693508; - uint8_t c_1693501; - uint4_t c_1693495; - bool c_1693498; - uint8_t c_1693491; - uint4_t c_1693485; - bool c_1693488; - uint8_t c_1693481; - uint8_t c_1693479; - uint8_t c_1693490; - uint8_t c_1693500; - uint8_t c_1693510; - uint8_t c_1693520; - uint8_t c_1693530; - uint8_t c_1693540; - uint8_t c_1693550; - uint8_t c_1693560; - uint8_t c_1693570; - uint8_t c_1693580; - uint8_t c_1693590; - uint8_t c_1693600; - uint8_t c_1693610; - uint8_t c_1693620; - uint8_t c_1693630; - std::map decode_ENCRYPT_STORE_update_TEST_XRAM_map; - void decode_ENCRYPT_STORE_update_TEST_XRAM(std::map& mem_update_map); - uint16_t decode_ENCRYPT_STORE_update_ENCRYPT_blk_cnt(); - bool c_1693644; - uint16_t c_1693638; - bool c_1693639; - uint16_t c_1693635; - uint16_t c_1693641; - uint16_t c_1693646; - uint4_t decode_ENCRYPT_STORE_update_ENCRYPT_byte_cnt(); - uint4_t c_1693478; - uint2_t decode_ENCRYPT_STORE_update_TEST_status(); - bool c_1693659; - uint16_t c_1693653; - bool c_1693654; - uint2_t c_1693656; - uint2_t c_1693661; - void compute(); -};