Exemplo n.º 1
0
void SamplerSMARTS::nextMode(bool rotate, FlowID fid, EmuMode mod){
  if (rotate){
    fetchNextMode();
    I(next_mode != EmuInit);

    //If in live mode and warmup is to be forced
    if(BootLoader::genwarm > 0 && next_mode == EmuTiming) {
      BootLoader::genwarm--;
      setMode(EmuWarmup, fid);
      //setMode(EmuDetail, fid);
    } else if(BootLoader::live_warmup > 0 && next_mode == EmuTiming) {
      BootLoader::live_warmup--;
      //BootLoader::sample_count++;
      setMode(EmuDetail, fid);
      //setMode(EmuRabbit, fid);
    } else {
      setMode(next_mode, fid);
    }

    I(mode == next_mode);
    if (next_mode == EmuRabbit){
      setModeNativeRabbit();
    }
    setNextSwitch(getNextSwitch() + sequence_size[sequence_pos]);
  }else{
    I(0);
  }
}
Exemplo n.º 2
0
void SamplerSMARTS::nextMode(bool rotate, FlowID fid, EmuMode mod){

  if (rotate){

    fetchNextMode();
    I(next_mode != EmuInit);

    setMode(next_mode, fid);
    I(mode == next_mode);
    if (next_mode == EmuRabbit){
      setModeNativeRabbit();
    }
    setNextSwitch(getNextSwitch() + sequence_size[sequence_pos]);
  }else{
    I(0);
  }
}
Exemplo n.º 3
0
void SamplerPeriodic::coordinateWithOthersAndNextMode(FlowID fid) {

	fetchNextMode();

	syncTimeAndSamples(fid);

	if (lastMode == EmuTiming) { 
		progressedTime->sample(getTime());
		endSimSiged = (getTime()>=maxnsTime)?1:0;
		//std::cout<<"mode "<<lastMode<<" fid:"<<sFid<<" sID:"<<nSamples[sFid]<<" totalSamples:"<<totalnSamples<<" time:"<<getTime()<<"\n";  
	}

	if (fid == winnerFid) {
		if (lastMode == EmuTiming) { // timing is going to be over
			doPWTH(fid);
		}
	}
}