public Instruction parsetoIns() { Instruction ins = new Instruction(); char[] combine = GlobalMath.toBinary(Combination).ToArray(); if (combine[0] == '1') { ins.type = InstructionType.WRITE; } else { ins.type = InstructionType.READ; } ins.pc = PC; ins.is_mem = true; ins.pid = _id; combine[0] = '0'; ins.address = Convert.ToUInt64(String.Join("", combine), 2); return(ins); }
public ProcRequest getProcRequestFromTrace() { ProcRequest result = new ProcRequest(); char[] combine = GlobalMath.toBinary(Combination).ToArray(); if (combine[0] == '1') { result.type = RequestType.WRITE; } else { result.type = RequestType.READ; } result.pc = PC; result.if_mem = true; combine[0] = '0'; result.pid = _id; result.actual_addr = Convert.ToUInt64(String.Join("", combine), 2); return(result); }
public Address ActualAddress() { char[] combine = GlobalMath.toBinary(Combination).ToArray(); combine[0] = '0'; return(Convert.ToUInt64(combine.ToString(), 2)); }