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 | |
---|
16 | RegisterFile::RegisterFile ( |
---|
17 | #ifdef SYSTEMC |
---|
18 | sc_module_name name, |
---|
19 | #else |
---|
20 | std::string name, |
---|
21 | #endif |
---|
22 | #ifdef STATISTICS |
---|
23 | morpheo::behavioural::Parameters_Statistics * param_statistics, |
---|
24 | #endif |
---|
25 | morpheo::behavioural::generic::registerfile::Parameters * param, |
---|
26 | Tusage_t usage): |
---|
27 | _name (name) |
---|
28 | ,_param (param) |
---|
29 | ,_usage (usage) |
---|
30 | { |
---|
31 | log_printf(FUNC,RegisterFile,"RegisterFile","Begin"); |
---|
32 | |
---|
33 | #ifdef SYSTEMC |
---|
34 | log_printf(INFO,RegisterFile,"RegisterFile","Allocation"); |
---|
35 | |
---|
36 | allocation ( |
---|
37 | # ifdef STATISTICS |
---|
38 | param_statistics |
---|
39 | # endif |
---|
40 | ); |
---|
41 | #endif |
---|
42 | |
---|
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 | |
---|
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 |
---|