source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_transition.cpp @ 111

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

1) Decod_queue : multi implementation (one_fifo, multi_fifo)
2) Issue_queue : multi implementation (in_order, out_of_order)
3) Direction : Add Meta predictor
4) Context_State : re add Branch_complete, More priority to Load miss (is not speculative)
5) Return_Address_Stack : update reg_PREDICT pointer on decod miss prediction
6) UPT : Fix bug in multi event
7) Prediction_glue : in read_stack case, insert in UPT pc_next
8) Rename select : when rob have an event (need flush), read_r{a,b,c} and write_r{d,e} is set at 0

  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1#ifdef SYSTEMC
2//#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
3/*
4 * $Id: RegisterFile_Multi_Banked_transition.cpp 111 2009-02-27 18:37:40Z rosiere $
5 *
6 * [ Description ]
7 *
8 */
9
10#include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/RegisterFile_Multi_Banked.h"
11
12namespace morpheo                    {
13namespace behavioural {
14namespace generic {
15namespace registerfile {
16namespace registerfile_multi_banked {
17
18#undef  FUNCTION
19#define FUNCTION "RegisterFile_Multi_Banked::transition"
20  void RegisterFile_Multi_Banked::transition (void)
21  {
22    log_begin(RegisterFile_Multi_Banked,FUNCTION);
23    log_function(RegisterFile_Multi_Banked,FUNCTION,_name.c_str());
24   
25    // call function pointer
26//     (this->*function_transition) ();
27
28    for (uint32_t i=0; i<_param->_nb_port_write; i++)
29      {
30        if (internal_WRITE_VAL [i] == 1)
31          {
32            Tdata_t data = PORT_READ(in_WRITE_DATA   [i]);
33           
34            // Write in registerFile
35            reg_DATA[internal_WRITE_BANK[i]][internal_WRITE_NUM_REG[i]] = data;
36          }
37      }
38
39#if defined(DEBUG_RegisterFile_Multi_Banked) and DEBUG_RegisterFile_Multi_Banked and (DEBUG >= DEBUG_TRACE)
40    if (0)
41    {
42      log_printf(TRACE,RegisterFile,FUNCTION,"  * Dump RegisterFile");
43
44      uint32_t limit = 4;
45     
46      for (uint32_t i=0; i<_param->_nb_bank; i++)
47        {
48         
49          log_printf(TRACE,RegisterFile,FUNCTION,"  Bank %d",i);
50
51          for (uint32_t j=0; j<_param->_nb_word_by_bank; j+=limit)
52            {
53              std::string str = "";
54             
55              for (uint32_t k=0; k<limit; k++)
56                {
57                  uint32_t index = j+k;
58                  if (index >= _param->_nb_word)
59                    break;
60                  else
61                    str+=toString("[%.4d] %.8x ",index,reg_DATA[i][index]);
62                }
63             
64              log_printf(TRACE,RegisterFile,FUNCTION,"  %s",str.c_str());
65            }
66        }
67    }
68#endif
69
70#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
71    end_cycle();
72#endif
73
74    log_end(RegisterFile_Multi_Banked,FUNCTION);
75  };
76
77}; // end namespace registerfile_multi_banked
78}; // end namespace registerfile
79}; // end namespace generic
80
81}; // end namespace behavioural
82}; // end namespace morpheo             
83#endif
84//#endif
Note: See TracBrowser for help on using the repository browser.