53fastmodel_sc_report_handler(
56 const char *msg = report.
get_msg();
61 strstr(msg,
"Simulation code-translation cache failed to gain DMI") ||
62 strstr(msg,
"I-side given unusable DMI"),
63 "DMI warning from fastmodel, "
64 "aborting simulation instead of running slowly.");
68arm_fast_model_pybind(pybind11::module_ &m_internal)
70 auto arm_fast_model = m_internal.def_submodule(
"arm_fast_model");
72 .def(
"scx_initialize", [](std::string
id) {
73 scx::scx_initialize(
id);
77 .def(
"scx_load_application", &scx::scx_load_application)
78 .def(
"scx_load_application_all", &scx::scx_load_application_all)
79 .def(
"scx_load_data", &scx::scx_load_data)
80 .def(
"scx_load_data_all", &scx::scx_load_data_all)
86 .def(
"scx_set_parameter",
87 static_cast<bool (*)(
const std::string &,
const std::string &)
>(
88 &scx::scx_set_parameter))
89 .def(
"scx_get_parameter",
90 static_cast<bool (*)(
const std::string &, std::string &)
>(
91 &scx::scx_get_parameter))
92 .def(
"scx_get_parameter_list", &scx::scx_get_parameter_list)
94 .def(
"scx_set_cpi_file", &scx::scx_set_cpi_file)
98 .def(
"scx_cpulimit", &scx::scx_cpulimit)
99 .def(
"scx_timelimit", &scx::scx_timelimit)
100 .def(
"scx_simlimit", &scx::scx_simlimit)
102 .def(
"scx_parse_and_configure",
104 const char *trailer=NULL,
bool sig_handler=
true) {
105 scx::scx_parse_and_configure(argc, argv.data(),
106 trailer, sig_handler);
108 pybind11::arg(
"argc"),
109 pybind11::arg(
"argv"),
110 pybind11::arg(
"trailer") = NULL,
111 pybind11::arg(
"sig_handler") =
true)
114 .def(
"scx_start_cadi_server", &scx::scx_start_cadi_server,
115 pybind11::arg(
"start") =
true,
116 pybind11::arg(
"run") =
true,
117 pybind11::arg(
"debug") =
false)
118 .def(
"scx_enable_cadi_log", &scx::scx_enable_cadi_log,
119 pybind11::arg(
"log") =
true)
120 .def(
"scx_print_port_number", &scx::scx_print_port_number,
121 pybind11::arg(
"print") =
true)
123 .def(
"scx_print_statistics", &scx::scx_print_statistics,
124 pybind11::arg(
"print") =
true)
125 .def(
"scx_load_plugin", &scx::scx_load_plugin)
126 .def(
"scx_sync", &scx::scx_sync)
127 .def(
"scx_set_min_sync_latency",
128 static_cast<void (*)(
double)
>(&scx::scx_set_min_sync_latency))
129 .def(
"scx_set_min_sync_latency",
130 static_cast<void (*)(sg::ticks_t)
>(
131 &scx::scx_set_min_sync_latency))
132 .def(
"scx_get_min_sync_latency",
133 static_cast<double (*)()
>(&scx::scx_get_min_sync_latency))
134 .def(
"scx_get_min_sync_latency",
135 static_cast<sg::ticks_t (*)(sg::Tag<sg::ticks_t> *)
>(
136 &scx::scx_get_min_sync_latency))
140 auto gem5 = arm_fast_model.def_submodule(
"gem5");
141 gem5.def(
"enable_exit_on_dmi_warning_handler", []() {
145EmbeddedPyBind embed_(
"arm_fast_model", &arm_fast_model_pybind);
const char * get_msg() const
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
void addExtraSystemCReportHandler(sc_core::sc_report_handler_proc proc)