6#include "ExampleSimulation.hpp"
8#include "sparta/parsers/ConfigEmitterYAML.hpp"
11#include "sparta/sparta.hpp"
17 " [-i insts] [-r RUNTIME] [--show-tree] [--show-dag]\n"
18 " [-p PATTERN VAL] [-c FILENAME]\n"
19 " [--node-config-file PATTERN FILENAME]\n"
20 " [-l PATTERN CATEGORY DEST]\n"
24constexpr char VERSION_VARNAME[] =
"version";
27int main(
int argc,
char **argv)
30 uint32_t num_cores = 1;
36 argc, argv,
"",
"", {});
46 auto& app_opts = cls.getApplicationOptions();
47 app_opts.add_options()
49 "produce version message",
50 "produce version message")
51 (
"instruction-limit,i",
52 sparta::app::named_value<uint64_t>(
"LIMIT", &ilimit)->default_value(ilimit),
53 "Limit the simulation to retiring a specific number of instructions. 0 (default) "
54 "means no limit. If -r is also specified, the first limit reached ends the simulation",
55 "End simulation after a number of instructions. Note that if set to 0, this may be "
56 "overridden by a node parameter within the simulator")
58 sparta::app::named_value<uint32_t>(
"CORES", &num_cores)->default_value(1),
59 "The number of cores in simulation",
"The number of cores in simulation")
61 "Show the registered factories");
70 if(!cls.parse(argc, argv, err_code)){
74 bool show_factories =
false;
75 auto& vm = cls.getVariablesMap();
76 if(vm.count(
"show-factories") != 0) {
77 show_factories =
true;
88 cls.populateSimulation(&sim);
90 cls.runSimulator(&sim);
92 cls.postProcess(&sim);
Class for creating a simulator based on command-line arguments.
Wrapper for boost program_options option_description that allows multiple levels of detail.
ExampleSimulator which builds the model and configures it.
A class that lets you schedule events now and in the future.
Contains information describing the simulation instance for the purpose of identifying the simulation...
static SimulationInfo & getInstance()
Gets the SimulationInfo singleton instance.
Command line simulator front-end class with argument parsing Works in conjunction with sparta::app::S...
Optional default values for the simulator which can be customized and provided by anyone instantiatin...
std::string auto_summary_default