diff --git a/src/Configuration/ModelConfig/ModelConfig.cpp b/src/Configuration/ModelConfig/ModelConfig.cpp index 4c06c87e5..fa7eed070 100644 --- a/src/Configuration/ModelConfig/ModelConfig.cpp +++ b/src/Configuration/ModelConfig/ModelConfig.cpp @@ -917,11 +917,8 @@ void model_config_entry(CFGCommon_ARG* cmdarg) { CFGArg::parse("model_config|gen_bitstream_setting_xml", cmdarg->raws.size(), &cmdarg->raws[0], flag_options, options, positional_options, {"is_unittest"}, {"device_size", "design", "pin"}, {}, 2); - ModelConfig_BITSREAM_SETTINGS_XML* xml = - new ModelConfig_BITSREAM_SETTINGS_XML(flag_options, options, - positional_options[0], - positional_options[1]); - delete xml; + ModelConfig_BITSREAM_SETTINGS_XML::gen( + flag_options, options, positional_options[0], positional_options[1]); } else if (cmdarg->raws[0] == "backdoor") { CFGArg::parse("model_config|gen_ppdb", cmdarg->raws.size(), &cmdarg->raws[0], flag_options, options, positional_options, diff --git a/src/Configuration/ModelConfig/ModelConfig_BITSTREAM_SETTING_XML.cpp b/src/Configuration/ModelConfig/ModelConfig_BITSTREAM_SETTING_XML.cpp index 52366b7ec..e77c01662 100644 --- a/src/Configuration/ModelConfig/ModelConfig_BITSTREAM_SETTING_XML.cpp +++ b/src/Configuration/ModelConfig/ModelConfig_BITSTREAM_SETTING_XML.cpp @@ -36,9 +36,9 @@ struct PIN_INFO { }; /* - Constructor + Generate bitstream setting XML */ -ModelConfig_BITSREAM_SETTINGS_XML::ModelConfig_BITSREAM_SETTINGS_XML( +void ModelConfig_BITSREAM_SETTINGS_XML::gen( const std::vector& flag_options, const std::map& options, const std::string& input, const std::string& output) { @@ -144,9 +144,4 @@ ModelConfig_BITSREAM_SETTINGS_XML::ModelConfig_BITSREAM_SETTINGS_XML( } } -/* - Destructor -*/ -ModelConfig_BITSREAM_SETTINGS_XML::~ModelConfig_BITSREAM_SETTINGS_XML() {} - } // namespace FOEDAG diff --git a/src/Configuration/ModelConfig/ModelConfig_BITSTREAM_SETTING_XML.h b/src/Configuration/ModelConfig/ModelConfig_BITSTREAM_SETTING_XML.h index 7637bde12..b3a11ec22 100644 --- a/src/Configuration/ModelConfig/ModelConfig_BITSTREAM_SETTING_XML.h +++ b/src/Configuration/ModelConfig/ModelConfig_BITSTREAM_SETTING_XML.h @@ -32,11 +32,9 @@ namespace FOEDAG { class ModelConfig_BITSREAM_SETTINGS_XML { public: - ModelConfig_BITSREAM_SETTINGS_XML( - const std::vector& flag_options, - const std::map& options, - const std::string& input, const std::string& output); - ~ModelConfig_BITSREAM_SETTINGS_XML(); + static void gen(const std::vector& flag_options, + const std::map& options, + const std::string& input, const std::string& output); private: };