source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Statistics_compute_cycle_xxx.cpp @ 53

Last change on this file since 53 was 53, checked in by rosiere, 17 years ago
  • Banc de registre multi banc
  • Banc de registre générique.
File size: 1.1 KB
RevLine 
[2]1#ifdef STATISTICS
2
3/*
4 * $Id$
5 *
6 * [ Description ]
7 *
8 */
9
10#include "Behavioural/include/Statistics.h"
11
12namespace morpheo              {
13namespace behavioural          {
14
[43]15#undef  FUNCTION
16#define FUNCTION "Statistics::compute_cycle_begin"
[2]17  uint32_t Statistics::compute_cycle_begin (uint32_t num_statistics)
18  {
[43]19    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
[53]20    uint32_t _return = _parameters_statistics->_nb_cycle_before_begin + num_statistics*_parameters_statistics->_period_save;
[43]21    log_printf(FUNC,Behavioural,FUNCTION,"End");
22   
23    return _return;
[2]24  };
25
[43]26#undef  FUNCTION
27#define FUNCTION "Statistics::compute_cycle_end"
[2]28  uint32_t Statistics::compute_cycle_end   (uint32_t num_statistics, uint32_t nb_cycle)
29  {
[43]30    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
31
32    uint32_t _return;
[2]33    if (num_statistics == (_nb_statistics-1)) // Last ?
[43]34      _return = compute_cycle_begin(num_statistics  ) + nb_cycle;
[2]35    else
[43]36      _return = compute_cycle_begin(num_statistics+1) - 1;
37
38    log_printf(FUNC,Behavioural,FUNCTION,"End");
39
40    return _return;
[2]41  };
42
43}; // end namespace behavioural         
44}; // end namespace morpheo             
45
46#endif
Note: See TracBrowser for help on using the repository browser.