/* * Configuration.h * * Created on: Mar 6, 2014 * Author: jonny */ #ifndef CONFIGURATION_H_ #define CONFIGURATION_H_ #include #include #include "MemSpec.h" namespace core{ enum class EPowerDownMode{NoPowerDown, Staggered, TimeoutPDN, TimeoutSREF}; struct Configuration { static std::string memspecUri; static std::string memconfigUri; static inline Configuration& getInstance() { static Configuration configuration; return configuration; } //MemConfig bool BankwiseLogic = false; bool OpenPagePolicy = true; bool AdaptiveOpenPagePolicy = false; bool RefreshAwareScheduling = false; unsigned int MaxNrOfTransactions = 50; std::string Scheduler; unsigned int Capsize = 5; sc_time getPowerDownTimeout(){return powerDownTimeoutInClk*memSpec.clk;} EPowerDownMode PowerDownMode = EPowerDownMode::Staggered; unsigned int Buswidth = 128; bool ReadWriteGrouping = false; bool ModelStorage = false; bool ModelErrorInjection = false; bool ReorderBuffer = false; //SimConfig bool DatabaseRecording = true; bool PowerAnalysys = false; bool Debug = false; //MemSpec(from DRAM-Power XML) MemSpec memSpec; void setParameter(std::string name, std::string value); void setParameters(std::map parameterMap); private: Configuration(); unsigned int powerDownTimeoutInClk = 3; }; } /* namespace core */ #endif /* CONFIGURATION_H_ */