lib_test.cc (10428:0caf62b57dfd) lib_test.cc (11555:2efa95cf8504)
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);
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 test.doCommand(MemCommand::PDN_F_ACT,3,248);
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);
83
84 //set bool to true when this is the last update of the counters
85 test.updateCounters(true);
86
87 // At the end of your simulation call the getEnergy(...)
88 // function to print the power report
89 test.calcEnergy();
90

--- 10 unchanged lines hidden (view full) ---

101 std::cout << "PRE Cmd Energy" << "\t" << test.getEnergy().pre_energy << endl;
102 std::cout << "Read Cmd Energy" << "\t" << test.getEnergy().read_energy << endl;
103 std::cout << "Write Cmd Energy" << "\t" << test.getEnergy().write_energy << endl;
104 //Standby Energy for 1 rank
105 //In total energy calculated for both ranks= test.memSpec.memArchSpec *
106 //test.getEnergy().act_stdby_energy
107 std::cout << "ACT Std Energy" << "\t" << test.getEnergy().act_stdby_energy << endl;
108 //total active standby energy for both ranks
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
109 std::cout << "ACT Std Energy total ranks" << "\t" << memSpec.memArchSpec.nbrOfRanks *
110 std::cout << "ACT Std Energy total ranks" << "\t" << static_cast<double>(memSpec.memArchSpec.nbrOfRanks) *
110 test.getEnergy().act_stdby_energy << "\n" ;
111 std::cout << "PRE Std Energy" << "\t" << test.getEnergy().pre_stdby_energy << endl;
112 std::cout << "Total Energy" << "\t" << test.getEnergy().total_energy << endl;
113 //many other energies in test.mpm.energy
114
115 //Powers per Rank
116 std::cout << "Average Power" << "\t" << test.getPower().average_power << endl;
117 //many other powers in test.getPower()
118
119 // Test clearState function.
120 test.clearState();
121 return 0;
122}
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}