source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Parameters.cpp @ 113

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

1) Add modelsim simulation systemC
2) Modelsim cosimulation systemC / VHDL is not finish !!!! (cf execute_queue and write_unit)
3) Add multi architecture
5) Add template for comparator, multiplier and divider
6) Change Message
Warning) Various test macro have change, many selftest can't compile

  • Property svn:keywords set to Id
File size: 4.2 KB
Line 
1/*
2 * $Id: Parameters.cpp 113 2009-04-14 18:39:12Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Parameters.h"
9
10namespace morpheo {
11namespace behavioural {
12namespace core {
13namespace multi_execute_loop {
14namespace execute_loop {
15namespace multi_write_unit {
16namespace write_unit {
17namespace execute_queue {
18
19
20#undef  FUNCTION
21#define FUNCTION "Execute_queue::Parameters"
22  Parameters::Parameters (uint32_t size_queue         ,
23                          uint32_t nb_context         ,
24                          uint32_t nb_front_end       ,
25                          uint32_t nb_ooo_engine      ,
26                          uint32_t nb_packet          ,
27                          uint32_t size_general_data  ,
28                          uint32_t size_special_data  ,
29                          bool     is_toplevel        ):
30    behavioural::Parameters("Execute_queue")
31  {
32    log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
33
34    _size_queue              = size_queue         ;
35    _nb_context              = nb_context         ;
36    _nb_front_end            = nb_front_end       ;
37    _nb_ooo_engine           = nb_ooo_engine      ;
38    _nb_packet               = nb_packet          ;
39
40    test();
41
42    if (is_toplevel)
43      {
44        _size_instruction_address= size_general_data-2;
45        _size_context_id         = log2(_nb_context   );
46        _size_front_end_id       = log2(_nb_front_end );
47        _size_ooo_engine_id      = log2(_nb_ooo_engine);
48        _size_rob_ptr            = log2(_nb_packet    );
49        _size_general_data       = size_general_data;
50        _size_special_data       = size_special_data;
51        _size_instruction_address= size_general_data;
52
53        _have_port_context_id    = _size_context_id    > 0;
54        _have_port_front_end_id  = _size_front_end_id  > 0;
55        _have_port_ooo_engine_id = _size_ooo_engine_id > 0;
56        _have_port_rob_ptr       = _size_rob_ptr       > 0;
57
58        copy();
59      }
60
61    log_printf(FUNC,Execute_queue,FUNCTION,"End");
62  };
63 
64// #undef  FUNCTION
65// #define FUNCTION "Execute_queue::Parameters (copy)"
66//   Parameters::Parameters (Parameters & param):
67//     _size_queue              (param._size_queue             ),
68//     _nb_context              (param._nb_context             ),
69//     _nb_front_end            (param._nb_front_end           ),
70//     _nb_ooo_engine           (param._nb_ooo_engine          ),
71//     _nb_packet               (param._nb_packet              ),
72//     _size_general_data       (param._size_general_data      ),
73//     _size_special_data       (param._size_special_data      ),
74
75//     _size_context_id         (param._size_context_id        ),
76//     _size_front_end_id       (param._size_front_end_id      ),
77//     _size_ooo_engine_id      (param._size_ooo_engine_id     ),
78//     _size_packet_id          (param._size_packet_id         ),
79
80//     _have_port_context_id    (param._have_port_context_id   ),
81//     _have_port_front_end_id  (param._have_port_front_end_id ),
82//     _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
83//     _have_port_packet_id     (param._have_port_packet_id    )
84//   {
85//     log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
86//     test();
87//     log_printf(FUNC,Execute_queue,FUNCTION,"End");
88//   };
89
90#undef  FUNCTION
91#define FUNCTION "Execute_queue::~Parameters"
92  Parameters::~Parameters (void)
93  {
94    log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
95    log_printf(FUNC,Execute_queue,FUNCTION,"End");
96  };
97
98#undef  FUNCTION
99#define FUNCTION "Execute_queue::copy"
100  void Parameters::copy (void)
101  {
102    log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
103
104    _size_internal_queue = 
105      (_size_context_id          +
106       _size_front_end_id        +
107       _size_ooo_engine_id       +
108       _size_rob_ptr             +     
109//     _size_operation           +
110//     _size_type                +
111       _size_special_data        +
112       _size_exception           +
113       1                         +
114       _size_general_data        +
115       _size_general_data
116       );
117
118    log_printf(FUNC,Execute_queue,FUNCTION,"End");
119  };
120
121}; // end namespace execute_queue
122}; // end namespace write_unit
123}; // end namespace multi_write_unit
124}; // end namespace execute_loop
125}; // end namespace multi_execute_loop
126}; // end namespace core
127
128}; // end namespace behavioural
129}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.