source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Parameters.cpp @ 108

Last change on this file since 108 was 108, checked in by rosiere, 15 years ago

1) decod_queue : add reg_LAST_SLOT.
2) Commit : insert on event -> to pop decod_queue. Head test : add information (speculative or not)
3) Context State / UPT : Branch miss and Load miss in same cycle.
4) Free List : Bank is on LSB not MSB.
5) Platforms : move data

  • Property svn:keywords set to Id
File size: 3.4 KB
Line 
1/*
2 * $Id: Parameters.cpp 108 2009-02-12 11:55:06Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/include/Parameters.h"
9#include "Common/include/Max.h"
10
11namespace morpheo {
12namespace behavioural {
13namespace core {
14namespace multi_front_end {
15namespace front_end {
16namespace front_end_glue {
17
18
19#undef  FUNCTION
20#define FUNCTION "Front_end_Glue::Parameters"
21  Parameters::Parameters (uint32_t                nb_context                           ,
22                          uint32_t                nb_decod_unit                        ,
23                          uint32_t              * nb_inst_decod                        ,
24                          uint32_t                nb_inst_branch_complete              ,
25                          uint32_t              * link_context_to_decod_unit           ,
26                          std::vector<uint32_t> * translate_context_id_from_decod_unit ,
27                          uint32_t                size_address                         ,
28                          uint32_t              * size_depth                           ,
29                          uint32_t              * nb_branch_speculated                 ,
30                          uint32_t                size_nb_inst_decod                   ,
31                          uint32_t                is_toplevel):
32    morpheo::behavioural::Parameters()
33  {
34    log_begin(Front_end_Glue,FUNCTION);
35
36    _nb_context                           = nb_context                          ;
37    _nb_decod_unit                        = nb_decod_unit                       ;
38    _nb_inst_decod                        = nb_inst_decod                       ;
39    _nb_inst_branch_complete              = nb_inst_branch_complete             ;
40    _link_context_to_decod_unit           = link_context_to_decod_unit          ;
41    _translate_context_id_from_decod_unit = translate_context_id_from_decod_unit;
42    _nb_branch_speculated                 = nb_branch_speculated                ;
43
44    _decod_unit_nb_context                = new uint32_t [_nb_decod_unit];
45
46    for (uint32_t i=0; i<_nb_decod_unit; i++)
47      {
48        _decod_unit_nb_context           [i] = translate_context_id_from_decod_unit[i].size();
49      }
50
51    test();
52
53    if (is_toplevel)
54      {
55        _size_context_id          = log2(_nb_context);
56        _size_instruction_address = size_address;
57        _size_depth               = max<uint32_t>(size_depth,_nb_context);
58        _size_nb_inst_decod       = size_nb_inst_decod;
59
60        _have_port_context_id     = _size_context_id > 0;
61        _have_port_depth          = _size_depth > 0;
62
63        copy ();
64      }
65
66    log_end(Front_end_Glue,FUNCTION);
67  };
68 
69// #undef  FUNCTION
70// #define FUNCTION "Front_end_Glue::Parameters (copy)"
71//   Parameters::Parameters (Parameters & param)
72//   {
73//     log_begin(Front_end_Glue,FUNCTION);
74//     test();
75//     log_end(Front_end_Glue,FUNCTION);
76//   };
77
78#undef  FUNCTION
79#define FUNCTION "Front_end_Glue::~Parameters"
80  Parameters::~Parameters () 
81  {
82    log_begin(Front_end_Glue,FUNCTION);
83
84    delete [] _decod_unit_nb_context;
85
86    log_end(Front_end_Glue,FUNCTION);
87  };
88
89#undef  FUNCTION
90#define FUNCTION "Front_end_Glue::copy"
91  void Parameters::copy (void) 
92  {
93    log_begin(Front_end_Glue,FUNCTION);
94   
95    log_end(Front_end_Glue,FUNCTION);
96  };
97
98}; // end namespace front_end_glue
99}; // end namespace front_end
100}; // end namespace multi_front_end
101}; // end namespace core
102
103}; // end namespace behavioural
104}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.