[53] | 1 | /* |
---|
| 2 | * $Id: RegisterFile.cpp 82 2008-05-01 16:48:45Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Generic/RegisterFile/include/RegisterFile.h" |
---|
| 9 | |
---|
| 10 | namespace morpheo { |
---|
| 11 | namespace behavioural { |
---|
| 12 | namespace generic { |
---|
| 13 | namespace registerfile { |
---|
| 14 | |
---|
| 15 | |
---|
[82] | 16 | RegisterFile::RegisterFile ( |
---|
[53] | 17 | #ifdef SYSTEMC |
---|
[82] | 18 | sc_module_name name, |
---|
[53] | 19 | #else |
---|
[82] | 20 | std::string name, |
---|
[53] | 21 | #endif |
---|
| 22 | #ifdef STATISTICS |
---|
[62] | 23 | morpheo::behavioural::Parameters_Statistics * param_statistics, |
---|
[53] | 24 | #endif |
---|
[82] | 25 | morpheo::behavioural::generic::registerfile::Parameters * param, |
---|
| 26 | Tusage_t usage): |
---|
| 27 | _name (name) |
---|
| 28 | ,_param (param) |
---|
| 29 | ,_usage (usage) |
---|
[53] | 30 | { |
---|
| 31 | log_printf(FUNC,RegisterFile,"RegisterFile","Begin"); |
---|
| 32 | |
---|
| 33 | #ifdef SYSTEMC |
---|
| 34 | log_printf(INFO,RegisterFile,"RegisterFile","Allocation"); |
---|
| 35 | |
---|
[75] | 36 | allocation ( |
---|
| 37 | # ifdef STATISTICS |
---|
| 38 | param_statistics |
---|
| 39 | # endif |
---|
| 40 | ); |
---|
[53] | 41 | #endif |
---|
| 42 | |
---|
[75] | 43 | #ifdef STATISTICS |
---|
| 44 | if (_param->_instance == instance_RegisterFile_Monolithic) |
---|
| 45 | _stat = component_RegisterFile_Monolithic ->_stat; |
---|
| 46 | else |
---|
| 47 | _stat = component_RegisterFile_Multi_Banked->_stat; |
---|
| 48 | #endif |
---|
| 49 | |
---|
[53] | 50 | log_printf(FUNC,RegisterFile,"RegisterFile","End"); |
---|
| 51 | }; |
---|
| 52 | |
---|
| 53 | RegisterFile::~RegisterFile (void) |
---|
| 54 | { |
---|
| 55 | log_printf(FUNC,RegisterFile,"~RegisterFile","Begin"); |
---|
| 56 | |
---|
| 57 | #ifdef SYSTEMC |
---|
| 58 | log_printf(INFO,RegisterFile,"~RegisterFile","Deallocation"); |
---|
| 59 | |
---|
| 60 | deallocation (); |
---|
| 61 | #endif |
---|
| 62 | |
---|
| 63 | log_printf(FUNC,RegisterFile,"~RegisterFile","End"); |
---|
| 64 | }; |
---|
| 65 | |
---|
| 66 | }; // end namespace registerfile |
---|
| 67 | }; // end namespace generic |
---|
| 68 | |
---|
| 69 | }; // end namespace behavioural |
---|
| 70 | }; // end namespace morpheo |
---|