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

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

Almost complete design
with Test and test platform

  • Property svn:keywords set to Id
File size: 2.4 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/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                          uint32_t nb_instruction               ,
23                          uint32_t size_branch_update_prediction,
24                          uint32_t size_general_data            ,
25                          bool     is_toplevel)
26  {
27    log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin");
28
29    _size_queue                            = size_queue                   ;
30    _nb_instruction                        = nb_instruction               ;
31//  _size_branch_update_prediction         = size_branch_update_prediction;
32//  _size_general_data                     = size_general_data            ;
33
34    test();
35
36    if (is_toplevel)
37      {
38        _size_instruction_address   = size_general_data;
39        _size_ifetch_queue_ptr      = log2(size_queue);
40        _size_inst_ifetch_ptr       = log2(nb_instruction);
41        _size_depth                 = size_branch_update_prediction;
42
43        _have_port_ifetch_queue_ptr = _size_ifetch_queue_ptr > 0;
44        _have_port_inst_ifetch_ptr  = _size_inst_ifetch_ptr > 0;
45        _have_port_depth            = _size_depth > 0;
46
47        copy ();
48      }
49
50    log_printf(FUNC,Ifetch_queue,FUNCTION,"End");
51  };
52 
53// #undef  FUNCTION
54// #define FUNCTION "Ifetch_queue::Parameters (copy)"
55//   Parameters::Parameters (Parameters & param)
56//   {
57//     log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin");
58//     test();
59//     log_printf(FUNC,Ifetch_queue,FUNCTION,"End");
60//   };
61
62#undef  FUNCTION
63#define FUNCTION "Ifetch_queue::~Parameters"
64  Parameters::~Parameters () 
65  {
66    log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin");
67    log_printf(FUNC,Ifetch_queue,FUNCTION,"End");
68  };
69
70#undef  FUNCTION
71#define FUNCTION "Ifetch_queue::copy"
72  void Parameters::copy (void) 
73  {
74    log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin");
75    log_printf(FUNC,Ifetch_queue,FUNCTION,"End");
76  };
77
78}; // end namespace ifetch_queue
79}; // end namespace ifetch_unit
80}; // end namespace front_end
81}; // end namespace multi_front_end
82}; // end namespace core
83
84}; // end namespace behavioural
85}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.