You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
744 B

package processor.pipeline;
import generic.Simulator;
import processor.Processor;
public class RegisterWrite {
Processor containingProcessor;
MA_RW_LatchType MA_RW_Latch;
IF_EnableLatchType IF_EnableLatch;
public RegisterWrite(Processor containingProcessor, MA_RW_LatchType mA_RW_Latch, IF_EnableLatchType iF_EnableLatch)
{
this.containingProcessor = containingProcessor;
this.MA_RW_Latch = mA_RW_Latch;
this.IF_EnableLatch = iF_EnableLatch;
}
public void performRW()
{
if(MA_RW_Latch.isRW_enable())
{
//TODO
// if instruction being processed is an end instruction, remember to call Simulator.setSimulationComplete(true);
MA_RW_Latch.setRW_enable(false);
IF_EnableLatch.setIF_enable(true);
}
}
}