#ifdef SYSTEMC
//#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
/*
 * $Id$
 *
 * [ 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
 	    REGISTER_WRITE(reg_DATA[internal_WRITE_BANK[i]][internal_WRITE_NUM_REG[i]],data);
 	  }
      }



#ifdef STATISTICS
    _stat->add();
#endif    

#ifdef VHDL_TESTBENCH
    vhdl_testbench_transition ();
#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
