diff options
author | Matthias Jung <jungma@eit.uni-kl.de> | 2016-07-01 10:31:36 -0500 |
---|---|---|
committer | Matthias Jung <jungma@eit.uni-kl.de> | 2016-07-01 10:31:36 -0500 |
commit | 86e9a6ffecbeb1ba743c71786e934cf290bab7ff (patch) | |
tree | 8b114edcc523409f6b2cb33b9ae910cea2ca4e5a /ext/drampower/src/CommandAnalysis.h | |
parent | 137e244bda708e27882aa8b2f13d47cfd17e9d97 (diff) | |
download | gem5-86e9a6ffecbeb1ba743c71786e934cf290bab7ff.tar.xz |
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 <jason@lowepower.com>
Diffstat (limited to 'ext/drampower/src/CommandAnalysis.h')
-rw-r--r-- | ext/drampower/src/CommandAnalysis.h | 29 |
1 files changed, 9 insertions, 20 deletions
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<MemCommand>& list, bool lastupdate); private: - unsigned init; int64_t zero; - unsigned pop; // Cached last read command from the file std::vector<MemCommand> cached_cmd; // Stores the memory commands for analysis std::vector<MemCommand> cmd_list; - // Stores all memory commands for analysis - std::vector<MemCommand> full_cmd_list; - // To save states of the different banks, before entering active // power-down mode (slow/fast-exit). std::vector<int> 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<MemCommand>& cmd_list, - int nbrofBanks); + std::vector<MemCommand>& 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); }; } |