protected override void InitDetails(ulong programCounter) { Logger.Info("Init hart"); // Set the initial program counter initialPc = programCounter; // Set the CPU, register, memory and Return Address Stack (ras) and hint cpu = new Cpu64(); register = new Register64(); csrRegister = Factory.CreateCsrRegister(); memory = Factory.CreateDynamicMemory(Architecture.Rv64I); environment = HartEnvironmentFactory.Build(Architecture.Rv64I, register, memory, csrRegister); composer = new RvcComposer64(); ras = new Stack <ulong>(); if (configuration.RvMode) { register.WriteUnsignedInt(2, 0x10000); } register.WriteUnsignedLong(3, programCounter); }
public Cpu64() { opCodeRegistry = new OpCodeRegistry(); composer = new RvcComposer64(); }