From 86e9a6ffecbeb1ba743c71786e934cf290bab7ff Mon Sep 17 00:00:00 2001 From: Matthias Jung Date: Fri, 1 Jul 2016 10:31:36 -0500 Subject: ext: Update DRAMPower Sync DRAMPower to external tool This patch syncs the DRAMPower library of gem5 to the external one on github (https://github.com/ravenrd/DRAMPower) of which I am a maintainer. The version used is the commit: 902a00a1797c48a9df97ec88868f20e847680ae6 from 07. May. 2016. Committed by Jason Lowe-Power --- ext/drampower/src/CommandAnalysis.h | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) (limited to 'ext/drampower/src/CommandAnalysis.h') diff --git a/ext/drampower/src/CommandAnalysis.h b/ext/drampower/src/CommandAnalysis.h index b5c7ac778..15261fb2f 100644 --- a/ext/drampower/src/CommandAnalysis.h +++ b/ext/drampower/src/CommandAnalysis.h @@ -58,10 +58,8 @@ class CommandAnalysis { MS_PDN_S_PRE = 13, MS_SREF = 14 }; - CommandAnalysis(); - // Returns number of reads, writes, acts, pres and refs in the trace - CommandAnalysis(const int nbrofBanks); + CommandAnalysis(const int64_t nbrofBanks); // Number of activate commands int64_t numberofacts; @@ -117,29 +115,25 @@ class CommandAnalysis { // Number of precharged auto-refresh cycles during self-refresh exit int64_t spup_ref_pre_cycles; + // function for clearing counters + void clearStats(const int64_t timestamp); + // function for clearing arrays void clear(); // To identify auto-precharges void getCommands(const MemorySpecification& memSpec, - const int - nbrofBanks, std::vector& list, bool lastupdate); private: - unsigned init; int64_t zero; - unsigned pop; // Cached last read command from the file std::vector cached_cmd; // Stores the memory commands for analysis std::vector cmd_list; - // Stores all memory commands for analysis - std::vector full_cmd_list; - // To save states of the different banks, before entering active // power-down mode (slow/fast-exit). std::vector last_states; @@ -171,26 +165,20 @@ class CommandAnalysis { // Memory State unsigned mem_state; + unsigned num_active_banks; // Clock cycle of first activate command when memory state changes to ACT int64_t first_act_cycle; // Clock cycle of last precharge command when memory state changes to PRE int64_t last_pre_cycle; - // To collect and analyse all commands including auto-precharges - void analyse_commands(const int nbrofBanks, - Data::MemorySpecification - memSpec, - int64_t nCommands, - int64_t nCached, - bool lastupdate); + // To perform timing analysis of a given set of commands and update command counters void evaluate(const MemorySpecification& memSpec, - std::vector& cmd_list, - int nbrofBanks); + std::vector& cmd_list); // To calculate time of completion of any issued command - int timeToCompletion(const MemorySpecification& memSpec, + int64_t timeToCompletion(const MemorySpecification& memSpec, MemCommand::cmds type); // To update idle period information whenever active cycles may be idle @@ -207,6 +195,7 @@ class CommandAnalysis { void printWarningIfActive(const std::string& warning, int type, int64_t timestamp, int bank); void printWarningIfNotActive(const std::string& warning, int type, int64_t timestamp, int bank); + void printWarningIfPoweredDown(const std::string& warning, int type, int64_t timestamp, int bank); void printWarning(const std::string& warning, int type, int64_t timestamp, int bank); }; } -- cgit v1.2.3