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/RegisterFile/RegisterFile_Monolithic
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/Makefile

    r81 r88  
    2323library_clean                   : RegisterFile_Monolithic_library_clean
    2424
     25local_clean                     :
     26
    2527include                         ../Makefile.deps
    2628include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/src/test.cpp

    r82 r88  
    3232      exit (EXIT_FAILURE);
    3333    }
     34
     35  Tusage_t _usage = USE_ALL;
     36
     37//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     38//   _usage = usage_unset(_usage,USE_VHDL                 );
     39//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     40//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     41//   _usage = usage_unset(_usage,USE_POSITION             );
     42//   _usage = usage_unset(_usage,USE_STATISTICS           );
     43//   _usage = usage_unset(_usage,USE_INFORMATION          );
    3444
    3545#ifdef STATISTICS
     
    4252#endif
    4353     ,_param
    44      ,USE_ALL);
     54     ,_usage);
    4555 
    4656#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Parameters.h

    r81 r88  
    3434                       uint32_t nb_word      ,
    3535                       uint32_t size_word    );
    36   public : Parameters (Parameters & param) ;
     36//   public : Parameters (Parameters & param) ;
    3737  public : ~Parameters () ;
    3838
     39  public :        void            copy       (void);
     40
    3941  public :        Parameters_test msg_error  (void);
     42
    4043  public :        std::string   print      (uint32_t depth);
    4144  public : friend std::ostream& operator<< (std::ostream& output_stream,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/Parameters.cpp

    r81 r88  
    3232  };
    3333 
    34   Parameters::Parameters (Parameters & param) :
    35     _nb_port_read      (param._nb_port_read ),
    36     _nb_port_write     (param._nb_port_write),
    37     _nb_port_read_write(param._nb_port_read_write),
    38     _nb_word           (param._nb_word      ),
    39     _size_word         (param._size_word    ),
    40     _size_address      (param._size_address ),
    41     _have_port_address (param._have_port_address)
     34//   Parameters::Parameters (Parameters & param) :
     35//     _nb_port_read      (param._nb_port_read ),
     36//     _nb_port_write     (param._nb_port_write),
     37//     _nb_port_read_write(param._nb_port_read_write),
     38//     _nb_word           (param._nb_word      ),
     39//     _size_word         (param._size_word    ),
     40//     _size_address      (param._size_address ),
     41//     _have_port_address (param._have_port_address)
     42//   {
     43//     test();
     44//   };
     45
     46  Parameters::~Parameters ()
    4247  {
    43     test();
    4448  };
    4549
    46   Parameters::~Parameters ()
    47   { };
     50  void Parameters::copy (void)
     51  {
     52  };
    4853
    4954}; // end namespace registerfile_monolithic
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic.cpp

    r81 r88  
    3333    log_printf(FUNC,RegisterFile_Monolithic,"RegisterFile_Monolithic","Begin");
    3434
     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
    3541    log_printf(INFO,RegisterFile_Monolithic,"RegisterFile_Monolithic","Allocation");
    3642    allocation ();
    3743
    3844#ifdef STATISTICS
    39     if (_usage & USE_STATISTICS)
     45    if (usage_is_set(_usage,USE_STATISTICS))
    4046      statistics_declaration(param_statistics);
    4147#endif
     
    4753
    4854#ifdef SYSTEMC
    49     if (_usage & USE_SYSTEMC)
     55    if (usage_is_set(_usage,USE_SYSTEMC))
    5056      {
    5157        SC_METHOD (transition);
     
    102108  {
    103109#ifdef STATISTICS
    104     if (_usage & USE_STATISTICS)
     110    if (usage_is_set(_usage,USE_STATISTICS))
    105111      delete _stat;
    106112#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_allocation.cpp

    r81 r88  
    120120
    121121    // ----- Register
    122     reg_DATA = new Tdata_t [_param->_nb_word];
     122    if (usage_is_set(_usage,USE_SYSTEMC))
     123      reg_DATA = new Tdata_t [_param->_nb_word];
    123124   
    124125#ifdef POSITION
    125     _component->generate_file();
     126    if (usage_is_set(_usage,USE_POSITION))
     127      _component->generate_file();
    126128#endif
    127129  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_deallocation.cpp

    r81 r88  
    1818    delete _component;
    1919
    20     if (_usage & USE_SYSTEMC)
     20    if (usage_is_set(_usage,USE_SYSTEMC))
    2121      {
    2222        delete    in_CLOCK;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_end_cycle.cpp

    r81 r88  
    2020
    2121#ifdef STATISTICS
    22     _stat->end_cycle();
     22    if (usage_is_set(_usage,USE_STATISTICS))
     23      _stat->end_cycle();
    2324#endif   
    2425
     
    2728   
    2829//  sc_start(0);
    29     _interfaces->testbench();
     30    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     31      _interfaces->testbench();
    3032#endif
    3133
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_transition.cpp

    r81 r88  
    2424          {
    2525#ifdef STATISTICS
    26             (*_stat_nb_write) ++;
     26            if (usage_is_set(_usage,USE_STATISTICS))
     27              (*_stat_nb_write) ++;
    2728#endif   
    2829
     
    4950              {
    5051#ifdef STATISTICS
    51                 (*_stat_nb_write) ++;
     52                if (usage_is_set(_usage,USE_STATISTICS))
     53                  (*_stat_nb_write) ++;
    5254#endif   
    5355               
     
    6769            else
    6870              {
    69                 (*_stat_nb_read) ++;
     71                if (usage_is_set(_usage,USE_STATISTICS))
     72                  (*_stat_nb_read) ++;
    7073              }
    7174#endif   
     
    7477
    7578#ifdef STATISTICS
    76     for (uint32_t i=0; i<_param->_nb_port_read; i++)
    77       if ( PORT_READ(in_READ_VAL [i]) == 1)
    78         (*_stat_nb_read) ++;
     79    if (usage_is_set(_usage,USE_STATISTICS))
     80      for (uint32_t i=0; i<_param->_nb_port_read; i++)
     81        if ( PORT_READ(in_READ_VAL [i]) == 1)
     82          (*_stat_nb_read) ++;
    7983#endif   
    8084
Note: See TracChangeset for help on using the changeset viewer.