source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/src/Reexecute_unit_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.1 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id: Reexecute_unit_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/Reexecute_unit/include/Reexecute_unit.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace core {
14namespace multi_ooo_engine {
15namespace ooo_engine {
16namespace reexecute_unit {
17
18
19#undef  FUNCTION
20#define FUNCTION "Reexecute_unit::genMoore"
21  void Reexecute_unit::genMoore (void)
22  {
23    log_begin(Reexecute_unit,FUNCTION);
24    log_function(Reexecute_unit,FUNCTION,_name.c_str());
25
26    if (PORT_READ(in_NRESET))
27      {
28    // ===================================================================
29    // =====[ SPR ]=======================================================
30    // ===================================================================
31    for (uint32_t i=0; i<_param->_nb_inst_reexecute; i++)
32      {
33        Tcontrol_t val = (not _reexecute_queue [i].empty() and
34                          (_reexecute_queue [i].front()->state == STATE_SPR_ACCESS));
35
36        if (val)
37          {
38            entry_t * entry = _reexecute_queue [i].front();
39
40            PORT_WRITE(out_SPR_WEN          [i],entry->spr_wen);
41            if (_param->_have_port_context_id)
42            PORT_WRITE(out_SPR_CONTEXT_ID   [i],entry->context_id);
43            if (_param->_have_port_front_end_id)
44            PORT_WRITE(out_SPR_FRONT_END_ID [i],entry->front_end_id);
45            PORT_WRITE(out_SPR_NUM_GROUP    [i],(entry->address >> _param->_shift_spr_num_group) & _param->_mask_spr_num_group);
46            PORT_WRITE(out_SPR_NUM_REG      [i],(entry->address                                ) & _param->_mask_spr_num_reg  );
47            PORT_WRITE(out_SPR_WDATA        [i],entry->data);
48          }
49
50        internal_SPR_VAL [i] = val;
51      }
52      }
53    else
54      {
55        //Reset
56        for (uint32_t i=0; i<_param->_nb_inst_reexecute; i++)
57          internal_SPR_VAL [i] = 0;
58      }
59
60    // Write output
61    for (uint32_t i=0; i<_param->_nb_inst_reexecute; i++)
62      {
63        PORT_WRITE(out_SPR_VAL [i], internal_SPR_VAL [i]);
64      }
65
66    log_end(Reexecute_unit,FUNCTION);
67  };
68
69}; // end namespace reexecute_unit
70}; // end namespace ooo_engine
71}; // end namespace multi_ooo_engine
72}; // end namespace core
73
74}; // end namespace behavioural
75}; // end namespace morpheo             
76#endif
Note: See TracBrowser for help on using the repository browser.