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

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

1) Update Prediction Table - New architecture (systemC) done (and tested) -> need change interface in top level
2) Change documentation on VHDL generation
3) Change VHDL constant (case std_logic and std_logic_vector)

  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1/*
2 * $Id: Parameters.cpp 95 2008-12-16 16:24:26Z 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                          uint32_t   size_general_data   ,
26                          uint32_t * nb_branch_speculated,
27                          bool       is_toplevel         )
28  {
29    log_begin(Decod_queue,FUNCTION);
30
31    _nb_context           = nb_context          ;
32    _nb_inst_decod        = nb_inst_decod       ;
33    _size_queue           = size_queue          ;
34//  _size_general_data    = size_general_data   ;
35    _nb_branch_speculated = nb_branch_speculated;
36
37    _nb_bank              = _nb_inst_decod   ;
38    _size_bank            = _size_queue / _nb_bank;
39   
40    test();
41
42    if (is_toplevel)
43      {
44        _size_context_id          = log2(nb_context);
45        _size_nb_inst_decod       = log2(_size_queue)+1;
46        _size_depth               = log2(max<uint32_t>(_nb_branch_speculated,_nb_context));
47        _size_general_data        = size_general_data;
48        _size_instruction_address = size_general_data-2;
49
50        _have_port_context_id     = _size_context_id > 0;
51        _have_port_depth          = _size_depth > 0;
52
53        copy ();
54      }
55
56    log_end(Decod_queue,FUNCTION);
57  };
58 
59// #undef  FUNCTION
60// #define FUNCTION "Decod_queue::Parameters (copy)"
61//   Parameters::Parameters (Parameters & param)
62//   {
63//     log_begin(Decod_queue,FUNCTION);
64//     test();
65//     log_end(Decod_queue,FUNCTION);
66//   };
67
68#undef  FUNCTION
69#define FUNCTION "Decod_queue::~Parameters"
70  Parameters::~Parameters () 
71  {
72    log_begin(Decod_queue,FUNCTION);
73
74    log_end(Decod_queue,FUNCTION);
75  };
76
77#undef  FUNCTION
78#define FUNCTION "Decod_queue::copy"
79  void Parameters::copy (void) 
80  {
81    log_begin(Decod_queue,FUNCTION);
82
83    log_end(Decod_queue,FUNCTION);
84  };
85
86}; // end namespace decod_queue
87}; // end namespace decod_unit
88}; // end namespace front_end
89}; // end namespace multi_front_end
90}; // end namespace core
91
92}; // end namespace behavioural
93}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.