| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/Timers/ |
| D | AmbiqApollo4_RTC.cs | 148 …eField(0, 8, name: "ALM100", writeCallback: (_, newValue) => alarmSecondHundredths.BCDSet((byte)ne… in DefineRegisters() 149 …hValueField(8, 7, name: "ALMSEC", writeCallback: (_, newValue) => alarmSeconds.BCDSet((byte)newVal… in DefineRegisters() 151 …ValueField(16, 7, name: "ALMMIN", writeCallback: (_, newValue) => alarmMinutes.BCDSet((byte)newVal… in DefineRegisters() 153 …thValueField(24, 6, name: "ALMHR", writeCallback: (_, newValue) => alarmHours.BCDSet((byte)newValu… in DefineRegisters() 159 …thValueField(0, 6, name: "ALMDATE", writeCallback: (_, newValue) => alarmDay.BCDSet((byte)newValue… in DefineRegisters() 161 …ithValueField(8, 5, name: "ALMMO", writeCallback: (_, newValue) => alarmMonth.BCDSet((byte)newValu… in DefineRegisters() 163 …alueField(16, 3, name: "ALMWKDY", writeCallback: (_, newValue) => alarmWeekday.BCDSet((byte)newVal… in DefineRegisters() 171 ….WithFlag(4, name: "RSTOP", writeCallback: (_, newValue) => { internalTimer.Enabled = !newValue; }… in DefineRegisters() 176 …alueField(0, 8, name: "CTR100", writeCallback: (_, newValue) => secondHundredths.BCDSet((byte)newV… in DefineRegisters() 177 …ithValueField(8, 7, name: "CTRSEC", writeCallback: (_, newValue) => seconds.BCDSet((byte)newValue)… in DefineRegisters() [all …]
|
| D | TexasInstrumentsTimer.cs | 33 …ld<OperationMode>(6, 2, changeCallback: (oldValue, newValue) => OnEnableModeChanged(oldValue, newV… in TexasInstrumentsTimer() 34 …d<OperationMode>(22, 2, changeCallback: (oldValue, newValue) => OnEnableModeChanged(oldValue, newV… in TexasInstrumentsTimer() 38 timerGlobalControlRegister.DefineFlagField(0, changeCallback: (oldValue, newValue) => in TexasInstrumentsTimer() 40 if(!newValue) in TexasInstrumentsTimer() 45 timerGlobalControlRegister.DefineFlagField(1, changeCallback: (oldValue, newValue) => in TexasInstrumentsTimer() 47 if(!newValue) in TexasInstrumentsTimer() 55 …ter.DefineValueField(8, 4, changeCallback: (oldValue, newValue) => timer34.Divider = (int)newValue… in TexasInstrumentsTimer() 210 … private void OnEnableModeChanged(OperationMode oldValue, OperationMode newValue, LimitTimer timer) in OnEnableModeChanged() argument 212 switch(newValue) in OnEnableModeChanged() 231 private void OnTimerModeChanged(TimerMode oldValue, TimerMode newValue) in OnTimerModeChanged() argument [all …]
|
| D | SunxiTimer.cs | 172 …gister.DefineFlagField(0, changeCallback: (oldValue, newValue) => lowOscillatorFrequency = newValu… in SetupRegisters() 218 …controlRegister.DefineFlagField(7, changeCallback: (oldValue, newValue) => Mode = newValue ? WorkM… in SunxiTimerUnit() 219 …ister.DefineValueField(4, 3, changeCallback: (oldValue, newValue) => Divider = 1 << (int)newValue); in SunxiTimerUnit() 220 …DefineFlagField(1, FieldMode.WriteOneToClear, writeCallback: (oldValue, newValue) => Value = Limit… in SunxiTimerUnit() 221 … controlRegister.DefineFlagField(0, changeCallback: (oldValue, newValue) => Enabled = newValue); in SunxiTimerUnit() 244 private void OnClockSourceChange(ClockSource oldValue, ClockSource newValue) in OnClockSourceChange() argument 246 switch(newValue) in OnClockSourceChange()
|
| D | SunxiHighSpeedTimer.cs | 271 private void OnModeChange(bool oldValue, bool newValue) in OnModeChange() argument 273 Mode = newValue ? WorkMode.OneShot : WorkMode.Periodic; in OnModeChange() 276 private void OnPrescalerChange(ulong oldValue, ulong newValue) in OnPrescalerChange() argument 278 if(newValue < 4) in OnPrescalerChange() 280 Divider = 1 << (int)newValue; in OnPrescalerChange() 284 this.Log(LogLevel.Warning, "Invalid prescaler value: {0}.", newValue); in OnPrescalerChange() 288 private void OnReload(bool oldValue, bool newValue) in OnReload() argument 290 if(newValue) in OnReload() 296 private void OnEnableChange(bool oldValue, bool newValue) in OnEnableChange() argument 298 Enabled = newValue; in OnEnableChange()
|
| D | AmbiqApollo4_SystemTimer.cs | 119 writeCallback: (_, newValue) => in DefineRegisters() 125 if((compareRegisters[registerIndex].CompareValue - (uint)newValue) > 3) in DefineRegisters() 129 compareRegisters[registerIndex].CompareValue = Value + (uint)newValue; in DefineRegisters() 137 …PARExEN", changeCallback: (registerIndex, _, newValue) => compareRegisters[registerIndex].Enabled … in DefineRegisters() 145 …writeCallback: (registerIndex, _, newValue) => { if(newValue) compareRegisters[registerIndex].Inte… in DefineRegisters() 149 …writeCallback: (registerIndex, _, newValue) => { if(newValue) captureRegisters[registerIndex].Inte… in DefineRegisters() 155 …changeCallback: (registerIndex, _, newValue) => compareRegisters[registerIndex].InterruptEnable = … in DefineRegisters() 160 …changeCallback: (registerIdx, _, newValue) => captureRegisters[registerIdx].InterruptEnable = newV… in DefineRegisters() 167 …writeCallback: (registerIndex, _, newValue) => { if(newValue) compareRegisters[registerIndex].Inte… in DefineRegisters() 171 …writeCallback: (registerIndex, _, newValue) => { if(newValue) captureRegisters[registerIndex].Inte… in DefineRegisters()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/I2C/ |
| D | STM32F4_I2C.cs | 144 private void InterruptEnableChange(bool oldValue, bool newValue) in InterruptEnableChange() argument 174 private void DataWrite(uint oldValue, uint newValue) in DataWrite() argument 184 willReadOnSelectedSlave = (newValue & 1) == 1; //LSB is 1 for read and 0 for write in DataWrite() 185 var address = (int)(newValue >> 1); in DataWrite() 215 dataToTransfer.Add((byte)newValue); in DataWrite() 225 …is.Log(LogLevel.Warning, "Writing {0} to DataRegister in unsupported state {1}.", newValue, state); in DataWrite() 230 private void SoftwareResetWrite(bool oldValue, bool newValue) in SoftwareResetWrite() argument 232 if(newValue) in SoftwareResetWrite() 238 private void StopWrite(bool oldValue, bool newValue) in StopWrite() argument 240 this.NoisyLog("Setting STOP bit to {0}", newValue); in StopWrite() [all …]
|
| D | STM32F7_I2C.cs | 304 private void PeripheralEnabledWrite(bool oldValue, bool newValue) in PeripheralEnabledWrite() argument 306 if(newValue) in PeripheralEnabledWrite() 386 private void HandleTransmitDataWrite(uint oldValue, uint newValue) in HandleTransmitDataWrite() argument 390 MasterTransmitDataWrite(oldValue, newValue); in HandleTransmitDataWrite() 394 SlaveTransmitDataWrite(oldValue, newValue); in HandleTransmitDataWrite() 398 private void MasterTransmitDataWrite(uint oldValue, uint newValue) in MasterTransmitDataWrite() argument 402 …rning, "Trying to send byte {0} to an unknown slave with address {1}.", newValue, currentSlaveAddr… in MasterTransmitDataWrite() 405 txData.Enqueue((byte)newValue); in MasterTransmitDataWrite() 414 private void SlaveTransmitDataWrite(uint oldValue, uint newValue) in SlaveTransmitDataWrite() argument 416 txData.Enqueue((byte)newValue); in SlaveTransmitDataWrite()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Core/Structure/Registers/ |
| D | PeripheralRegister.cs | 106 protected override void CallChangeHandlers(ulong oldValue, ulong newValue) in CallChangeHandlers() argument 108 CallHandlers(changeCallbacks, oldValue, newValue); in CallChangeHandlers() 111 protected override void CallReadHandlers(ulong oldValue, ulong newValue) in CallReadHandlers() argument 113 CallHandlers(readCallbacks, oldValue, newValue); in CallReadHandlers() 116 protected override void CallWriteHandlers(ulong oldValue, ulong newValue) in CallWriteHandlers() argument 118 CallHandlers(writeCallbacks, oldValue, newValue); in CallWriteHandlers() 215 protected override void CallChangeHandlers(ulong oldValue, ulong newValue) in CallChangeHandlers() argument 217 CallHandlers(changeCallbacks, (uint)oldValue, (uint)newValue); in CallChangeHandlers() 220 protected override void CallReadHandlers(ulong oldValue, ulong newValue) in CallReadHandlers() argument 222 CallHandlers(readCallbacks, (uint)oldValue, (uint)newValue); in CallReadHandlers() [all …]
|
| D | RegisterField.cs | 119 public override void CallReadHandler(ulong oldValue, ulong newValue) in CallReadHandler() argument 124 var newValueFiltered = FilterValue(newValue); in CallReadHandler() 129 public override void CallWriteHandler(ulong oldValue, ulong newValue) in CallWriteHandler() argument 134 var newValueFiltered = FilterValue(newValue); in CallWriteHandler() 139 public override void CallChangeHandler(ulong oldValue, ulong newValue) in CallChangeHandler() argument 144 var newValueFiltered = FilterValue(newValue); in CallChangeHandler() 185 public abstract void CallReadHandler(ulong oldValue, ulong newValue); in CallReadHandler() argument 187 public abstract void CallWriteHandler(ulong oldValue, ulong newValue); in CallWriteHandler() argument 189 public abstract void CallChangeHandler(ulong oldValue, ulong newValue); in CallChangeHandler() argument
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Utilities/ |
| D | BitHelper.cs | 61 public static uint SetBitsFrom(uint source, uint newValue, int position, int width) in SetBitsFrom() argument 64 var bitsToSet = newValue & mask; in SetBitsFrom() 68 public static ulong SetBitsFrom(ulong source, ulong newValue, int position, int width) in SetBitsFrom() argument 71 var bitsToSet = newValue & mask; in SetBitsFrom() 236 public static void UpdateWithShifted(ref uint reg, uint newValue, int position, int width) in UpdateWithShifted() argument 238 UpdateWith(ref reg, newValue << position, position, width); in UpdateWithShifted() 241 public static void UpdateWithShifted(ref ulong reg, ulong newValue, int position, int width) in UpdateWithShifted() argument 243 UpdateWith(ref reg, newValue << position, position, width); in UpdateWithShifted() 246 public static void UpdateWithMasked(ref uint reg, uint newValue, uint mask) in UpdateWithMasked() argument 248 reg = (reg & ~mask) | (newValue & mask); in UpdateWithMasked() [all …]
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/GPIOPort/ |
| D | EFR32_GPIOPort.cs | 158 …WithValueField(0, 32, changeCallback: (oldValue, newValue) => ReroutePort((uint)oldValue, (uint)ne… in CreateRegisters() 161 …WithValueField(0, 32, changeCallback: (oldValue, newValue) => ReroutePort((uint)oldValue, (uint)ne… in CreateRegisters() 164 …WithValueField(0, 32, changeCallback: (oldValue, newValue) => ReroutePin((uint)oldValue, (uint)new… in CreateRegisters() 167 …WithValueField(0, 32, changeCallback: (oldValue, newValue) => ReroutePin((uint)oldValue, (uint)new… in CreateRegisters() 248 writeCallback: (_, newValue) => in CreatePortRegisters() 250 var bits = BitHelper.GetBits((uint)newValue); in CreatePortRegisters() 264 writeCallback: (_, newValue) => in CreatePortRegisters() 266 var bits = BitHelper.GetSetBits(newValue); in CreatePortRegisters() 314 private void ReroutePort(uint oldValue, uint newValue, bool isHighRegister) in ReroutePort() argument 320 var portNewValue = (int)(newValue & (0xF << (i * 4))) >> (i * 4); in ReroutePort() [all …]
|
| D | Emios.cs | 33 (oldValue, newValue) => in Emios() 37 Connections[j].Set(newValue); in Emios() 45 writeCallback: (oldValue, newValue) => in Emios() 47 if(newValue) in Emios()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Cores/Arm/ |
| D | ArmPerformanceMonitoringUnit.cs | 312 ….WithFlag(16, writeCallback: (_, newValue) => ExportSupported = newValue, valueProviderCallback: _… in DefineMemoryMappedRegisters() 325 ….WithFlags(0, 8, writeCallback: (index, _, newValue) => claimBits[index].Value |= newValue, valueP… in DefineMemoryMappedRegisters() 329 .WithValueField(0, 32, FieldMode.Write, writeCallback: (_, newValue) => in DefineMemoryMappedRegisters() 331 var newSoftwareLockEnabled = newValue != SoftwareLockDisableValue; in DefineMemoryMappedRegisters() 336 …o disable Software Lock with invalid value 0x{0:X}, should be 0x{1:X}", newValue, SoftwareLockDisa… in DefineMemoryMappedRegisters() 388 writeCallback: (_, newValue) => SetCounterValue(counterIndex, (uint)newValue), in DefineEventCountRegister() 398 writeCallback: (_, newValue) => SetCounterEvent(counter, (uint)newValue), in DefineEventTypeSelectRegister() 428 …Callback: fieldMode.IsWritable() ? (_, newValue) => parentCPU.SetSystemRegisterValue(systemRegiste… in DefineRegisterAccessingSystemRegister()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Cores/RiscV/ |
| D | PicoRV32.cs | 227 var newValue = (uint)X[rs].RawValue; in HandleMaskirqInstruction() 232 disabledInterrupts = newValue; in HandleMaskirqInstruction() 244 …x{0:X} read from register X[{1}]; old value 0x{2:X} written to X[{3}]", newValue, rs, previousValu… in HandleMaskirqInstruction() 258 var newValue = X[rs]; in HandleTimerInstruction() 263 internalTimer.Value = newValue; in HandleTimerInstruction() 264 internalTimer.Enabled = (newValue != 0); in HandleTimerInstruction() 266 …x{0:X} read from register X[{1}]; old value 0x{2:X} written to X[{3}]", newValue, rs, previousValu… in HandleTimerInstruction()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/Analog/ |
| D | AmbiqApollo4_ADC.cs | 114 … moduleEnabled, name: "ADCEN", writeCallback: (oldValue, newValue) => { if(oldValue && !newValue) … in DefineRegisters() 136 .WithValueField(0, 8, FieldMode.Write, name: "SWT", writeCallback: (_, newValue) => in DefineRegisters() 139 if(newValue == SoftwareTriggerMagicValue) in DefineRegisters() 153 …8, 4, out slots[index].channelSelect, name: $"CHSEL{index}", writeCallback: (oldValue, newValue) => in DefineRegisters() 155 if((int)newValue >= ChannelsCount) in DefineRegisters() 158 index, newValue, oldValue); in DefineRegisters() 285 …writeCallback: (interrupt, _, newValue) => { if(newValue) SetInterruptStatus((Interrupts)interrupt… in DefineRegisters() 291 …writeCallback: (interrupt, _, newValue) => { if(newValue) SetInterruptStatus((Interrupts)interrupt… in DefineRegisters()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Tests/UnitTests/ |
| D | RegistersTests.cs | 335 …ster(null, 0).WithValueField(0, 64, writeCallback: (oldValue, newValue) => test = newValue).Write(… in ShouldHandle64BitWideRegistersProperly() 343 …r(null, 0).WithValueField(0, 32, writeCallback: (oldValue, newValue) => test = (uint)newValue).Wri… in ShouldHandle32BitWideRegistersProperly() 390 private void GlobalCallback(ulong oldValue, ulong newValue) in GlobalCallback() argument 394 newGlobalValue = newValue; in GlobalCallback() 397 private void EnumCallback(TwoBitEnum oldValue, TwoBitEnum newValue) in EnumCallback() argument 401 newEnumValue = newValue; in EnumCallback() 404 private void BoolCallback(bool oldValue, bool newValue) in BoolCallback() argument 408 newBoolValue = newValue; in BoolCallback() 411 private void NumberCallback(ulong oldValue, ulong newValue) in NumberCallback() argument 415 newNumberValue = newValue; in NumberCallback()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/Miscellaneous/ |
| D | NRF52840_PPI.cs | 123 …ValueField(0, 32, changeCallback: (oldValue, newValue) => UpdateEventEndpoint((uint)oldValue, (uin… in DefineRegisters() 195 private void UpdateEventEndpoint(uint oldValue, uint newValue, int eventId) in UpdateEventEndpoint() argument 212 eventEndpoint[eventId] = newValue; in UpdateEventEndpoint() 213 if(newValue != 0) in UpdateEventEndpoint() 215 var target = sysbus.WhatPeripheralIsAt(newValue); in UpdateEventEndpoint() 220 … this.Log(LogLevel.Debug, "Connected channel {1} to event 0x{0:X}", newValue, eventId); in UpdateEventEndpoint() 224 …this.Log(LogLevel.Error, "Failed to register PPI from 0x{0:X} for channel {1}", newValue, eventId); in UpdateEventEndpoint()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/SPI/ |
| D | Quark_SPI.cs | 73 .WithValueField(0, 4, changeCallback: (oldValue, newValue) => { in CreateRegisters() 74 if(newValue != 1 && newValue != 0) in CreateRegisters() 164 private void DisableSSI(bool oldValue, bool newValue) in DisableSSI() argument 166 this.Log(LogLevel.Debug, "SSI {0}.", newValue ? "enabled" : "disabled"); in DisableSSI() 169 if(!newValue && oldValue) in DisableSSI()
|
| D | STM32SPI.cs | 166 .WithFlag(6, changeCallback: (oldValue, newValue) => in SetupRegisters() 168 if(!newValue) in SetupRegisters() 233 … .WithFlag(10, FieldMode.Read | FieldMode.WriteOneToClear, writeCallback: (oldValue, newValue) => in SetupRegisters() 236 if(newValue) in SetupRegisters()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/MTD/ |
| D | CC2538FlashController.cs | 89 private void Write(uint newValue) in Write() argument 94 …og(LogLevel.Warning, "Writing 0x{0:X} to 0x{1:X} when not in write mode", newValue, targetAddress); in Write() 107 this.Log(LogLevel.Noisy, "Writing 0x{0:X} to 0x{1:X}", newValue, targetAddress); in Write() 108 flash.WriteDoubleWord(targetAddress, oldValue & newValue); in Write()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/UART/SiLabs/ |
| D | EFR32_GenericUSART.cs | 266 ….WithFlag(0, FieldMode.Set, writeCallback: (_, newValue) => { if(newValue) receiverEnableFlag.Valu… in GenerateCommandRegister() 267 ….WithFlag(1, FieldMode.Set, writeCallback: (_, newValue) => { if(newValue) receiverEnableFlag.Valu… 268 .WithFlag(2, FieldMode.Set, writeCallback: (_, newValue) => 270 if(newValue) 276 ….WithFlag(3, FieldMode.Set, writeCallback: (_, newValue) => { if(newValue) transmitterEnableFlag.V… 284 ….WithFlag(11, FieldMode.Set, writeCallback: (_, newValue) => { if(newValue) ClearBuffer(); }, name…
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/SD/ |
| D | SunxiMMC.cs | 151 …DoubleWordRegister(this).WithFlag(0, changeCallback: (oldValue, newValue) => {if(newValue) Reset()… in SetupRegisters() 152 …, 0x200).WithValueField(0, 16, changeCallback: (oldValue, newValue) => BlockSize = (int)newValue)}, in SetupRegisters() 201 private void OnStartCommand(bool oldValue, bool newValue) in OnStartCommand() argument 203 if(newValue) in OnStartCommand()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/IRQControllers/ |
| D | AINTC.cs | 254 …Registers[registerKey].DefineValueField(4 * j, 3, writeCallback: (oldValue, newValue) => Update()); in SetupRegisters() 261 …iq = interruptOperationControl.DefineFlagField(0, writeCallback: (oldValue, newValue) => Update()); in SetupRegisters() 262 …rq = interruptOperationControl.DefineFlagField(1, writeCallback: (oldValue, newValue) => Update()); in SetupRegisters() 263 interruptOperationControl.DefineFlagField(2, changeCallback: (oldValue, newValue) => { in SetupRegisters() 264 if(newValue) in SetupRegisters()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/UART/ |
| D | ESP32_UART.cs | 48 ….WithFlags(0, 20, changeCallback: (interrupt, _, newValue) => { interruptMasks[interrupt] = newVal… in ESP32_UART() 52 …ithFlags(0, 20, FieldMode.Write, writeCallback: (interrupt, _, newValue) => { if(newValue) ClearIn… in ESP32_UART()
|
| D | PL011.cs | 145 writeCallback: (_, newValue) => WriteDataRegister((uint)newValue)) in DefineRegisters() 217 ….WithFlags(0, 11, changeCallback: (interrupt, _, newValue) => { interruptMasks[interrupt] = newVal… in DefineRegisters() 245 …ithFlags(0, 11, FieldMode.Write, writeCallback: (interrupt, _, newValue) => { if(newValue) ClearIn… in DefineRegisters()
|