#ifdef SYSTEMC
//#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
/*
 * $Id: RegisterFile_Multi_Banked_transition.cpp 81 2008-04-15 18:40:01Z rosiere $
 *
 * [ Description ]
 * 
 */

#include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/RegisterFile_Multi_Banked.h"

namespace morpheo                    {
namespace behavioural {
namespace generic {
namespace registerfile {
namespace registerfile_multi_banked {


  void RegisterFile_Multi_Banked::transition (void)
  {
    log_printf(FUNC,RegisterFile_Multi_Banked,"transition","Begin");
    
    // call function pointer
//     (this->*function_transition) ();

    for (uint32_t i=0; i<_param->_nb_port_write; i++)
      {
	if (internal_WRITE_VAL [i] == 1)
 	  {
	    Tdata_t data = PORT_READ(in_WRITE_DATA   [i]);
	    
 	    // Write in registerFile
 	    reg_DATA[internal_WRITE_BANK[i]][internal_WRITE_NUM_REG[i]] = data;
 	  }
      }

#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    end_cycle();
#endif

    log_printf(FUNC,RegisterFile_Multi_Banked,"transition","End");
  };

}; // end namespace registerfile_multi_banked
}; // end namespace registerfile
}; // end namespace generic

}; // end namespace behavioural
}; // end namespace morpheo              
#endif
//#endif
