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

Last change on this file since 136 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.8 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id: Execute_queue_genMoore.cpp 136 2009-10-20 18:52:15Z rosiere $
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Execute_queue.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace core {
14namespace multi_execute_loop {
15namespace execute_loop {
16namespace multi_write_unit {
17namespace write_unit {
18namespace execute_queue {
19
20
21#undef  FUNCTION
22#define FUNCTION "Execute_queue::genMoore"
23  void Execute_queue::genMoore (void)
24  {
25    log_begin(Execute_queue,FUNCTION);
26    log_function(Execute_queue,FUNCTION,_name.c_str());
27
28    if (PORT_READ(in_NRESET))
29      {
30    // -----[ Interface "execute_queue_in" ]--------------------------------
31    {
32      internal_EXECUTE_QUEUE_IN_ACK = _queue->size() < _param->_size_queue;
33    }
34
35    // -----[ Interface "execute_queue_out" ]--------------------------------
36    {
37      internal_EXECUTE_QUEUE_OUT_VAL = (not _queue->empty());
38     
39      if (internal_EXECUTE_QUEUE_OUT_VAL)
40        {
41          if (_param->_have_port_context_id)
42          PORT_WRITE(out_EXECUTE_QUEUE_OUT_CONTEXT_ID   , _queue->front()->_context_id   );
43          if (_param->_have_port_front_end_id)
44          PORT_WRITE(out_EXECUTE_QUEUE_OUT_FRONT_END_ID , _queue->front()->_front_end_id );
45          if (_param->_have_port_ooo_engine_id)
46          PORT_WRITE(out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID, _queue->front()->_ooo_engine_id);
47          if (_param->_have_port_rob_ptr)
48          PORT_WRITE(out_EXECUTE_QUEUE_OUT_PACKET_ID    , _queue->front()->_packet_id    );
49//        PORT_WRITE(out_EXECUTE_QUEUE_OUT_OPERATION    , _queue->front()->_operation    );
50//        PORT_WRITE(out_EXECUTE_QUEUE_OUT_TYPE         , _queue->front()->_type         );
51          PORT_WRITE(out_EXECUTE_QUEUE_OUT_CANCEL       , _queue->front()->_cancel       );
52          PORT_WRITE(out_EXECUTE_QUEUE_OUT_FLAGS        , _queue->front()->_flags        );
53          PORT_WRITE(out_EXECUTE_QUEUE_OUT_EXCEPTION    , _queue->front()->_exception    );
54          PORT_WRITE(out_EXECUTE_QUEUE_OUT_NO_SEQUENCE  , _queue->front()->_no_sequence  );
55          PORT_WRITE(out_EXECUTE_QUEUE_OUT_ADDRESS      , _queue->front()->_address      );
56          PORT_WRITE(out_EXECUTE_QUEUE_OUT_DATA         , _queue->front()->_data         );
57        }
58    }
59      }
60    else
61      {
62        // Reset
63      internal_EXECUTE_QUEUE_IN_ACK  = 0;
64      internal_EXECUTE_QUEUE_OUT_VAL = 0;
65      }
66
67    // Write output
68    PORT_WRITE(out_EXECUTE_QUEUE_IN_ACK , internal_EXECUTE_QUEUE_IN_ACK);
69    PORT_WRITE(out_EXECUTE_QUEUE_OUT_VAL, internal_EXECUTE_QUEUE_OUT_VAL);
70
71    log_end(Execute_queue,FUNCTION);
72  };
73
74}; // end namespace execute_queue
75}; // end namespace write_unit
76}; // end namespace multi_write_unit
77}; // end namespace execute_loop
78}; // end namespace multi_execute_loop
79}; // end namespace core
80
81}; // end namespace behavioural
82}; // end namespace morpheo             
83#endif
Note: See TracBrowser for help on using the repository browser.