仿真平台内核初版 -tlib库 包含<sparc arm riscv powerPC>
This commit is contained in:
31
scripts/single-node/bus-isolation/SampleStateAwareReader.cs
Normal file
31
scripts/single-node/bus-isolation/SampleStateAwareReader.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// Copyright (c) 2010-2024 Antmicro
|
||||
//
|
||||
// This file is licensed under the MIT License.
|
||||
// Full license text is available in 'licenses/MIT.txt'.
|
||||
//
|
||||
|
||||
using Antmicro.Renode.Core;
|
||||
using Antmicro.Renode.Peripherals.Bus;
|
||||
|
||||
namespace Antmicro.Renode.Peripherals.CPU
|
||||
{
|
||||
public class SampleStateAwareReader : IBusPeripheral
|
||||
{
|
||||
public SampleStateAwareReader(Machine machine)
|
||||
{
|
||||
sysbus = machine.GetSystemBus(this);
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
}
|
||||
|
||||
public uint Read(ulong address, ulong state)
|
||||
{
|
||||
return sysbus.ReadDoubleWord(address, context: this, cpuState: state);
|
||||
}
|
||||
|
||||
private IBusController sysbus;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user