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

Last change on this file since 88 was 88, checked in by rosiere, 16 years ago

Almost complete design
with Test and test platform

  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1/*
2 * $Id: Parameters.cpp 88 2008-12-10 18:31:39Z 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
49        _have_port_context_id = _size_context_id > 0;
50        _have_port_depth      = _size_depth > 0;
51
52        copy ();
53      }
54
55    log_end(Decod_queue,FUNCTION);
56  };
57 
58// #undef  FUNCTION
59// #define FUNCTION "Decod_queue::Parameters (copy)"
60//   Parameters::Parameters (Parameters & param)
61//   {
62//     log_begin(Decod_queue,FUNCTION);
63//     test();
64//     log_end(Decod_queue,FUNCTION);
65//   };
66
67#undef  FUNCTION
68#define FUNCTION "Decod_queue::~Parameters"
69  Parameters::~Parameters () 
70  {
71    log_begin(Decod_queue,FUNCTION);
72
73    log_end(Decod_queue,FUNCTION);
74  };
75
76#undef  FUNCTION
77#define FUNCTION "Decod_queue::copy"
78  void Parameters::copy (void) 
79  {
80    log_begin(Decod_queue,FUNCTION);
81
82    log_end(Decod_queue,FUNCTION);
83  };
84
85}; // end namespace decod_queue
86}; // end namespace decod_unit
87}; // end namespace front_end
88}; // end namespace multi_front_end
89}; // end namespace core
90
91}; // end namespace behavioural
92}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.