source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Parameters.cpp @ 81

Last change on this file since 81 was 81, checked in by rosiere, 16 years ago
  • Finish Environment (and test)
  • Continue predictor_unit
  • Add external tools
  • svn keyword "Id" set
  • Property svn:keywords set to Id
File size: 1.9 KB
Line 
1/*
2 * $Id: Parameters.cpp 81 2008-04-15 18:40:01Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/include/Parameters.h"
9#include "Common/include/Max.h"
10
11namespace morpheo {
12namespace behavioural {
13namespace core {
14namespace multi_front_end {
15namespace front_end {
16namespace prediction_unit {
17namespace return_address_stack {
18
19
20#undef  FUNCTION
21#define FUNCTION "Return_Address_Stack::Parameters"
22  Parameters::Parameters (uint32_t   nb_context     ,
23                          uint32_t * size_queue     ,
24                          uint32_t   size_address   ,
25                          uint32_t   nb_inst_predict,
26                          uint32_t   nb_inst_decod  ,
27                          uint32_t   nb_inst_update )
28  {
29    log_printf(FUNC,Return_Address_Stack,FUNCTION,"Begin");
30
31    _nb_context      = nb_context     ;
32    _size_queue      = size_queue     ;
33    _size_address    = size_address   ;
34    _nb_inst_predict = nb_inst_predict;
35    _nb_inst_decod   = nb_inst_decod  ;
36    _nb_inst_update  = nb_inst_update ;
37
38    _size_context_id = log2(nb_context);
39    _size_index      = max<uint32_t>(size_queue,nb_context);
40
41    _have_port_context_id = _size_context_id > 0;
42
43    test();
44    log_printf(FUNC,Return_Address_Stack,FUNCTION,"End");
45  };
46 
47// #undef  FUNCTION
48// #define FUNCTION "Return_Address_Stack::Parameters (copy)"
49//   Parameters::Parameters (Parameters & param)
50//   {
51//     log_printf(FUNC,Return_Address_Stack,FUNCTION,"Begin");
52//     test();
53//     log_printf(FUNC,Return_Address_Stack,FUNCTION,"End");
54//   };
55
56#undef  FUNCTION
57#define FUNCTION "Return_Address_Stack::~Parameters"
58  Parameters::~Parameters () 
59  {
60    log_printf(FUNC,Return_Address_Stack,FUNCTION,"Begin");
61    log_printf(FUNC,Return_Address_Stack,FUNCTION,"End");
62  };
63
64}; // end namespace return_address_stack
65}; // end namespace prediction_unit
66}; // end namespace front_end
67}; // end namespace multi_front_end
68}; // end namespace core
69
70}; // end namespace behavioural
71}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.