source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/include/MemoryRequest.h @ 71

Last change on this file since 71 was 71, checked in by rosiere, 16 years ago

Modification of Statisctics
Add a new systemC component : Load_Store_Queue (tested with one benchmark and one configuration). Store don't supported the Data Buss Error (Load is supported)

File size: 7.5 KB
Line 
1#ifndef MEMORYREQUEST_H
2#define MEMORYREQUEST_H
3
4#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Load_store_unit.h"
5
6//========================================================={MemoryRequest_t}
7class MemoryRequest_t
8{
9public : double                                   _cycle                ;
10public : morpheo::behavioural::Tcontext_t         _context_id           ;
11public : morpheo::behavioural::Tcontext_t         _front_end_id         ;
12public : morpheo::behavioural::Tcontext_t         _ooo_engine_id        ;
13public : morpheo::behavioural::Tpacket_t          _packet_id            ;
14public : morpheo::behavioural::Toperation_t       _operation            ;
15public : morpheo::behavioural::Ttype_t            _type                 ;
16public : morpheo::behavioural::Tlsq_ptr_t         _store_queue_ptr_write;
17public : morpheo::behavioural::Tlsq_ptr_t         _load_queue_ptr_write ;
18public : morpheo::behavioural::Tgeneral_data_t    _immediat             ;
19public : morpheo::behavioural::Tgeneral_data_t    _data_ra              ;
20public : morpheo::behavioural::Tgeneral_data_t    _data_rb              ;
21public : morpheo::behavioural::Tcontrol_t         _write_rd             ;
22public : morpheo::behavioural::Tgeneral_address_t _num_reg_rd           ;
23public : bool                                     _write_spec_ko        ;
24public : bool                                     _previous_load_speculative;
25public : morpheo::behavioural::Tgeneral_data_t    _data_wait            ;
26
27  MemoryRequest_t (void) 
28  {
29    _cycle                 = 0;
30    _context_id            = 0;
31    _front_end_id          = 0;
32    _ooo_engine_id         = 0;
33    _packet_id             = 0;
34    _operation             = 0;
35    _type                  = 0;
36    _store_queue_ptr_write = 0;
37    _load_queue_ptr_write  = 0;
38    _immediat              = 0;
39    _data_ra               = 0;
40    _data_rb               = 0;
41    _write_rd              = 0;
42    _num_reg_rd            = 0;
43    _write_spec_ko         = 0;
44    _previous_load_speculative = 0;
45    _data_wait             = 0;
46  };
47
48  MemoryRequest_t (double             cycle                ,
49                   morpheo::behavioural::Tcontext_t         context_id           ,
50                   morpheo::behavioural::Tcontext_t         front_end_id         ,
51                   morpheo::behavioural::Tcontext_t         ooo_engine_id        ,
52                   morpheo::behavioural::Tpacket_t          packet_id            ,
53                   morpheo::behavioural::Toperation_t       operation            ,
54                   morpheo::behavioural::Ttype_t            type                 ,
55                   morpheo::behavioural::Tlsq_ptr_t         store_queue_ptr_write,
56                   morpheo::behavioural::Tlsq_ptr_t         load_queue_ptr_write ,
57                   morpheo::behavioural::Tgeneral_data_t    immediat             ,
58                   morpheo::behavioural::Tgeneral_data_t    data_ra              ,
59                   morpheo::behavioural::Tgeneral_data_t    data_rb              ,
60                   morpheo::behavioural::Tcontrol_t         write_rd             ,
61                   morpheo::behavioural::Tgeneral_address_t num_reg_rd           ,
62                   bool                                     write_spec_ko        ,
63                   morpheo::behavioural::Tgeneral_data_t    data_wait=0)
64  {
65    _cycle                 = cycle                ;
66    _context_id            = context_id           ;
67    _front_end_id          = front_end_id         ;
68    _ooo_engine_id         = ooo_engine_id        ;
69    _packet_id             = packet_id            ;
70    _operation             = operation            ;
71    _type                  = type                 ;
72    _store_queue_ptr_write = store_queue_ptr_write;
73    _load_queue_ptr_write  = load_queue_ptr_write ;
74    _immediat              = immediat             ;
75    _data_ra               = data_ra              ;
76    _data_rb               = data_rb              ;
77    _write_rd              = write_rd             ;
78    _num_reg_rd            = num_reg_rd           ;
79    _write_spec_ko         = write_spec_ko        ;
80    _previous_load_speculative = 0;
81    _data_wait             = data_wait            ;
82  }
83
84  void modif (double             cycle                ,
85              morpheo::behavioural::Tcontext_t         context_id           ,
86              morpheo::behavioural::Tcontext_t         front_end_id         ,
87              morpheo::behavioural::Tcontext_t         ooo_engine_id        ,
88              morpheo::behavioural::Tpacket_t          packet_id            ,
89              morpheo::behavioural::Toperation_t       operation            ,
90              morpheo::behavioural::Ttype_t            type                 ,
91              morpheo::behavioural::Tlsq_ptr_t         store_queue_ptr_write,
92              morpheo::behavioural::Tlsq_ptr_t         load_queue_ptr_write ,
93              morpheo::behavioural::Tgeneral_data_t    immediat             ,
94              morpheo::behavioural::Tgeneral_data_t    data_ra              ,
95              morpheo::behavioural::Tgeneral_data_t    data_rb              ,
96              morpheo::behavioural::Tcontrol_t         write_rd             ,
97              morpheo::behavioural::Tgeneral_address_t num_reg_rd           ,
98              bool                                     write_spec_ko        ,
99              morpheo::behavioural::Tgeneral_data_t    data_wait=0          )
100  {
101    _cycle                 = cycle                ;
102    _context_id            = context_id           ;
103    _front_end_id          = front_end_id         ;
104    _ooo_engine_id         = ooo_engine_id        ;
105    _packet_id             = packet_id            ;
106    _operation             = operation            ;
107    _type                  = type                 ;
108    _store_queue_ptr_write = store_queue_ptr_write;
109    _load_queue_ptr_write  = load_queue_ptr_write ;
110    _immediat              = immediat             ;
111    _data_ra               = data_ra              ;
112    _data_rb               = data_rb              ;
113    _write_rd              = write_rd             ;
114    _num_reg_rd            = num_reg_rd           ;
115    _write_spec_ko         = write_spec_ko        ;
116    _previous_load_speculative = 0;
117    _data_wait             = data_wait            ;
118  }
119
120  bool operator< (const MemoryRequest_t & right) const 
121  {
122    return _cycle > right._cycle; 
123  }
124
125  friend std::ostream& operator<<(std::ostream & os, const MemoryRequest_t & x)
126  {
127    return os << "<" << morpheo::toString(x._cycle) << "> : "
128              << "{" << morpheo::toString(static_cast<uint32_t>(x._packet_id)) << "}" << endl
129              << "\t * context / front_end / ooo_engine  : " << morpheo::toString(static_cast<uint32_t>(x._context_id   )) << " - " << morpheo::toString(static_cast<uint32_t>(x._front_end_id )) << " - " << morpheo::toString(static_cast<uint32_t>(x._ooo_engine_id)) << endl
130              << "\t * operation  / type / write_spec_ko : " << morpheo::toString(static_cast<uint32_t>(x._operation)) << " " << morpheo::toString(static_cast<uint32_t>(x._type)) << " " << morpheo::toString(static_cast<uint32_t>(x._write_spec_ko)) << endl
131              << "\t * ptr_write store/load              : " << morpheo::toString(static_cast<uint32_t>(x._store_queue_ptr_write)) << " " << morpheo::toString(static_cast<uint32_t>(x._load_queue_ptr_write)) << endl
132              << "\t * immediat / data_ra / data_rb      : " << morpheo::toString(static_cast<uint32_t>(x._immediat)) << " - " << morpheo::toString(static_cast<uint32_t>(x._data_ra)) << " - " << morpheo::toString(static_cast<uint32_t>(x._data_rb)) << endl
133              << "\t * write_rd / num_reg_rd             : " << morpheo::toString(static_cast<uint32_t>(x._write_rd)) << " " << morpheo::toString(static_cast<uint32_t>(x._num_reg_rd)) << endl
134              << "\t * data_wait                         : " << morpheo::toString(static_cast<uint32_t>(x._data_wait)) << endl;
135  }
136
137};
138
139#endif
Note: See TracBrowser for help on using the repository browser.