10.01_base/2_src/arm/buslatches.cpp
// shuffles entries in mailbox.exerciser work list
shuffles entries in mailbox.exerciser work list
shuffles entries in mailbox . exerciser work list
void buslatches_c::exerciser_random_order() {
	for (unsigned i = 0; i < 2 * BUSLATCHES_COUNT; i++) {
		unsigned reg_sel1 = rand() % BUSLATCHES_COUNT;
		unsigned reg_sel2 = rand() % BUSLATCHES_COUNT;
		std::swap(mailbox->buslatch_exerciser.addr[reg_sel1], mailbox->buslatch_exerciser.addr[reg_sel2]) ;
		std::swap(mailbox->buslatch_exerciser.writeval[reg_sel1], mailbox->buslatch_exerciser.writeval[reg_sel2]) ;
		std::swap(mailbox->buslatch_exerciser.readval[reg_sel1], mailbox->buslatch_exerciser.readval[reg_sel2]) ;
	}
}
void buslatches_c :: exerciser_random_order ( ) { for ( unsigned i = 0 ; i < 2 * BUSLATCHES_COUNT ; i ++ ) { unsigned reg_sel1 = rand ( ) % BUSLATCHES_COUNT ; unsigned reg_sel2 = rand ( ) % BUSLATCHES_COUNT ; std :: swap ( mailbox -> buslatch_exerciser . addr [ reg_sel1 ] , mailbox -> buslatch_exerciser . addr [ reg_sel2 ] ) ; std :: swap ( mailbox -> buslatch_exerciser . writeval [ reg_sel1 ] , mailbox -> buslatch_exerciser . writeval [ reg_sel2 ] ) ; std :: swap ( mailbox -> buslatch_exerciser . readval [ reg_sel1 ] , mailbox -> buslatch_exerciser . readval [ reg_sel2 ] ) ; } }
shuffles entries in mailbox.exerciser work list
shuffles entries in mailbox . exerciser work list
// swap addr and testval