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

Almost complete design
with Test and test platform

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src
Files:
5 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Parameters.cpp

    r81 r88  
    3030  };
    3131 
    32   Parameters::Parameters (Parameters & param):
    33     _nb_entity  (param._nb_entity ),
    34     _nb_access  (param._nb_access ),
    35 //     _nb_update  (param._nb_update ),
    36     _size_table (param._size_table),
    37     _table_global(param._table_global),
    38     _size_address(param._size_address)
    39   {
    40     test();
     32//   Parameters::Parameters (Parameters & param):
     33//     _nb_entity  (param._nb_entity ),
     34//     _nb_access  (param._nb_access ),
     35// //     _nb_update  (param._nb_update ),
     36//     _size_table (param._size_table),
     37//     _table_global(param._table_global),
     38//     _size_address(param._size_address)
     39//   {
     40//     test();
     41//   };
     42
     43  Parameters::~Parameters ()
     44  {
    4145  };
    4246
    43   Parameters::~Parameters ()
    44   { };
     47  void Parameters::copy (void)
     48  {
     49  };
    4550
    4651}; // end namespace victim_pseudo_lru
  • 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");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_allocation.cpp

    r82 r88  
    1 #ifdef SYSTEMC
    21/*
    32 * $Id$
     
    5352    }
    5453
     54    if (usage_is_set(_usage,USE_SYSTEMC))
     55      {
    5556    // -----[ Register ]---------------------------------------------------
    5657    reg_TABLE = new entry_t *  [_param->_size_table];
     
    6263    internal_ACCESS_ACK    = new Tcontrol_t [_param->_nb_access];
    6364    internal_ACCESS_VICTIM = new Tentity_t  [_param->_nb_access];
     65      }
    6466
    6567#ifdef POSITION
    66     _component->generate_file();
     68    if (usage_is_set(_usage,USE_POSITION))
     69      _component->generate_file();
    6770#endif
    6871  };
     
    7477}; // end namespace behavioural
    7578}; // end namespace morpheo             
    76 #endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_deallocation.cpp

    r81 r88  
    1 #ifdef SYSTEMC
    21/*
    32 * $Id$
     
    1716  void Victim_Pseudo_LRU::deallocation (void)
    1817  {
     18    if (usage_is_set(_usage,USE_SYSTEMC))
     19      {
    1920    delete     in_CLOCK;
    2021    delete     in_NRESET;
     
    3435    delete [] internal_ACCESS_ACK   ;
    3536    delete [] internal_ACCESS_VICTIM;
     37      }
    3638
    3739    delete _component;
     
    4345}; // end namespace behavioural
    4446}; // end namespace morpheo             
    45 #endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_end_cycle.cpp

    r81 r88  
    2222
    2323#ifdef STATISTICS
    24     _stat->end_cycle();
     24    if (usage_is_set(_usage,USE_STATISTICS))
     25      _stat->end_cycle();
    2526#endif   
    2627
     
    2829    // Evaluation before read the ouput signal
    2930//  sc_start(0);
    30     _interfaces->testbench();
     31    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     32      _interfaces->testbench();
    3133#endif
    3234
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_genMealy.cpp

    r87 r88  
    1515namespace victim_pseudo_lru {
    1616
    17   void Victim_Pseudo_LRU::genMoore (void)
     17  void Victim_Pseudo_LRU::genMealy (void)
    1818  {
    1919    for (uint32_t i=0; i<_param->_nb_access; i++)
Note: See TracChangeset for help on using the changeset viewer.