source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_in_order_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.6 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id: Issue_queue_function_in_order_genMoore.cpp 123 2009-06-08 20:43:30Z rosiere $
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/include/Issue_queue.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace core {
14namespace multi_ooo_engine {
15namespace ooo_engine {
16namespace issue_queue {
17
18
19#undef  FUNCTION
20#define FUNCTION "Issue_queue::function_in_order_genMoore"
21  void Issue_queue::function_in_order_genMoore (void)
22  {
23    log_begin(Issue_queue,FUNCTION);
24    log_function(Issue_queue,FUNCTION,_name.c_str());
25
26    // ===================================================================
27    // =====[ REEXECUTE_UNIT ]============================================
28    // ===================================================================
29    // Same implementation in in-order and out-of-order
30
31    // ===================================================================
32    // =====[ ISSUE_IN ]==================================================
33    // ===================================================================
34    {
35      // init
36      for (uint32_t i=0; i<_param->_nb_rename_unit; i++)
37        for (uint32_t j=0; j<_param->_nb_inst_rename[i]; j++)
38          internal_ISSUE_IN_ACK [i][j] = false;
39
40      if (PORT_READ(in_NRESET))
41        {
42      std::list<generic::priority::select_t> * select_in = _priority_in ->select(); // same select for all issue
43      std::list<generic::priority::select_t>::iterator it=select_in ->begin();
44
45      uint32_t num_bank = reg_NUM_BANK_TAIL;
46      uint32_t nb_insert = 0;
47      while ((it!=select_in ->end()) and 
48             (_issue_queue[num_bank].size() != _param->_size_bank) and // test if can accept an data
49             (nb_insert < _param->_nb_bank)
50             )
51        {
52          // Get num interface
53          uint32_t num_rename_unit = it->grp;
54          uint32_t num_inst_rename = it->elt;
55         
56          log_printf(TRACE,Issue_queue,FUNCTION,"  * ISSUE_IN [%d][%d]",num_rename_unit,num_inst_rename);
57         
58          // find
59          internal_ISSUE_IN_ACK [num_rename_unit][num_inst_rename] = true;
60
61          // update pointer
62          ++it;
63          num_bank = (num_bank+1)%_param->_nb_bank;
64          nb_insert ++;
65        }
66        }
67
68      for (uint32_t i=0; i<_param->_nb_rename_unit; i++)
69        for (uint32_t j=0; j<_param->_nb_inst_rename[i]; j++)
70          PORT_WRITE(out_ISSUE_IN_ACK [i][j],internal_ISSUE_IN_ACK [i][j]);
71    }
72
73    log_end(Issue_queue,FUNCTION);
74  };
75
76}; // end namespace issue_queue
77}; // end namespace ooo_engine
78}; // end namespace multi_ooo_engine
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.