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

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

1) Fix bug (read unit, RAT -> write in R0, SPR desallocation ...)
2) Change VHDL Execute_queue -> use Generic/Queue?
3) Complete document on VHDL generation
4) Add soc test

  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1/*
2 * $Id: Parameters.cpp 98 2008-12-31 10:18:08Z 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_general_data,
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_general_data             = size_general_data            ;
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_general_data             = size_general_data;
49        _size_instruction_address      = size_general_data-2;
50        _size_nb_inst_decod            = max<uint32_t>(size_nb_inst_decod,_nb_decod_unit);
51        _size_nb_inst_commit           = size_nb_inst_commit;
52
53        _have_port_context_id          = (_size_context_id>0);
54        _have_port_depth               = (_size_depth > 0);
55
56        copy ();
57      }
58   
59    log_end(Context_State,FUNCTION);
60  };
61 
62// #undef  FUNCTION
63// #define FUNCTION "Context_State::Parameters (copy)"
64//   Parameters::Parameters (Parameters & param)
65//   {
66//     log_begin(Context_State,FUNCTION);
67//     test();
68//     log_end(Context_State,FUNCTION);
69//   };
70
71#undef  FUNCTION
72#define FUNCTION "Context_State::~Parameters"
73  Parameters::~Parameters () 
74  {
75    log_begin(Context_State,FUNCTION);
76    log_end(Context_State,FUNCTION);
77  };
78
79#undef  FUNCTION
80#define FUNCTION "Context_State::copy"
81  void Parameters::copy (void) 
82  {
83    log_begin(Context_State,FUNCTION);
84    log_end(Context_State,FUNCTION);
85  };
86
87}; // end namespace context_state
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.