1 //
2 // Copyright (c) 2010-2024 Antmicro
3 //
4 // This file is licensed under the MIT License.
5 // Full license text is available in 'licenses/MIT.txt'.
6 //
7 
8 using Antmicro.Renode.Core;
9 using Antmicro.Renode.Peripherals.Bus;
10 
11 namespace Antmicro.Renode.Peripherals.CPU
12 {
13     public class SampleStateAwareReader : IBusPeripheral
14     {
SampleStateAwareReader(Machine machine)15         public SampleStateAwareReader(Machine machine)
16         {
17             sysbus = machine.GetSystemBus(this);
18         }
19 
Reset()20         public void Reset()
21         {
22         }
23 
Read(ulong address, ulong state)24         public uint Read(ulong address, ulong state)
25         {
26             return sysbus.ReadDoubleWord(address, context: this, cpuState: state);
27         }
28 
29         private IBusController sysbus;
30     }
31 }
32