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_genMealy_push_gpr.cpp @ 108

Last change on this file since 108 was 108, checked in by rosiere, 15 years ago

1) decod_queue : add reg_LAST_SLOT.
2) Commit : insert on event -> to pop decod_queue. Head test : add information (speculative or not)
3) Context State / UPT : Branch miss and Load miss in same cycle.
4) Free List : Bank is on LSB not MSB.
5) Platforms : move data

  • Property svn:keywords set to Id
File size: 2.0 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id: Free_List_unit_genMealy_push_gpr.cpp 108 2009-02-12 11:55:06Z rosiere $
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::genMealy_push_gpr"
23  void Free_List_unit::genMealy_push_gpr (void)
24  {
25    log_begin(Free_List_unit,FUNCTION);
26    log_function(Free_List_unit,FUNCTION,_name.c_str());
27
28    // bank conflit
29    bool bank_use [_param->_nb_bank];
30    for (uint32_t i=0; i<_param->_nb_bank; i++)
31      bank_use [i] = false;
32
33    for (uint32_t i=0; i<_param->_nb_push; i++)
34      {
35        log_printf(TRACE,Free_List_unit,FUNCTION,"  * PUSH [%d]",i);
36
37        bool gpr_ack = not PORT_READ(in_PUSH_GPR_VAL[i]);
38       
39        log_printf(TRACE,Free_List_unit,FUNCTION,"    * GPR_VAL : %d",PORT_READ(in_PUSH_GPR_VAL[i]));
40
41        if (not gpr_ack)
42          {
43//          // num_bank : MSB
44//          uint32_t bank = PORT_READ(in_PUSH_GPR_NUM_REG[i]) >> _param->_bank_gpr_size_slot;
45            // num_bank : LSB
46            uint32_t bank = PORT_READ(in_PUSH_GPR_NUM_REG[i]) & _param->_mask_gpr;
47           
48            if (not bank_use [bank])
49              {
50                log_printf(TRACE,Free_List_unit,FUNCTION,"    * find ");
51                log_printf(TRACE,Free_List_unit,FUNCTION,"    * bank    : %d",bank);
52
53                // find
54                gpr_ack = true;
55                internal_PUSH_GPR_BANK [i] = bank;
56                bank_use [bank] = true;
57              }
58          }
59
60        internal_PUSH_GPR_ACK [i] = gpr_ack;
61        PORT_WRITE(out_PUSH_GPR_ACK [i], internal_PUSH_GPR_ACK [i]);
62      }
63   
64    log_end(Free_List_unit,FUNCTION);
65  };
66
67}; // end namespace free_list_unit
68}; // end namespace register_translation_unit
69}; // end namespace rename_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.