1 //
2 // Copyright (c) 2010-2024 Antmicro
3 // Copyright (c) 2011-2015 Realtime Embedded
4 //
5 // This file is licensed under the MIT License.
6 // Full license text is available in 'licenses/MIT.txt'.
7 //
8 using System;
9 using Antmicro.Migrant;
10 using Antmicro.Renode.Core;
11 using Antmicro.Renode.Peripherals.CPU;
12 using Antmicro.Renode.Peripherals.Bus;
13 using Antmicro.Renode.Time;
14 
15 namespace Antmicro.Renode.UnitTests.Mocks
16 {
17     public class EmptyCPU : BaseCPU
18     {
EmptyCPU(IMachine machine, string model = R)19         public EmptyCPU(IMachine machine, string model = "emptyCPU") : base(0, model, machine, ELFSharp.ELF.Endianess.LittleEndian)
20         {
21         }
22 
Load(PrimitiveReader reader)23         public virtual void Load(PrimitiveReader reader)
24         {
25         }
26 
Save(PrimitiveWriter writer)27         public virtual void Save(PrimitiveWriter writer)
28         {
29         }
30 
ExecuteInstructions(ulong numberOfInstructionsToExecute, out ulong numberOfExecutedInstructions)31         public override ExecutionResult ExecuteInstructions(ulong numberOfInstructionsToExecute, out ulong numberOfExecutedInstructions)
32         {
33             numberOfExecutedInstructions = 0;
34             return ExecutionResult.Interrupted;
35         }
36 
37         public override string Architecture => "empty";
38 
39         public override ulong ExecutedInstructions => 0;
40 
41         public override RegisterValue PC
42         {
43             get
44             {
45                 return 0;
46             }
47             set
48             {
49             }
50         }
51     }
52 }
53 
54