Lines Matching refs:timestamp

57 void CommandAnalysis::handleAct(unsigned bank, int64_t timestamp)
59 printWarningIfPoweredDown("Command issued while in power-down mode.", MemCommand::ACT, timestamp, bank);
71 first_act_cycle = timestamp;
72 precycles += zero_guard(timestamp - last_pre_cycle, "1 last_pre_cycle is in the future.");
73 idle_pre_update(timestamp, latest_pre_cycle);
77 latest_act_cycle = timestamp;
79 printWarning("Bank is already active!", MemCommand::ACT, timestamp, bank);
83 void CommandAnalysis::handleRd(unsigned bank, int64_t timestamp)
85 printWarningIfPoweredDown("Command issued while in power-down mode.", MemCommand::RD, timestamp, bank);
89 printWarning("Bank is not active!", MemCommand::RD, timestamp, bank);
92 idle_act_update(latest_read_cycle, latest_write_cycle, latest_act_cycle, timestamp);
93 latest_read_cycle = timestamp;
96 void CommandAnalysis::handleWr(unsigned bank, int64_t timestamp)
98 printWarningIfPoweredDown("Command issued while in power-down mode.", MemCommand::WR, timestamp, bank);
102 printWarning("Bank is not active!", MemCommand::WR, timestamp, bank);
105 idle_act_update(latest_read_cycle, latest_write_cycle, latest_act_cycle, timestamp);
106 latest_write_cycle = timestamp;
109 void CommandAnalysis::handleRef(unsigned bank, int64_t timestamp)
111 printWarningIfPoweredDown("Command issued while in power-down mode.", MemCommand::REF, timestamp, bank);
114 // timestamp, set the number of active cycles to RFC-RP and check
117 printWarningIfActive("One or more banks are active! REF requires all banks to be precharged.", MemCommand::REF, timestamp, bank);
119 idle_pre_update(timestamp, latest_pre_cycle);
120 first_act_cycle = timestamp;
121 std::fill(first_act_cycle_banks.begin(), first_act_cycle_banks.end(), timestamp);
122 precycles += zero_guard(timestamp - last_pre_cycle, "2 last_pre_cycle is in the future.");
123 last_pre_cycle = timestamp + memSpec.memTimingSpec.RFC - memSpec.memTimingSpec.RP;
134 void CommandAnalysis::handleRefB(unsigned bank, int64_t timestamp)
148 printWarning("Bank must be precharged for REFB!", MemCommand::REFB, timestamp, bank);
152 void CommandAnalysis::handlePre(unsigned bank, int64_t timestamp)
154 printWarningIfPoweredDown("Command issued while in power-down mode.", MemCommand::PRE, timestamp, bank);
166 actcyclesBanks[bank] += zero_guard(timestamp - first_act_cycle_banks[bank], "first_act_cycle is in the future (bank).");
174 actcycles += zero_guard(timestamp - first_act_cycle, "first_act_cycle is in the future.");
175 last_pre_cycle = timestamp;
176 idle_act_update(latest_read_cycle, latest_write_cycle, latest_act_cycle, timestamp);
180 latest_pre_cycle = timestamp;
182 printWarning("Bank is already precharged!", MemCommand::PRE, timestamp, bank);
186 void CommandAnalysis::handlePreA(unsigned bank, int64_t timestamp)
188 printWarningIfPoweredDown("Command issued while in power-down mode.", MemCommand::PREA, timestamp, bank);
203 actcycles += zero_guard(timestamp - first_act_cycle, "first_act_cycle is in the future.");
204 last_pre_cycle = timestamp;
210 actcyclesBanks[b] += zero_guard(timestamp - first_act_cycle_banks[b], "first_act_cycle is in the future (bank).");
214 idle_act_update(latest_read_cycle, latest_write_cycle, latest_act_cycle, timestamp);
216 latest_pre_cycle = timestamp;
222 printWarning("All banks are already precharged!", MemCommand::PREA, timestamp, bank);
226 void CommandAnalysis::handlePdnFAct(unsigned bank, int64_t timestamp)
233 printWarningIfNotActive("All banks are precharged! Incorrect use of Active Power-Down.", MemCommand::PDN_F_ACT, timestamp, bank);
236 pdn_cycle = timestamp;
237 actcycles += zero_guard(timestamp - first_act_cycle, "first_act_cycle is in the future.");
240 actcyclesBanks[b] += zero_guard(timestamp - first_act_cycle_banks[b], "first_act_cycle is in the future (bank).");
243 idle_act_update(latest_read_cycle, latest_write_cycle, latest_act_cycle, timestamp);
247 void CommandAnalysis::handlePdnSAct(unsigned bank, int64_t timestamp)
254 printWarningIfNotActive("All banks are precharged! Incorrect use of Active Power-Down.", MemCommand::PDN_S_ACT, timestamp, bank);
257 pdn_cycle = timestamp;
258 actcycles += zero_guard(timestamp - first_act_cycle, "first_act_cycle is in the future.");
261 actcyclesBanks[b] += zero_guard(timestamp - first_act_cycle_banks[b], "first_act_cycle is in the future (bank).");
264 idle_act_update(latest_read_cycle, latest_write_cycle, latest_act_cycle, timestamp);
268 void CommandAnalysis::handlePdnFPre(unsigned bank, int64_t timestamp)
274 printWarningIfActive("One or more banks are active! Incorrect use of Precharged Power-Down.", MemCommand::PDN_F_PRE, timestamp, bank);
276 pdn_cycle = timestamp;
277 precycles += zero_guard(timestamp - last_pre_cycle, "3 last_pre_cycle is in the future.");
278 idle_pre_update(timestamp, latest_pre_cycle);
282 void CommandAnalysis::handlePdnSPre(unsigned bank, int64_t timestamp)
288 printWarningIfActive("One or more banks are active! Incorrect use of Precharged Power-Down.", MemCommand::PDN_S_PRE, timestamp, bank);
290 pdn_cycle = timestamp;
291 precycles += zero_guard(timestamp - last_pre_cycle, "4 last_pre_cycle is in the future.");
292 idle_pre_update(timestamp, latest_pre_cycle);
296 void CommandAnalysis::handlePupAct(int64_t timestamp)
306 f_act_pdcycles += zero_guard(timestamp - pdn_cycle, "pdn_cycle is in the future.");
308 latest_act_cycle = timestamp;
310 s_act_pdcycles += zero_guard(timestamp - pdn_cycle, "pdn_cycle is in the future.");
313 latest_act_cycle = timestamp;
316 latest_act_cycle = timestamp + zero_guard(t.XPDLL - (2 * t.RCD), "t.XPDLL - (2 * t.RCD) < 0");
323 first_act_cycle = timestamp;
324 std::fill(first_act_cycle_banks.begin(), first_act_cycle_banks.end(), timestamp);
327 void CommandAnalysis::handlePupPre(int64_t timestamp)
334 f_pre_pdcycles += zero_guard(timestamp - pdn_cycle, "pdn_cycle is in the future.");
336 latest_pre_cycle = timestamp;
338 s_pre_pdcycles += zero_guard(timestamp - pdn_cycle, "pdn_cycle is in the future.");
341 latest_pre_cycle = timestamp;
344 latest_pre_cycle = timestamp + zero_guard(t.XPDLL - t.RCD - t.RP, "t.XPDLL - t.RCD - t.RP");
350 last_pre_cycle = timestamp;
353 void CommandAnalysis::handleSREn(unsigned bank, int64_t timestamp)
358 printWarningIfActive("One or more banks are active! SREF requires all banks to be precharged.", MemCommand::SREN, timestamp, bank);
360 sref_cycle = timestamp;
361 sref_cycle_window = timestamp;
364 precycles += zero_guard(timestamp - last_pre_cycle, "5 last_pre_cycle is in the future.");
365 idle_pre_update(timestamp, latest_pre_cycle);
369 void CommandAnalysis::handleSREx(unsigned bank, int64_t timestamp)
383 int64_t sref_duration = timestamp - sref_cycle;
387 printWarning("Invalid Self-Refresh duration!", MemCommand::SREX, timestamp, bank);
393 printWarning("Self-Refresh duration < CKESR!", MemCommand::SREX, timestamp, bank);
434 last_pre_cycle = timestamp;
440 sref_cycles += zero_guard(timestamp - sref_cycle_window, "sref_cycle_window is in the future.");
442 sref_cycles += zero_guard(timestamp - sref_cycle - t.RFC, "sref_cycle - t.RFC < 0");
448 latest_pre_cycle = timestamp + zero_guard(t.XS - t.RP, "t.XS - t.RP < 0");
451 latest_pre_cycle = timestamp + zero_guard(t.XSDLL - t.RCD - t.RP, "t.XSDLL - t.RCD - t.RP < 0");
507 last_pre_cycle = timestamp + spup_pre;
511 latest_pre_cycle = timestamp + zero_guard(t.XS - spup_pre - t.RP, "t.XS - spup_pre - t.RP < 0");
514 latest_pre_cycle = timestamp + zero_guard(t.XSDLL - t.RCD - spup_pre - t.RP, "t.XSDLL - t.RCD - spup_pre - t.RP");
556 last_pre_cycle = timestamp + spup_act + t.RP;
559 latest_pre_cycle = timestamp + zero_guard(t.XS - spup_act - (2 * t.RP), "t.XS - spup_act - (2 * t.RP) < 0");
562 latest_pre_cycle = timestamp + zero_guard(t.XSDLL - t.RCD - spup_act - (2 * t.RP), "t.XSDLL - t.RCD - spup_act - (2 * t.RP) < 0");
570 void CommandAnalysis::handleNopEnd(int64_t timestamp)
577 actcyclesBanks[b] += zero_guard(timestamp - first_act_cycle_banks[b], "first_act_cycle is in the future (bank)");
582 actcycles += zero_guard(timestamp - first_act_cycle, "first_act_cycle is in the future");
584 latest_act_cycle, timestamp);
586 precycles += zero_guard(timestamp - last_pre_cycle, "6 last_pre_cycle is in the future");
587 idle_pre_update(timestamp, latest_pre_cycle);
589 f_act_pdcycles += zero_guard(timestamp - pdn_cycle, "pdn_cycle is in the future");
591 s_act_pdcycles += zero_guard(timestamp - pdn_cycle, "pdn_cycle is in the future");
593 f_pre_pdcycles += zero_guard(timestamp - pdn_cycle, "pdn_cycle is in the future");
595 s_pre_pdcycles += zero_guard(timestamp - pdn_cycle, "pdn_cycle is in the future");
599 if (timestamp > sref_cycle + t.RFC) {
610 sref_cycles += zero_guard(timestamp - sref_cycle_window, "sref_cycle_window is in the future");
611 } else if (timestamp > sref_cycle + rfc_minus_rp) {
618 sref_ref_pre_cycles_window += timestamp - sref_cycle_window;
619 sref_ref_pre_cycles += timestamp - sref_cycle_window;
621 sref_ref_act_cycles_window += timestamp - sref_cycle_window;
622 sref_ref_act_cycles += timestamp - sref_cycle_window;