source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Parameters.cpp @ 111

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

1) Decod_queue : multi implementation (one_fifo, multi_fifo)
2) Issue_queue : multi implementation (in_order, out_of_order)
3) Direction : Add Meta predictor
4) Context_State : re add Branch_complete, More priority to Load miss (is not speculative)
5) Return_Address_Stack : update reg_PREDICT pointer on decod miss prediction
6) UPT : Fix bug in multi event
7) Prediction_glue : in read_stack case, insert in UPT pc_next
8) Rename select : when rob have an event (need flush), read_r{a,b,c} and write_r{d,e} is set at 0

  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1/*
2 * $Id: Parameters.cpp 111 2009-02-27 18:37:40Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Parameters.h"
9#include "Common/include/Max.h"
10
11namespace morpheo {
12  namespace behavioural {
13namespace core {
14namespace multi_front_end {
15namespace front_end {
16namespace decod_unit {
17namespace decod_queue {
18
19
20#undef  FUNCTION
21#define FUNCTION "Decod_queue::Parameters"
22  Parameters::Parameters (uint32_t              nb_context          ,
23                          uint32_t              nb_inst_decod       ,
24                          uint32_t              size_queue          ,
25                          Tdecod_queue_scheme_t queue_scheme        ,
26                          uint32_t              size_general_data   ,
27                          uint32_t            * nb_branch_speculated,
28                          bool                  is_toplevel)
29  {
30    log_begin(Decod_queue,FUNCTION);
31
32    _nb_context              = nb_context              ;
33    _nb_inst_decod           = nb_inst_decod           ;
34    _size_queue              = size_queue/nb_inst_decod;
35    _queue_scheme            = queue_scheme            ;
36//  _size_general_data       = size_general_data       ;
37    _nb_branch_speculated    = nb_branch_speculated    ;
38    _nb_instruction_in_queue = size_queue              ;
39
40    _nb_bank                 = nb_inst_decod           ;
41
42    test();
43
44    if (is_toplevel)
45      {
46        _size_context_id          = log2(nb_context);
47        _size_nb_inst_decod       = log2(_size_queue)+1;
48        _size_depth               = log2(max<uint32_t>(_nb_branch_speculated,_nb_context));
49        _size_general_data        = size_general_data;
50        _size_instruction_address = size_general_data-2;
51
52        _have_port_context_id     = _size_context_id > 0;
53        _have_port_depth          = _size_depth > 0;
54
55        copy ();
56      }
57
58    log_end(Decod_queue,FUNCTION);
59  };
60 
61// #undef  FUNCTION
62// #define FUNCTION "Decod_queue::Parameters (copy)"
63//   Parameters::Parameters (Parameters & param)
64//   {
65//     log_begin(Decod_queue,FUNCTION);
66//     test();
67//     log_end(Decod_queue,FUNCTION);
68//   };
69
70#undef  FUNCTION
71#define FUNCTION "Decod_queue::~Parameters"
72  Parameters::~Parameters () 
73  {
74    log_begin(Decod_queue,FUNCTION);
75
76    log_end(Decod_queue,FUNCTION);
77  };
78
79#undef  FUNCTION
80#define FUNCTION "Decod_queue::copy"
81  void Parameters::copy (void) 
82  {
83    log_begin(Decod_queue,FUNCTION);
84
85    log_end(Decod_queue,FUNCTION);
86  };
87
88}; // end namespace decod_queue
89}; // end namespace decod_unit
90}; // end namespace front_end
91}; // end namespace multi_front_end
92}; // end namespace core
93
94}; // end namespace behavioural
95}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.