Last change
on this file since 75 was
55,
checked in by rosiere, 17 years ago
|
Ajout SystemC read_queue et reservation_station
Ajout port au bloc registerfile_monolithic (à ajouter également au bloc registerfile et registerfile_multi_banked)
Modif param : passage de pointeur (attention, tous les composants n'ont pas été tous modifier)
|
File size:
1.7 KB
|
Rev | Line | |
---|
[55] | 1 | /* |
---|
| 2 | * $Id$ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | * Test "RegisterFile" |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #ifdef SYSTEMC |
---|
| 10 | #include "systemc.h" |
---|
| 11 | #endif |
---|
| 12 | |
---|
| 13 | #include <string> |
---|
| 14 | #include <iostream> |
---|
| 15 | #include <sys/time.h> |
---|
| 16 | |
---|
| 17 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Reservation_station.h" |
---|
| 18 | |
---|
| 19 | using namespace std; |
---|
| 20 | using namespace morpheo; |
---|
| 21 | using namespace morpheo::behavioural; |
---|
| 22 | using namespace morpheo::behavioural::core; |
---|
| 23 | using namespace morpheo::behavioural::core::multi_execute_loop; |
---|
| 24 | using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop; |
---|
| 25 | using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit; |
---|
| 26 | using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit; |
---|
| 27 | |
---|
| 28 | using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station; |
---|
| 29 | |
---|
| 30 | void test (string name, |
---|
| 31 | morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Parameters * param); |
---|
| 32 | |
---|
| 33 | class Time |
---|
| 34 | { |
---|
| 35 | private : timeval time_begin; |
---|
| 36 | // private : timeval time_end; |
---|
| 37 | |
---|
| 38 | public : Time () |
---|
| 39 | { |
---|
| 40 | gettimeofday(&time_begin ,NULL); |
---|
| 41 | }; |
---|
| 42 | |
---|
| 43 | public : ~Time () |
---|
| 44 | { |
---|
| 45 | cout << *this; |
---|
| 46 | }; |
---|
| 47 | |
---|
| 48 | public : friend ostream& operator<< (ostream& output_stream, |
---|
| 49 | const Time & x) |
---|
| 50 | { |
---|
| 51 | timeval time_end; |
---|
| 52 | |
---|
| 53 | gettimeofday(&time_end ,NULL); |
---|
| 54 | |
---|
| 55 | uint32_t nb_cycles = static_cast<uint32_t>(sc_simulation_time()); |
---|
| 56 | |
---|
| 57 | double average = static_cast<double>(nb_cycles) / static_cast<double>(time_end.tv_sec-x.time_begin.tv_sec); |
---|
| 58 | |
---|
| 59 | output_stream << nb_cycles << "\t(" << average << " cycles / seconds )" << endl; |
---|
| 60 | |
---|
| 61 | return output_stream; |
---|
| 62 | } |
---|
| 63 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.