source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Parameters.cpp

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

1) Add new algo in ifetch queue
2) Add Cancel bit
3) new config

  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
1/*
2 * $Id: Parameters.cpp 136 2009-10-20 18:52:15Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/include/Parameters.h"
9
10namespace morpheo {
11namespace behavioural {
12namespace core {
13namespace multi_front_end {
14namespace front_end {
15namespace ifetch_unit {
16namespace ifetch_queue {
17
18
19#undef  FUNCTION
20#define FUNCTION "Ifetch_queue::Parameters"
21  Parameters::Parameters (uint32_t               size_queue                   ,
22                          Tifetch_queue_scheme_t queue_scheme                 ,
23                          uint32_t               nb_instruction               ,
24                          uint32_t               size_branch_update_prediction,
25                          uint32_t               size_general_data            ,
26                          bool                   is_toplevel)
27  {
28    log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin");
29
30    _nb_instruction_in_queue               = size_queue                   ;
31    _size_queue                            = size_queue/nb_instruction    ;
32    _queue_scheme                          = queue_scheme                 ;
33    _nb_instruction                        = nb_instruction               ;
34//  _size_branch_update_prediction         = size_branch_update_prediction;
35//  _size_general_data                     = size_general_data            ;
36
37    test();
38
39    if (is_toplevel)
40      {
41        _size_instruction_address   = size_general_data;
42        _size_ifetch_queue_ptr      = log2(_size_queue);
43        _size_inst_ifetch_ptr       = log2(nb_instruction);
44        _size_depth                 = size_branch_update_prediction;
45
46        _have_port_ifetch_queue_ptr = _size_ifetch_queue_ptr > 0;
47        _have_port_inst_ifetch_ptr  = _size_inst_ifetch_ptr > 0;
48        _have_port_depth            = _size_depth > 0;
49
50        copy ();
51      }
52
53    log_printf(FUNC,Ifetch_queue,FUNCTION,"End");
54  };
55 
56// #undef  FUNCTION
57// #define FUNCTION "Ifetch_queue::Parameters (copy)"
58//   Parameters::Parameters (Parameters & param)
59//   {
60//     log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin");
61//     test();
62//     log_printf(FUNC,Ifetch_queue,FUNCTION,"End");
63//   };
64
65#undef  FUNCTION
66#define FUNCTION "Ifetch_queue::~Parameters"
67  Parameters::~Parameters () 
68  {
69    log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin");
70    log_printf(FUNC,Ifetch_queue,FUNCTION,"End");
71  };
72
73#undef  FUNCTION
74#define FUNCTION "Ifetch_queue::copy"
75  void Parameters::copy (void) 
76  {
77    log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin");
78    log_printf(FUNC,Ifetch_queue,FUNCTION,"End");
79  };
80
81}; // end namespace ifetch_queue
82}; // end namespace ifetch_unit
83}; // end namespace front_end
84}; // end namespace multi_front_end
85}; // end namespace core
86
87}; // end namespace behavioural
88}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.