source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/src/Reexecute_unit_genMoore.cpp @ 88

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

Almost complete design
with Test and test platform

  • Property svn:keywords set to Id
File size: 1.8 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id: Reexecute_unit_genMoore.cpp 88 2008-12-10 18:31:39Z 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
25    // ===================================================================
26    // =====[ SPR ]=======================================================
27    // ===================================================================
28    for (uint32_t i=0; i<_param->_nb_inst_reexecute; i++)
29      {
30        Tcontrol_t val = (not _reexecute_queue [i].empty() and
31                          (_reexecute_queue [i].front()->state == STATE_SPR_ACCESS));
32
33        if (val)
34          {
35            entry_t * entry = _reexecute_queue [i].front();
36
37            PORT_WRITE(out_SPR_WEN          [i],entry->spr_wen);
38            if (_param->_have_port_context_id)
39            PORT_WRITE(out_SPR_CONTEXT_ID   [i],entry->context_id);
40            if (_param->_have_port_front_end_id)
41            PORT_WRITE(out_SPR_FRONT_END_ID [i],entry->front_end_id);
42            PORT_WRITE(out_SPR_NUM_GROUP    [i],(entry->address >> _param->_shift_spr_num_group) & _param->_mask_spr_num_group);
43            PORT_WRITE(out_SPR_NUM_REG      [i],(entry->address                                ) & _param->_mask_spr_num_reg  );
44            PORT_WRITE(out_SPR_WDATA        [i],entry->data);
45          }
46
47        internal_SPR_VAL [i] = val;
48        PORT_WRITE(out_SPR_VAL [i], internal_SPR_VAL [i]);
49      }
50
51    log_end(Reexecute_unit,FUNCTION);
52  };
53
54}; // end namespace reexecute_unit
55}; // end namespace ooo_engine
56}; // end namespace multi_ooo_engine
57}; // end namespace core
58
59}; // end namespace behavioural
60}; // end namespace morpheo             
61#endif
Note: See TracBrowser for help on using the repository browser.