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

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