예제 #1
0
 public MicroInstruction(int address, NextAddress nextAddress, bool enableValue,
     int value, JumpCriterion jumpCriterion, bool clearInterrupt,
     bool affected, AluCmd aluCommand, Source source,
     Destination destination, DataInput dataInput, ReadWrite readWrite)
 {
     this.Address = address;
     this.NextAddress = nextAddress;
     this.EnableValue = enableValue;
     this.Value = value;
     this.JumpCriterion = jumpCriterion;
     this.ClearInterrupt = clearInterrupt;
     this.AffectFlags = affected;
     this.AluCommand = aluCommand;
     this.Source = source;
     this.Destination = destination;
     this.DataInput = dataInput;
     this.ReadWrite = readWrite;
 }
예제 #2
0
 /// <summary>Checks if the micro program memory entry is a jump and it is successful.</summary>
 /// <param name="status">Status register</param>
 /// <param name="criterion">Jump criterion of the current micro program memory entry</param>
 /// <returns></returns>
 private bool SuccessfulJump(StatusRegister status, JumpCriterion criterion) =>
     criterion != JumpCriterion.Empty && (
         (criterion == JumpCriterion.Signed && status.Signed) ||
         (criterion == JumpCriterion.Overflow && status.Overflow) ||
         (criterion == JumpCriterion.Zero && status.Zero) ||
         (criterion == JumpCriterion.NotSigned && !status.Signed) ||
         (criterion == JumpCriterion.NoOverflow && !status.Overflow) ||
         (criterion == JumpCriterion.NotZero && !status.Zero)
     );