Changeset 94 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest
- Timestamp:
- Dec 15, 2008, 12:04:03 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/include/test.h
r81 r94 13 13 #include <iostream> 14 14 #include <sys/time.h> 15 15 #include "Common/include/Time.h" 16 16 #include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h" 17 17 … … 26 26 morpheo::behavioural::generic::registerfile::registerfile_monolithic::Parameters * param); 27 27 28 class Time29 {30 private : timeval time_begin;31 // private : timeval time_end;32 33 public : Time ()34 {35 gettimeofday(&time_begin ,NULL);36 };37 38 public : ~Time ()39 {40 cout << *this;41 };42 43 public : friend ostream& operator<< (ostream& output_stream,44 const Time & x)45 {46 timeval time_end;47 48 gettimeofday(&time_end ,NULL);49 50 uint32_t nb_cycles = static_cast<uint32_t>(sc_simulation_time());51 52 double average = static_cast<double>(nb_cycles) / static_cast<double>(time_end.tv_sec-x.time_begin.tv_sec);53 54 output_stream << nb_cycles << "\t(" << average << " cycles / seconds )" << endl;55 56 return output_stream;57 }58 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/src/test.cpp
r88 r94 2 2 * $Id$ 3 3 * 4 * [ 4 * [ Description ] 5 5 * 6 6 * Test 7 7 */ 8 8 9 #define NB_ITERATION 1 610 #define CYCLE_MAX 10 24*NB_ITERATION9 #define NB_ITERATION 1 10 #define CYCLE_MAX 100000*NB_ITERATION 11 11 #include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/include/test.h" 12 12 #include "Common/include/Test.h"
Note: See TracChangeset
for help on using the changeset viewer.