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 @ 123

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

1) Fix performance
2) add auto generation to SPECINT2000
3) add reset in genMoore and genMealy

  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id: Execute_queue_genMoore.cpp 123 2009-06-08 20:43:30Z 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_FLAGS        , _queue->front()->_flags        );
52          PORT_WRITE(out_EXECUTE_QUEUE_OUT_EXCEPTION    , _queue->front()->_exception    );
53          PORT_WRITE(out_EXECUTE_QUEUE_OUT_NO_SEQUENCE  , _queue->front()->_no_sequence  );
54          PORT_WRITE(out_EXECUTE_QUEUE_OUT_ADDRESS      , _queue->front()->_address      );
55          PORT_WRITE(out_EXECUTE_QUEUE_OUT_DATA         , _queue->front()->_data         );
56        }
57    }
58      }
59    else
60      {
61        // Reset
62      internal_EXECUTE_QUEUE_IN_ACK  = 0;
63      internal_EXECUTE_QUEUE_OUT_VAL = 0;
64      }
65
66    // Write output
67    PORT_WRITE(out_EXECUTE_QUEUE_IN_ACK , internal_EXECUTE_QUEUE_IN_ACK);
68    PORT_WRITE(out_EXECUTE_QUEUE_OUT_VAL, internal_EXECUTE_QUEUE_OUT_VAL);
69
70    log_end(Execute_queue,FUNCTION);
71  };
72
73}; // end namespace execute_queue
74}; // end namespace write_unit
75}; // end namespace multi_write_unit
76}; // end namespace execute_loop
77}; // end namespace multi_execute_loop
78}; // end namespace core
79
80}; // end namespace behavioural
81}; // end namespace morpheo             
82#endif
Note: See TracBrowser for help on using the repository browser.