Ignore:
Timestamp:
Jan 19, 2008, 12:09:01 PM (16 years ago)
Author:
rosiere
Message:

Modification of Statisctics
Add a new systemC component : Load_Store_Queue (tested with one benchmark and one configuration). Store don't supported the Data Buss Error (Load is supported)

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic
Files:
2 added
10 deleted
10 edited
4 moved

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/test.cpp

    r44 r71  
    3232      exit (EXIT_FAILURE);
    3333    }
     34#ifdef STATISTICS
     35  morpheo::behavioural::Parameters_Statistics * param_stat = new morpheo::behavioural::Parameters_Statistics (5,50);
     36#endif
     37
    3438  Counter * _Counter = new Counter (name.c_str(),
    3539#ifdef STATISTICS
    36                                     morpheo::behavioural::Parameters_Statistics(5,50),
     40                                    param_stat,
    3741#endif
    3842                                    param);
     
    119123          TEST(Tdata_t,DATA_OUT [i].read(),data_out [i]);
    120124           
    121           cout << dec << endl;
     125          cout << std::dec << endl;
    122126        }
    123127     
     
    136140
    137141  delete _Counter;
     142#ifdef STATISTICS
     143  delete param_stat;
     144#endif
     145
    138146}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Counter.h

    r44 r71  
    2020#include "Behavioural/Generic/Counter/include/Types.h"
    2121#ifdef STATISTICS
    22 #include "Behavioural/Generic/Counter/include/Statistics.h"
     22#include "Behavioural/include/Stat.h"
    2323#endif
    2424#ifdef VHDL
     
    4444
    4545  protected : const Parameters _param;
    46 //#ifdef STATISTICS
    47 //  protected : const morpheo::behavioural::Parameters_Statistics _param_statistics;
    48 //#endif
    4946
    5047#ifdef STATISTICS
    51   private   : Statistics                     * _stat;
     48  private   : Stat                           * _stat;
    5249#endif
    5350
     
    8178#endif                                         
    8279#ifdef STATISTICS
    83                                            morpheo::behavioural::Parameters_Statistics param_statistics,
     80                                           morpheo::behavioural::Parameters_Statistics * param_statistics,
    8481#endif
    8582                                           Parameters                                  param );
     
    9895#endif                                         
    9996#ifdef STATISTICS
    100   public  : string   statistics                (uint32_t depth);
     97  public  : void     statistics_declaration    (morpheo::behavioural::Parameters_Statistics * param_statistics);
     98  public  : string   statistics_print          (uint32_t depth);
    10199#endif
    102100                                               
     
    108106#endif                                         
    109107                                               
    110 #ifdef VHDL_TESTBENCH                         
    111   private : void     vhdl_testbench_transition (void);
     108#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
     109  private : void     end_cycle                (void);
    112110#endif
    113111  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter.cpp

    r67 r71  
    2020#endif
    2121#ifdef STATISTICS
    22                               morpheo::behavioural::Parameters_Statistics             param_statistics,
     22                              morpheo::behavioural::Parameters_Statistics * param_statistics,
    2323#endif
    2424                              morpheo::behavioural::generic::counter::Parameters param ):
    2525                              _name              (name)
    2626                              ,_param            (param)
    27 // #ifdef STATISTICS
    28 //                            ,_param_statistics (param_statistics)
    29 // #endif
    3027  {
    3128    log_printf(FUNC,Counter,"Counter","Begin");
     
    3734#ifdef STATISTICS
    3835    // Allocation of statistics
    39     _stat = new Statistics (static_cast<string>(_name),
    40                             param_statistics          ,
    41                             param);
     36    statistics_declaration(param_statistics);
    4237#endif
    4338
     
    8277
    8378#ifdef STATISTICS
    84     _stat->generate_file(statistics(0));
    85    
    8679    delete _stat;
    8780#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_end_cycle.cpp

    r59 r71  
    1 #ifdef VHDL_TESTBENCH
     1#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    22/*
    33 * $Id$
     
    1515
    1616
    17   void Counter::vhdl_testbench_transition ()
     17  void Counter::end_cycle ()
    1818  {
    19     log_printf(FUNC,Counter,"vhdl_testbench_transition","Begin");
     19    log_printf(FUNC,Counter,"end_cycle","Begin");
    2020
    21 //     sc_start(0);
     21#ifdef STATISTICS
     22    _stat->end_cycle();
     23#endif   
    2224
     25#ifdef VHDL_TESTBENCH
     26    // Evaluation before read the ouput signal
     27//  sc_start(0);
    2328    _interfaces->testbench();
     29#endif
    2430
    25     log_printf(FUNC,Counter,"vhdl_testbench_transition","End");
     31    log_printf(FUNC,Counter,"end_cycle","End");
    2632  };
    2733
    2834}; // end namespace counter
    2935}; // end namespace generic
    30 
    3136}; // end namespace behavioural
    3237}; // end namespace morpheo             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_statistics_print.cpp

    r59 r71  
    1414namespace counter {
    1515
    16   string Counter::statistics (uint32_t depth)
     16#undef  FUNCTION
     17#define FUNCTION "Counter::statistics_print"
     18  string Counter::statistics_print (uint32_t depth)
    1719  {
    18     log_printf(FUNC,Counter,"statistics","Begin");
     20    log_printf(FUNC,Counter,FUNCTION,"Begin");
    1921
    2022    string txt = _stat->print(depth);
    21 
    22     log_printf(FUNC,Counter,"statistics","End");
     23   
     24    log_printf(FUNC,Counter,FUNCTION,"End");
    2325
    2426    return txt;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_transition.cpp

    r2 r71  
    2020    log_printf(FUNC,Counter,"transition","Begin");
    2121
    22 #ifdef STATISTICS
    23     _stat->add();
    24 #endif   
    25 
    26 #ifdef VHDL_TESTBENCH
    27     vhdl_testbench_transition ();
    28 #endif
     22    end_cycle();
    2923
    3024    log_printf(FUNC,Counter,"transition","End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/Makefile.deps

    r53 r71  
    1313include                         $(DIR_MORPHEO)/Behavioural/Makefile.deps
    1414endif
    15 ifndef Group
    16 include                         $(DIR_MORPHEO)/Behavioural/Generic/Group/Makefile.deps
    17 endif
    1815
    1916#-----[ Library ]------------------------------------------
    2017RegisterFile_Monolithic_LIBRARY         =       -lRegisterFile_Monolithic               \
    21                                         $(Group_LIBRARY)        \
    2218                                        $(Behavioural_LIBRARY) 
    2319
    2420RegisterFile_Monolithic_DIR_LIBRARY     =       -L$(DIR_MORPHEO)/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/lib   \
    25                                         $(Group_DIR_LIBRARY)                                    \
    2621                                        $(Behavioural_DIR_LIBRARY)     
    2722
     
    3126                                @\
    3227                                $(MAKE)  Behavioural_library; \
    33                                 $(MAKE)  Group_library; \
    3428                                $(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic --makefile=Makefile;
    3529       
     
    3731                                @\
    3832                                $(MAKE)  Behavioural_library_clean; \
    39                                 $(MAKE)  Group_library_clean; \
    4033                                $(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic --makefile=Makefile clean;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/src/test.cpp

    r62 r71  
    3434
    3535#ifdef STATISTICS
    36   morpheo::behavioural::Parameters_Statistics * _param_stat = new morpheo::behavioural::Parameters_Statistics (5,1000);
     36  morpheo::behavioural::Parameters_Statistics * _param_stat = new morpheo::behavioural::Parameters_Statistics (5,100);
    3737#endif
    3838  RegisterFile_Monolithic * registerfile = new RegisterFile_Monolithic (name.c_str()
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h

    r57 r71  
    2121#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Types.h"
    2222#ifdef STATISTICS
    23 #include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Statistics.h"
     23#include "Behavioural/include/Stat.h"
    2424#endif
    2525#include "Behavioural/include/Component.h"
     
    5151
    5252#ifdef STATISTICS
    53   private   : Statistics                     * _stat;
     53  private   : Stat                           * _stat;
    5454   
    55   private   : uint32_t                         _stat_nb_read;
    56   private   : uint32_t                         _stat_nb_write;
     55  private   : counter_t                      * _stat_nb_read;
     56  private   : counter_t                      * _stat_nb_write;
     57  private   : counter_t                      * _stat_average_read ;
     58  private   : counter_t                      * _stat_average_write;
     59  private   : counter_t                      * _stat_percent_use_read ;
     60  private   : counter_t                      * _stat_percent_use_write;
    5761#endif
    5862
     
    123127
    124128#ifdef STATISTICS
    125   public  : string  statistics                 (uint32_t depth);
     129  public  : void     statistics_declaration    (morpheo::behavioural::Parameters_Statistics * param_statistics);
     130  public  : string   statistics_print          (uint32_t depth);
    126131#endif                                         
     132
    127133#if VHDL                                       
    128134  private : void     vhdl                      (void);
     
    131137#endif                                         
    132138                                               
    133 #ifdef VHDL_TESTBENCH                         
    134   private : void     vhdl_testbench_transition (void);
    135 #endif
     139  private : void     end_cycle                 (void);
    136140
    137141  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic.cpp

    r66 r71  
    3737
    3838#ifdef STATISTICS
    39     _stat = new Statistics (static_cast<string>(_name),
    40                             param_statistics          ,
    41                             param);
     39    statistics_declaration(param_statistics);
    4240#endif
    4341
     
    7169          }
    7270       
    73 #  ifdef SYSTEMCASS_SPECIFIC
     71# ifdef SYSTEMCASS_SPECIFIC
    7472        // List dependency information
    7573        for (uint32_t i=0; i<_param->_nb_port_read; i++)
     
    8684              (*(out_READ_WRITE_RDATA [i])) (*( in_READ_WRITE_ADDRESS [i]));
    8785          }
    88 #  endif   
     86# endif   
    8987       
    9088        for (uint32_t i=0; i<_param->_nb_port_read       ; i++)
     
    105103    if (_usage & USE_STATISTICS)
    106104      {
    107         _stat->generate_file(statistics(0));
    108105        delete _stat;
    109106      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_end_cycle.cpp

    r59 r71  
    1 #ifdef VHDL_TESTBENCH
    21/*
    32 * $Id$
     
    1514namespace registerfile_monolithic    {
    1615
    17   void RegisterFile_Monolithic::vhdl_testbench_transition (void)
     16  void RegisterFile_Monolithic::end_cycle (void)
    1817  {
     18    log_printf(FUNC,RegisterFile,"end_cycle","Begin");
     19
     20#ifdef STATISTICS
     21    _stat->end_cycle();
     22#endif   
     23
     24#ifdef VHDL_TESTBENCH
    1925    // Evaluation before read the ouput signal
    2026   
    2127//  sc_start(0);
    2228    _interfaces->testbench();
     29#endif
     30
     31    log_printf(FUNC,RegisterFile,"end_cycle","End");
    2332  };
    2433
     
    2837}; // end namespace behavioural         
    2938}; // end namespace morpheo             
    30 #endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_genMealy_read.cpp

    r62 r71  
    1919    log_printf(FUNC,RegisterFile,"genMealy_read","Begin");
    2020
    21 #ifdef STATISTICS
    22     _stat_nb_read = 0;
    23 #endif   
    24 
    2521    for (uint32_t i=0; i<_param->_nb_port_read; i++)
    2622      {
     
    3834
    3935#ifdef STATISTICS
    40             _stat_nb_read ++;
     36            (*_stat_nb_read) ++;
    4137#endif   
    4238            // Write in registerFile
     
    6864
    6965            log_printf(TRACE,RegisterFile,"genMealy_read","[%d] -> %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data));
    70 
    71 #ifdef STATISTICS
    72             _stat_nb_read ++;
    73 #endif   
    74             // Write in registerFile
    75            
    7666          }
    7767        else
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_statistics_print.cpp

    r59 r71  
    1515namespace registerfile_monolithic    {
    1616
    17   string RegisterFile_Monolithic::statistics (uint32_t depth)
     17  string RegisterFile_Monolithic::statistics_print (uint32_t depth)
    1818  {
    1919    return _stat->print(depth);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_transition.cpp

    r62 r71  
    1717  {
    1818    log_printf(FUNC,RegisterFile,"transition","Begin");
    19 #ifdef STATISTICS
    20     _stat_nb_write = 0;
    21 #endif   
    2219
    2320    for (uint32_t i=0; i<_param->_nb_port_write; i++)
     
    2724          {
    2825#ifdef STATISTICS
    29             _stat_nb_write ++;
     26            (*_stat_nb_write) ++;
    3027#endif   
    3128
     
    4744      {
    4845        // Have a read_write?
    49         if ( (PORT_READ(in_READ_WRITE_VAL[i]) == true) and
    50              (PORT_READ(in_READ_WRITE_RW [i]) == RW_WRITE))
    51           {
     46        if (PORT_READ(in_READ_WRITE_VAL[i]) == true)
     47          {
     48            if (PORT_READ(in_READ_WRITE_RW [i]) == RW_WRITE)
     49              {
    5250#ifdef STATISTICS
    53             _stat_nb_write ++;
     51                (*_stat_nb_write) ++;
    5452#endif   
    55 
    56             Taddress_t address;
    57             if (_param->_have_port_address)
    58               address = PORT_READ(in_READ_WRITE_ADDRESS[i]);
     53               
     54                Taddress_t address;
     55                if (_param->_have_port_address)
     56                  address = PORT_READ(in_READ_WRITE_ADDRESS[i]);
     57                else
     58                  address = 0;
     59                Tdata_t    data    = PORT_READ(in_READ_WRITE_WDATA  [i]);
     60               
     61                log_printf(TRACE,RegisterFile,"transition","[%d] <- %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data));
     62               
     63                // Write in registerFile
     64                REGISTER_WRITE(reg_DATA[address],data);
     65              }
     66#ifdef STATISTICS
    5967            else
    60               address = 0;
    61             Tdata_t    data    = PORT_READ(in_READ_WRITE_WDATA  [i]);
    62            
    63             log_printf(TRACE,RegisterFile,"transition","[%d] <- %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data));
    64 
    65             // Write in registerFile
    66             REGISTER_WRITE(reg_DATA[address],data);
    67           }
     68              {
     69                (*_stat_nb_read) ++;
     70              }
     71#endif   
     72          }
    6873      }
    6974
    7075#ifdef STATISTICS
    71     _stat->add(_stat_nb_read,_stat_nb_write);
     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) ++;
    7279#endif   
    7380
    74 #ifdef VHDL_TESTBENCH
    75     vhdl_testbench_transition ();
    76 #endif
     81    end_cycle();
     82
    7783    log_printf(FUNC,RegisterFile,"transition","End");
    7884  };
Note: See TracChangeset for help on using the changeset viewer.