Ignore:
Timestamp:
Dec 10, 2008, 7:31:39 PM (15 years ago)
Author:
rosiere
Message:

Almost complete design
with Test and test platform

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked.cpp

    r82 r88  
    1414namespace registerfile_multi_banked {
    1515
     16#undef  FUNCTION
     17#define FUNCTION "RegisterFile_Multi_Banked::RegisterFile_Multi_Banked"
    1618  RegisterFile_Multi_Banked::RegisterFile_Multi_Banked
    1719  (
     
    3032    ,_usage (usage)
    3133  {
    32     log_printf(FUNC,RegisterFile_Multi_Banked,"RegisterFile_Multi_Banked","Begin");
     34    log_printf(FUNC,RegisterFile_Multi_Banked,FUNCTION,"Begin");
    3335
    34 #ifdef SYSTEMC
    35     log_printf(INFO,RegisterFile_Multi_Banked,"RegisterFile_Multi_Banked","Allocation");
     36#if DEBUG_RegisterFile_Multi_Banked == true
     37    log_printf(INFO,RegisterFile_Multi_Banked,FUNCTION,_("<%s> Parameters"),_name.c_str());
    3638
     39    std::cout << *param << std::endl;
     40#endif   
     41
     42    log_printf(INFO,RegisterFile_Multi_Banked,FUNCTION,"Allocation");
     43   
    3744    allocation ();
    38 #endif
    3945
    4046#ifdef STATISTICS
    41     log_printf(INFO,RegisterFile_Multi_Banked,"RegisterFile_Multi_Banked","Allocation of statistics");
    42 
    43     // Allocation of statistics
    44     statistics_declaration(param_statistics);
     47    if (usage_is_set(_usage,USE_STATISTICS))
     48      {
     49        log_printf(INFO,RegisterFile_Multi_Banked,FUNCTION,"Allocation of statistics");
     50       
     51        // Allocation of statistics
     52        statistics_declaration(param_statistics);
     53      }
    4554#endif
    4655
    4756#ifdef VHDL
    48     // generate the vhdl
    49     log_printf(INFO,RegisterFile_Multi_Banked,"RegisterFile_Multi_Banked","Generate the vhdl");
    50 
    51     vhdl();
     57    if (usage_is_set(_usage,USE_VHDL))
     58      {
     59        // generate the vhdl
     60        log_printf(INFO,RegisterFile_Multi_Banked,FUNCTION,"Generate the vhdl");
     61       
     62        vhdl();
     63      }
    5264#endif
    5365
    5466#ifdef SYSTEMC
     67    if (usage_is_set(_usage,USE_SYSTEMC))
     68      {
    5569    // Function pointer
    5670    if (_param->_crossbar == FULL_CROSSBAR)                             
     
    6781      }
    6882
    69     log_printf(INFO,RegisterFile_Multi_Banked,"RegisterFile_Multi_Banked","Method - transition");
     83    log_printf(INFO,RegisterFile_Multi_Banked,FUNCTION,"Method - transition");
    7084
    7185    SC_METHOD (transition);
     
    7791#endif   
    7892
    79     log_printf(INFO,RegisterFile_Multi_Banked,"RegisterFile_Multi_Banked","Method - genMealy_write");
     93    log_printf(INFO,RegisterFile_Multi_Banked,FUNCTION,"Method - genMealy_write");
    8094
    8195    SC_METHOD (genMealy_read);
     
    129143      }
    130144#endif   
    131 
     145      }
    132146#endif
    133     log_printf(FUNC,RegisterFile_Multi_Banked,"RegisterFile_Multi_Banked","End");
     147    log_printf(FUNC,RegisterFile_Multi_Banked,FUNCTION,"End");
    134148  };
    135149 
     150#undef  FUNCTION
     151#define FUNCTION "RegisterFile_Multi_Banked::~RegisterFile_Multi_Banked"
    136152  RegisterFile_Multi_Banked::~RegisterFile_Multi_Banked (void)
    137153  {
    138     log_printf(FUNC,RegisterFile_Multi_Banked,"~RegisterFile_Multi_Banked","Begin");
     154    log_printf(FUNC,RegisterFile_Multi_Banked,FUNCTION,"Begin");
    139155
    140156#ifdef STATISTICS
    141     log_printf(INFO,RegisterFile_Multi_Banked,"~RegisterFile_Multi_Banked","Generate Statistics file");
    142    
    143     delete _stat;
     157    if (usage_is_set(_usage,USE_STATISTICS))
     158      {
     159        log_printf(INFO,RegisterFile_Multi_Banked,FUNCTION,"Generate Statistics file");
     160        delete _stat;
     161      }
    144162#endif
    145163
    146 #ifdef SYSTEMC
    147     log_printf(INFO,RegisterFile_Multi_Banked,"~RegisterFile_Multi_Banked","Deallocation");
     164    log_printf(INFO,RegisterFile_Multi_Banked,FUNCTION,"Deallocation");
     165    deallocation ();
    148166
    149     deallocation ();
    150 #endif
    151 
    152     log_printf(FUNC,RegisterFile_Multi_Banked,"~RegisterFile_Multi_Banked","End");
     167    log_printf(FUNC,RegisterFile_Multi_Banked,FUNCTION,"End");
    153168  };
    154169
Note: See TracChangeset for help on using the changeset viewer.