#include "Behavioural/include/SPR_access_mode.h"

namespace morpheo {
namespace behavioural {

  void SPR_access_mode::change_mode (uint32_t num_group, uint32_t num_reg, spr_access_mode_t new_mode)
    {
      if (not valid (num_group, num_reg))
	throw ERRORMORPHEO("SPR_access_mode::change_mode", "Invalid group number or register number.");

      _spr_generic[num_group][num_reg] = new_mode;
    }

}; // end namespace behavioural
}; // end namespace morpheo              

