source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_transition.cpp @ 78

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

Add :

  • Execute_loop (must be test systemC)
  • Prediction
    • Direction : predifined scheme
    • Branch Target Buffer
  • iFetch_unit
    • ifetch_queue
    • pc management
  • Decod_unit
    • coming soon : support for custom operation
  • Rename_unit
    • RAT
    • Free_list
    • Dependence RAW check
    • Load store unit pointer
  • New Environnement (hierarchy_memory will remove in a next version)


Modif :

  • Manage Custom Operation
  • All component in execute_loop to use the new statistics management

Not Finish :

  • Return Address Stack
  • Environnement
File size: 2.8 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/include/Free_List_unit.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace core {
14namespace multi_ooo_engine {
15namespace ooo_engine {
16namespace rename_unit {
17namespace register_translation_unit {
18namespace free_list_unit {
19
20
21#undef  FUNCTION
22#define FUNCTION "Free_List_unit::transition"
23  void Free_List_unit::transition (void)
24  {
25    log_printf(FUNC,Free_List_unit,FUNCTION,"Begin");
26
27    if (PORT_READ(in_NRESET) == 0)
28      {
29        internal_BANK_PRIORITY = 0;
30        for (uint32_t i=0; i<_param->_nb_bank; i++)
31          {
32            _gpr_list[i].clear();
33            _spr_list[i].clear();
34          }
35      }
36    else
37      {
38        // ==================================================
39        // =====[ POP ]======================================
40        // ==================================================
41//      log_printf(TRACE,Free_List_unit,FUNCTION,"Test transaction POP");
42        for (uint32_t i=0; i<_param->_nb_pop; i++)
43          if (PORT_READ(in_POP_VAL[i]) and internal_POP_ACK [i])
44            {
45              if (PORT_READ(in_POP_GPR_VAL [i]))
46                _gpr_list [internal_POP_GPR_BANK[i]].pop_front();
47         
48              if (PORT_READ(in_POP_SPR_VAL [i]))
49                _spr_list [internal_POP_SPR_BANK[i]].pop_front();
50            }
51
52        // ==================================================
53        // =====[ PUSH_GPR ]=================================
54        // ==================================================
55//      log_printf(TRACE,Free_List_unit,FUNCTION,"Test transaction PUSH_GPR");
56        for (uint32_t i=0; i<_param->_nb_push; i++)
57          if (PORT_READ(in_PUSH_GPR_VAL[i]) and internal_PUSH_GPR_ACK [i])
58            _gpr_list [internal_PUSH_GPR_BANK[i]].push_back(//_param->_mask_gpr &
59                                                            PORT_READ(in_PUSH_GPR_NUM_REG [i]));
60
61        // ==================================================
62        // =====[ PUSH_SPR ]=================================
63        // ==================================================
64//      log_printf(TRACE,Free_List_unit,FUNCTION,"Test transaction PUSH_SPR");
65        for (uint32_t i=0; i<_param->_nb_push; i++)
66          if (PORT_READ(in_PUSH_SPR_VAL[i]) and internal_PUSH_SPR_ACK [i])
67            _spr_list [internal_PUSH_SPR_BANK[i]].push_back(//_param->_mask_spr &
68                                                            PORT_READ(in_PUSH_SPR_NUM_REG [i]));
69
70        if (_param->_priority == PRIORITY_ROUND_ROBIN)
71          internal_BANK_PRIORITY = (internal_BANK_PRIORITY+1)%_param->_nb_bank_by_pop;
72      }
73
74#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
75    end_cycle ();
76#endif
77
78    log_printf(FUNC,Free_List_unit,FUNCTION,"End");
79  };
80
81}; // end namespace free_list_unit
82}; // end namespace register_translation_unit
83}; // end namespace rename_unit
84}; // end namespace ooo_engine
85}; // end namespace multi_ooo_engine
86}; // end namespace core
87
88}; // end namespace behavioural
89}; // end namespace morpheo             
90#endif
Note: See TracBrowser for help on using the repository browser.