1 // 2 // Copyright (c) 2010-2018 Antmicro 3 // 4 // This file is licensed under the MIT License. 5 // Full license text is available in 'licenses/MIT.txt'. 6 // 7 using System; 8 using Antmicro.Renode.Core; 9 using Antmicro.Renode.Core.Structure; 10 using Antmicro.Renode.Peripherals; 11 using Antmicro.Renode.Peripherals.Bus; 12 using Antmicro.Renode.Peripherals.CPU; 13 14 namespace Antmicro.Renode.UnitTests.Mocks 15 { 16 public class NullRegister : IPeripheralRegister<ICPU, NullRegistrationPoint>, IDoubleWordPeripheral 17 { NullRegister(IMachine machine)18 public NullRegister(IMachine machine) 19 { 20 this.machine = machine; 21 } 22 Register(ICPU peripheral, NullRegistrationPoint registrationPoint)23 public void Register(ICPU peripheral, NullRegistrationPoint registrationPoint) 24 { 25 machine.RegisterAsAChildOf(this, peripheral, registrationPoint); 26 } 27 Unregister(ICPU peripheral)28 public void Unregister(ICPU peripheral) 29 { 30 machine.UnregisterAsAChildOf(this, peripheral); 31 } 32 Reset()33 public void Reset() 34 { 35 36 } 37 ReadDoubleWord(long offset)38 public uint ReadDoubleWord(long offset) 39 { 40 return 0; 41 } 42 WriteDoubleWord(long offset, uint value)43 public void WriteDoubleWord(long offset, uint value) 44 { 45 46 } 47 48 private readonly IMachine machine; 49 } 50 } 51