1/* 2 * Copyright (c) 2014, TU Delft, TU Eindhoven and TU Kaiserslautern 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: 8 * --- 65 unchanged lines hidden (view full) --- 74 test.doCommand(MemCommand::ACT,0,137); 75 test.doCommand(MemCommand::RDA,0,152); 76 test.doCommand(MemCommand::ACT,3,159); 77 test.doCommand(MemCommand::RDA,3,174); 78 test.doCommand(MemCommand::ACT,0,195); 79 test.doCommand(MemCommand::RDA,0,210); 80 test.doCommand(MemCommand::ACT,4,232); 81 test.doCommand(MemCommand::WRA,4,247); |
82 // Need at least tWRAPDEN = AL + CWL + BL/2 + WR + 1 cycles between WR and PDN_F_PRE 83 test.doCommand(MemCommand::PDN_F_PRE,3,265); |
84 85 //set bool to true when this is the last update of the counters 86 test.updateCounters(true); 87 88 // At the end of your simulation call the getEnergy(...) 89 // function to print the power report 90 test.calcEnergy(); 91 --- 10 unchanged lines hidden (view full) --- 102 std::cout << "PRE Cmd Energy" << "\t" << test.getEnergy().pre_energy << endl; 103 std::cout << "Read Cmd Energy" << "\t" << test.getEnergy().read_energy << endl; 104 std::cout << "Write Cmd Energy" << "\t" << test.getEnergy().write_energy << endl; 105 //Standby Energy for 1 rank 106 //In total energy calculated for both ranks= test.memSpec.memArchSpec * 107 //test.getEnergy().act_stdby_energy 108 std::cout << "ACT Std Energy" << "\t" << test.getEnergy().act_stdby_energy << endl; 109 //total active standby energy for both ranks |
110 std::cout << "ACT Std Energy total ranks" << "\t" << static_cast<double>(memSpec.memArchSpec.nbrOfRanks) * |
111 test.getEnergy().act_stdby_energy << "\n" ; 112 std::cout << "PRE Std Energy" << "\t" << test.getEnergy().pre_stdby_energy << endl; 113 std::cout << "Total Energy" << "\t" << test.getEnergy().total_energy << endl; 114 //many other energies in test.mpm.energy 115 116 //Powers per Rank 117 std::cout << "Average Power" << "\t" << test.getPower().average_power << endl; 118 //many other powers in test.getPower() 119 120 // Test clearState function. 121 test.clearState(); 122 return 0; 123} |