diff --git a/sim/firesim-lib/src/main/cc/bridges/tracerv.cc b/sim/firesim-lib/src/main/cc/bridges/tracerv.cc index 852d4782..a1eb9ae6 100644 --- a/sim/firesim-lib/src/main/cc/bridges/tracerv.cc +++ b/sim/firesim-lib/src/main/cc/bridges/tracerv.cc @@ -213,10 +213,8 @@ size_t tracerv_t::process_tokens(int num_beats, int minimum_batch_beats) { size_t minimum_batch_bytes = minimum_batch_beats * STREAM_WIDTH_BYTES; // TODO. as opt can mmap file and just load directly into it. alignas(4096) char OUTBUF[this->stream_depth * STREAM_WIDTH_BYTES]; - auto bytes_received = pull(this->stream_idx, - OUTBUF, - maximum_batch_bytes, - minimum_batch_bytes); + auto bytes_received = + pull(this->stream_idx, OUTBUF, maximum_batch_bytes, minimum_batch_bytes); // check that a tracefile exists (one is enough) since the manager // does not create a tracefile when trace_enable is disabled, but the // TracerV bridge still exists, and no tracefile is created by default. @@ -229,7 +227,7 @@ size_t tracerv_t::process_tokens(int num_beats, int minimum_batch_beats) { std::placeholders::_1, std::placeholders::_2); } - serialize((uint64_t*)OUTBUF, + serialize((uint64_t *)OUTBUF, bytes_received, tracefile, addInstruction, diff --git a/sim/midas/src/main/cc/emul/dpi.cc b/sim/midas/src/main/cc/emul/dpi.cc index ca7b4bca..d66a981c 100644 --- a/sim/midas/src/main/cc/emul/dpi.cc +++ b/sim/midas/src/main/cc/emul/dpi.cc @@ -281,7 +281,8 @@ void simulator_tick( exit(exit_code); } } catch (std::exception &e) { - fprintf(stderr, "Caught Exception headed for the simulator: %s.\n", e.what()); + fprintf( + stderr, "Caught Exception headed for the simulator: %s.\n", e.what()); abort(); } catch (...) { // seriously, VCS will give you an unhelpful message if you let an exception @@ -293,11 +294,11 @@ void simulator_tick( } void simulator_entry() { - s_vpi_vlog_info info; - if (!vpi_get_vlog_info(&info)) { - abort(); - } + s_vpi_vlog_info info; + if (!vpi_get_vlog_info(&info)) { + abort(); + } - entry(info.argc, info.argv); + entry(info.argc, info.argv); } } diff --git a/sim/midas/src/main/cc/entry.cc b/sim/midas/src/main/cc/entry.cc index 5f6d4a3c..28fc7e45 100644 --- a/sim/midas/src/main/cc/entry.cc +++ b/sim/midas/src/main/cc/entry.cc @@ -27,7 +27,8 @@ create_simulation(simif_t &simif, extern std::unique_ptr create_simif(const TargetConfig &config, int argc, char **argv); -std::unique_ptr simulator; // must exist for dpi.cc calls in emulation, must be global to avoid deletion +std::unique_ptr simulator; // must exist for dpi.cc calls in emulation, + // must be global to avoid deletion std::unique_ptr simulation; // must be global to avoid deletion // Entry point of the driver. @@ -60,8 +61,7 @@ int entry(int argc, char **argv) { #define GET_BRIDGE_CONSTRUCTOR #include "FireSim-generated.const.h" #undef GET_BRIDGE_CONSTRUCTOR - } - // clang-format on + } // clang-format on // Create the simulation instance. simulation = create_simulation(simif, *widget_registry_ptr, args); diff --git a/sim/midas/src/main/cc/main.cc b/sim/midas/src/main/cc/main.cc index bcb40cba..22495ea5 100644 --- a/sim/midas/src/main/cc/main.cc +++ b/sim/midas/src/main/cc/main.cc @@ -3,6 +3,4 @@ #include "entry.h" // Calls the entry point of the driver. -int main(int argc, char **argv) { - return entry(argc, argv); -} +int main(int argc, char **argv) { return entry(argc, argv); } diff --git a/sim/midas/src/main/cc/simif_emul_all.cc b/sim/midas/src/main/cc/simif_emul_all.cc index a671006c..62173a9d 100644 --- a/sim/midas/src/main/cc/simif_emul_all.cc +++ b/sim/midas/src/main/cc/simif_emul_all.cc @@ -1,5 +1,5 @@ -#include #include "emul/simif_emul.h" +#include /** * VCS-specific metasimulator implementation. @@ -21,8 +21,7 @@ simif_emul_vcs_t::simif_emul_vcs_t(const TargetConfig &config, int argc, char **argv) : simif_emul_t(config, std::vector(argv + 1, argv + argc)), - argc(argc), argv(argv) { -} + argc(argc), argv(argv) {} int simif_emul_vcs_t::run(simulation_t &sim) { start_driver(sim);