source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/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.7 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/Context_State/include/Parameters.h"
9#include "Common/include/Max.h"
10
11namespace morpheo {
12namespace behavioural {
13namespace core {
14namespace multi_front_end {
15namespace front_end {
16namespace context_state {
17
18
19#undef  FUNCTION
20#define FUNCTION "Context_State::Parameters"
21  Parameters::Parameters (uint32_t   nb_context,
22                          uint32_t   nb_decod_unit,
23                          uint32_t   nb_inst_branch_complete,
24                          uint32_t * size_depth,               
25                          uint32_t   size_address,
26                          uint32_t * size_nb_inst_decod,           
27                          uint32_t   size_nb_inst_commit,         
28                          uint32_t * link_context_to_decod_unit,
29                          bool       is_toplevel)
30  {
31    log_begin(Context_State,FUNCTION);
32
33    _nb_context                    = nb_context                   ;
34    _nb_decod_unit                 = nb_decod_unit                ;
35    _nb_inst_branch_complete       = nb_inst_branch_complete      ;
36    _array_size_depth              = size_depth                   ;
37//  _size_address                  = size_address                 ;
38//  _size_nb_inst_decod            = size_nb_inst_decod           ;
39//  _size_nb_inst_commit           = size_nb_inst_commit          ;
40    _link_context_to_decod_unit    = link_context_to_decod_unit   ;
41
42    test();
43
44    if (is_toplevel)
45      {
46        _size_context_id               = log2(_nb_context);
47        _size_depth                    = log2(max<uint32_t>(size_depth,_nb_context));
48        _size_instruction_address      = size_address;
49        _size_nb_inst_decod            = max<uint32_t>(size_nb_inst_decod,_nb_decod_unit);
50        _size_nb_inst_commit           = size_nb_inst_commit;
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(Context_State,FUNCTION);
59  };
60 
61// #undef  FUNCTION
62// #define FUNCTION "Context_State::Parameters (copy)"
63//   Parameters::Parameters (Parameters & param)
64//   {
65//     log_begin(Context_State,FUNCTION);
66//     test();
67//     log_end(Context_State,FUNCTION);
68//   };
69
70#undef  FUNCTION
71#define FUNCTION "Context_State::~Parameters"
72  Parameters::~Parameters () 
73  {
74    log_begin(Context_State,FUNCTION);
75    log_end(Context_State,FUNCTION);
76  };
77
78#undef  FUNCTION
79#define FUNCTION "Context_State::copy"
80  void Parameters::copy (void) 
81  {
82    log_begin(Context_State,FUNCTION);
83    log_end(Context_State,FUNCTION);
84  };
85
86}; // end namespace context_state
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.