/* * $Id: OOO_Engine.cpp 88 2008-12-10 18:31:39Z rosiere $ * * [ Description ] * */ #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/include/OOO_Engine.h" namespace morpheo { namespace behavioural { namespace core { namespace multi_ooo_engine { namespace ooo_engine { #undef FUNCTION #define FUNCTION "OOO_Engine::OOO_Engine" OOO_Engine::OOO_Engine ( #ifdef SYSTEMC sc_module_name name, #else string name, #endif #ifdef STATISTICS morpheo::behavioural::Parameters_Statistics * param_statistics, #endif morpheo::behavioural::core::multi_ooo_engine::ooo_engine::Parameters * param, morpheo::behavioural::Tusage_t usage ): _name (name) ,_param (param) ,_usage (usage) { log_begin(OOO_Engine,FUNCTION); usage_environment(_usage); #if DEBUG_OOO_Engine == true log_printf(TRACE,OOO_Engine,FUNCTION,_("<%s> Parameters"),_name.c_str()); std::cout << *param << std::endl; #endif log_printf(INFO,OOO_Engine,FUNCTION,_("<%s> Allocation"),_name.c_str()); allocation ( #ifdef STATISTICS param_statistics #endif ); #ifdef STATISTICS if (usage_is_set(_usage,USE_STATISTICS)) { log_printf(INFO,OOO_Engine,FUNCTION,_("<%s> Allocation of statistics"),_name.c_str()); statistics_allocation(param_statistics); } #endif #ifdef VHDL if (usage_is_set(_usage,USE_VHDL)) { // generate the vhdl log_printf(INFO,OOO_Engine,FUNCTION,_("<%s> Generate the vhdl"),_name.c_str()); vhdl(); } #endif #ifdef SYSTEMC if (usage_is_set(_usage,USE_SYSTEMC)) { log_printf(INFO,OOO_Engine,FUNCTION,_("<%s> Method - transition"),_name.c_str()); SC_METHOD (transition); dont_initialize (); sensitive << (*(in_CLOCK)).pos(); # ifdef SYSTEMCASS_SPECIFIC // List dependency information # endif #endif } log_end(OOO_Engine,FUNCTION); }; #undef FUNCTION #define FUNCTION "OOO_Engine::~OOO_Engine" OOO_Engine::~OOO_Engine (void) { log_begin(OOO_Engine,FUNCTION); #ifdef STATISTICS if (usage_is_set(_usage,USE_STATISTICS)) { statistics_deallocation(); } #endif log_printf(INFO,OOO_Engine,FUNCTION,_("<%s> Deallocation"),_name.c_str()); deallocation (); log_end(OOO_Engine,FUNCTION); }; }; // end namespace ooo_engine }; // end namespace multi_ooo_engine }; // end namespace core }; // end namespace behavioural }; // end namespace morpheo