Added JSON dump
This commit is contained in:
parent
0ee1deb675
commit
04b5b6b202
|
@ -29,3 +29,4 @@ language.settings.xml
|
||||||
/*.log
|
/*.log
|
||||||
/.gdbinit
|
/.gdbinit
|
||||||
/*.out
|
/*.out
|
||||||
|
/dump.json
|
||||||
|
|
|
@ -61,7 +61,8 @@ int sc_main(int argc, char *argv[]) {
|
||||||
("reset,r", po::value<std::string>(), "reset address")
|
("reset,r", po::value<std::string>(), "reset address")
|
||||||
("trace,t", po::value<unsigned>()->default_value(0), "enable tracing, or combintation of 1=signals and 2=TX text, 4=TX compressed text, 6=TX in SQLite")
|
("trace,t", po::value<unsigned>()->default_value(0), "enable tracing, or combintation of 1=signals and 2=TX text, 4=TX compressed text, 6=TX in SQLite")
|
||||||
("max_time,m", po::value<std::string>(), "maximum time to run")
|
("max_time,m", po::value<std::string>(), "maximum time to run")
|
||||||
("config-file,c", po::value<std::string>()->default_value(""), "configuration file");
|
("config-file,c", po::value<std::string>()->default_value(""), "read configuration from file")
|
||||||
|
("dump-config", po::value<std::string>()->default_value(""), "dump configuration to file file");
|
||||||
// clang-format on
|
// clang-format on
|
||||||
po::variables_map vm;
|
po::variables_map vm;
|
||||||
try {
|
try {
|
||||||
|
@ -111,7 +112,11 @@ int sc_main(int argc, char *argv[]) {
|
||||||
platform i_simple_system("i_simple_system");
|
platform i_simple_system("i_simple_system");
|
||||||
// sr_report_handler::add_sc_object_to_filter(&i_simple_system.i_master,
|
// sr_report_handler::add_sc_object_to_filter(&i_simple_system.i_master,
|
||||||
// sc_core::SC_WARNING, sc_core::SC_MEDIUM);
|
// sc_core::SC_WARNING, sc_core::SC_MEDIUM);
|
||||||
// cfg.dump_hierarchy();
|
if (vm.count("dump-config")){
|
||||||
|
std::ofstream of{vm["dump-config"].as<std::string>()};
|
||||||
|
if(of.is_open())
|
||||||
|
cfg.dump_configuration(of);
|
||||||
|
}
|
||||||
cfg.configure();
|
cfg.configure();
|
||||||
// overwrite with command line settings
|
// overwrite with command line settings
|
||||||
if (vm.count("gdb-port"))
|
if (vm.count("gdb-port"))
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 251a735cea414b4a79da99ca438da4335bb0fbc5
|
Subproject commit 02cb1756166adb7074f6e5dfa106ca5ab04176c6
|
|
@ -1,10 +1,13 @@
|
||||||
{
|
{
|
||||||
"i_simple_system":{
|
"i_simple_system":{
|
||||||
"i_uart0":{
|
"i_uart0":{
|
||||||
"write_to_ws": true
|
"write_to_ws": false
|
||||||
|
},
|
||||||
|
"i_uart1":{
|
||||||
|
"write_to_ws": false
|
||||||
},
|
},
|
||||||
"i_gpio0":{
|
"i_gpio0":{
|
||||||
"write_to_ws": true
|
"write_to_ws": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue