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/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU.cpp

    r82 r88  
    3232    log_printf(FUNC,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Begin");
    3333
    34 #ifdef SYSTEMC
     34#if DEBUG_Victim_Pseudo_LRU == true
     35    log_printf(INFO,Victim_Pseudo_LRU,FUNCTION,_("<%s> Parameters"),_name.c_str());
     36
     37    std::cout << *param << std::endl;
     38#endif   
     39
    3540    log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Allocation");
    3641    allocation ();
    37 #endif
    3842
    3943#ifdef STATISTICS
    40     log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Allocation of statistics");
    41    
    42     // Allocation of statistics
    43     statistics_declaration(param_statistics);
     44    if (usage_is_set(_usage,USE_STATISTICS))
     45      {
     46        log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Allocation of statistics");
     47       
     48        // Allocation of statistics
     49        statistics_declaration(param_statistics);
     50      }
    4451#endif
    4552
    4653#ifdef VHDL
    47     // generate the vhdl
    48     log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Generation of VHDL");
    49     vhdl();
     54    if (usage_is_set(_usage,USE_VHDL))
     55      {
     56        // generate the vhdl
     57        log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Generation of VHDL");
     58        vhdl();
     59      }
    5060#endif
    5161
    5262#ifdef SYSTEMC
    53     log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Definition of sc_method");
    54     SC_METHOD (transition);
    55     dont_initialize ();
    56     sensitive << (*(in_CLOCK)).pos();
    57 
    58     SC_METHOD (genMoore);
    59     dont_initialize ();
    60     sensitive << (*(in_CLOCK)).neg();
    61 
    62 #ifdef SYSTEMCASS_SPECIFIC
    63 #endif   
    64 
     63    if (usage_is_set(_usage,USE_SYSTEMC))
     64      {
    6565    // Constant - ack is always at one
    6666    for (uint32_t i=0; i<_param->_nb_access; i++)
     
    7070      }
    7171
     72    log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Definition of sc_method");
     73    SC_METHOD (transition);
     74    dont_initialize ();
     75    sensitive << (*(in_CLOCK)).pos();
     76
     77    SC_METHOD (genMealy);
     78    dont_initialize ();
     79    sensitive << (*(in_CLOCK)).neg();
     80    for (uint32_t i=0; i<_param->_nb_access; i++)
     81      if (_param->_size_table>1)
     82        sensitive << (*(in_ACCESS_ADDRESS[i]));
     83
     84#ifdef SYSTEMCASS_SPECIFIC
     85    if (_param->_size_table>1)
     86      for (uint32_t i=0; i<_param->_nb_access; i++)
     87        (*(out_ACCESS_VICTIM[i])) (*(in_ACCESS_ADDRESS[i]));
     88#endif   
     89      }
    7290#endif
    7391    log_printf(FUNC,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","End");
     
    7795  {
    7896    log_printf(FUNC,Victim_Pseudo_LRU,"~Victim_Pseudo_LRU","Begin");
    79 #ifdef SYSTEMC
     97
    8098    deallocation ();
    81 #endif
     99
    82100
    83101#ifdef STATISTICS
    84     delete _stat;
     102    if (usage_is_set(_usage,USE_STATISTICS))
     103      delete _stat;
    85104#endif
    86105    log_printf(FUNC,Victim_Pseudo_LRU,"~Victim_Pseudo_LRU","End");
Note: See TracChangeset for help on using the changeset viewer.