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

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

1) Fix bug (read unit, RAT -> write in R0, SPR desallocation ...)
2) Change VHDL Execute_queue -> use Generic/Queue?
3) Complete document on VHDL generation
4) Add soc test

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