source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic.cpp @ 146

Last change on this file since 146 was 146, checked in by rosiere, 13 years ago

1) Integration of RegisterFile_Internal_Banked in RegisterFile?
2) Erase "read_write" interface in RegisterFile_Monolithic component
3) Add smith predictor parameters in Load_store_pointer_unit.
4) Fix not statistics flags

  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
1/*
2 * $Id: RegisterFile_Monolithic.cpp 146 2011-02-01 20:57:54Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h"
9
10namespace morpheo                    {
11namespace behavioural                {
12namespace generic                    {
13namespace registerfile               {
14namespace registerfile_monolithic    {
15
16  RegisterFile_Monolithic::RegisterFile_Monolithic
17  (
18#ifdef SYSTEMC
19   sc_module_name name,
20#else
21   std::string name        ,
22#endif
23#ifdef STATISTICS
24   morpheo::behavioural::Parameters_Statistics            * param_statistics,
25#endif
26   morpheo::behavioural::generic::registerfile::registerfile_monolithic::Parameters * param,
27   morpheo::behavioural::Tusage_t usage
28   ):
29    _name  (name),
30    _param (param),
31    _usage (usage)
32  {
33    log_printf(FUNC,RegisterFile_Monolithic,"RegisterFile_Monolithic","Begin");
34
35// #if DEBUG_RegisterFile_Monolithic == true
36//     log_printf(INFO,RegisterFile_Monolithic,FUNCTION,_("<%s> Parameters"),_name.c_str());
37
38//     std::cout << *param << std::endl;
39// #endif   
40
41    log_printf(INFO,RegisterFile_Monolithic,"RegisterFile_Monolithic","Allocation");
42    allocation ();
43
44#ifdef STATISTICS
45    if (usage_is_set(_usage,USE_STATISTICS))
46      statistics_declaration(param_statistics);
47#endif
48
49#ifdef VHDL
50    // generate the vhdl
51    if (usage_is_set(_usage,USE_VHDL))
52      vhdl();
53#endif
54
55#ifdef SYSTEMC
56    if (usage_is_set(_usage,USE_SYSTEMC))
57      {
58
59# ifdef SYSTEMCASS_SPECIFIC
60        constant();
61#else
62        SC_METHOD (constant);
63//      dont_initialize ();
64#endif
65
66        SC_METHOD (transition);
67        dont_initialize ();
68        sensitive << (*(in_CLOCK)).pos();
69
70        SC_METHOD (genMealy_read);
71        dont_initialize ();
72        sensitive << (*(in_CLOCK)).neg()
73                  << (*(in_NRESET));
74
75        for (uint32_t i=0; i<_param->_nb_port_read; i++)
76          {
77            sensitive << *(in_READ_VAL     [i]);
78            if (_param->_have_port_address)
79              sensitive << *(in_READ_ADDRESS [i]);
80          }
81       
82# ifdef SYSTEMCASS_SPECIFIC
83        // List dependency information
84        for (uint32_t i=0; i<_param->_nb_port_read; i++)
85          {
86            (*(out_READ_DATA  [i])) (*( in_READ_VAL     [i]));
87            if (_param->_have_port_address)
88              (*(out_READ_DATA  [i])) (*( in_READ_ADDRESS [i]));
89          }
90# endif   
91      }
92#endif
93   
94    log_printf(FUNC,RegisterFile_Monolithic,"RegisterFile_Monolithic","End");
95  };
96 
97  RegisterFile_Monolithic::~RegisterFile_Monolithic (void)
98  {
99#ifdef STATISTICS
100    if (usage_is_set(_usage,USE_STATISTICS))
101      delete _stat;
102#endif
103
104    deallocation ();
105  };
106
107}; // end namespace registerfile_monolithic
108}; // end namespace registerfile
109}; // end namespace generic
110}; // end namespace behavioural         
111}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.