45 using base_type = sc_core::sc_module;
46 using broker_t = cci::cci_broker_handle;
47 using cci_param_cln = std::vector<std::pair<cci::cci_param_post_write_callback_untyped, std::unique_ptr<cci::cci_param_untyped>>>;
48 enum { NEVER = 0, BEFORE_END_OF_ELABORATION = 1, END_OF_ELABORATION = 2, START_OF_SIMULATION = 4 };
54 configurer(std::string
const& filename,
unsigned sc_attr_config_phases = BEFORE_END_OF_ELABORATION);
68 void read_input_file(std::string
const& filename);
84 void dump_configuration(std::string
const& file_name,
bool with_description =
false,
bool complete =
true,
85 std::vector<std::string> stop_list = std::vector<std::string>{}) {
86 dump_file_name = file_name;
87 this->with_description = with_description;
88 this->stop_list = stop_list;
89 this->complete = complete;
102 void dump_configuration(std::ostream& os = std::cout,
bool as_yaml =
true,
bool with_description =
false,
bool complete =
true,
103 sc_core::sc_object* obj =
nullptr);
113 template <
typename T>
void set_value(std::string
const& hier_name, T value) {
set_value(hier_name, cci::cci_value(value)); }
142 SCCFATAL() <<
"No configurer instantiated when using it";
147 unsigned const config_phases;
148 std::string dump_file_name{
""};
149 bool with_description{
false};
151 std::vector<std::string> stop_list{};
152 configurer(std::string
const& filename,
unsigned sc_attr_config_phases, sc_core::sc_module_name nm);
154 void before_end_of_elaboration()
override {
155 if(config_phases & BEFORE_END_OF_ELABORATION)
158 void end_of_elaboration()
override {
159 if(config_phases & END_OF_ELABORATION)
162 void start_of_simulation()
override;
164 void set_value(
const std::string& hier_name, cci::cci_value value);
165 cci_param_cln cci2sc_attr;
166 cci::cci_originator cci_originator;
167 std::unique_ptr<ConfigHolder> root;