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

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

1) Configuration : instance configuration file : regroup similar instance
2) Configuration : timing default = 0
3) Debug/Commit_unit : Add watch dog timer
4) Issue_queue : Test parameters : add test if type is optionnal
5) Cor_glue : Fix insert index
6) Free_list : remove bank_by_pop (else deadlock)
7) Update Free List : add register to source event

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