Home
last modified time | relevance | path

Searched refs:width (Results 1 – 25 of 75) sorted by relevance

123

/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Utilities/Crypto/
DPRESENTCipher.cs17 …static public ulong Scramble(ulong data, ulong key, int width = OriginalDataWidth, uint rounds = O… in Scramble() argument
19 if(width < 0 || width > 64) in Scramble()
23 if(data > (ulong.MaxValue >> (64 - width))) in Scramble()
32 state = Substitute(state, width, coefficientsForward); in Scramble()
33 state = Permutate(state, width); in Scramble()
39 …static public ulong Descramble(ulong data, ulong key, int width = OriginalDataWidth, uint rounds =… in Descramble() argument
41 if(width < 0 || width > 64) in Descramble()
45 if(data > (ulong.MaxValue >> (64 - width))) in Descramble()
54 state = ReversePermutate(state, width); in Descramble()
55 state = Substitute(state, width, coefficientsReverse); in Descramble()
[all …]
DPRINCECipher.cs16 …static public ulong Scramble(ulong data, ulong k1, ulong k0, int width = OriginalDataWidth, uint r… in Scramble() argument
22 if(width < 0 || width > 64) in Scramble()
26 if(data > (ulong.MaxValue >> (64 - width))) in Scramble()
59 static private ulong Substitute(ulong data, int width, ulong[] coefficients) in Substitute() argument
61 var mask = ulong.MaxValue >> (64 - width); in Substitute()
62 var substitutionMask = ulong.MaxValue >> (64 - (width & ~0x3)); in Substitute()
65 for(int i = 0; i < width / 4; ++i) in Substitute()
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Utilities/
DBitHelper.cs42 public static ulong Bits(int position, int width) in Bits() argument
45 var pow2 = width < 64 ? (1UL << width) : 0; in Bits()
61 public static uint SetBitsFrom(uint source, uint newValue, int position, int width) in SetBitsFrom() argument
63 var mask = ((1u << width) - 1) << position; in SetBitsFrom()
68 public static ulong SetBitsFrom(ulong source, ulong newValue, int position, int width) in SetBitsFrom() argument
70 var mask = ((1UL << width) - 1) << position; in SetBitsFrom()
95 public static void ClearBits(ref uint reg, int position, int width) in ClearBits() argument
98 for(var i = 0; i < width; i++) in ClearBits()
105 public static void ClearBits(ref ulong reg, int position, int width) in ClearBits() argument
108 for(var i = 0; i < width; i++) in ClearBits()
[all …]
DBitBangHelper.cs14 …public BitBangHelper(int width, bool outputMsbFirst = false, IEmulationElement loggingParent = nul… in BitBangHelper() argument
16 outputDecoder = new Decoder(width, outputMsbFirst, loggingParent); in BitBangHelper()
17 inputEncoder = new Encoder(width, loggingParent); in BitBangHelper()
81 public Encoder(int width, IEmulationElement loggingParent = null) in Encoder() argument
84 buffer = new bool[width]; in Encoder()
130 public Decoder(int width, bool msbFirst = false, IEmulationElement loggingParent = null) in Decoder() argument
134 buffer = new bool[width]; in Decoder()
DCRCEngine.cs153 public CRCConfig(uint polynomial, int width, bool reflectInput, bool reflectOutput, in CRCConfig()
155 … : this(new CRCPolynomial(polynomial, width), reflectInput, reflectOutput, init, xorOutput) in CRCConfig()
186 public CRCPolynomial(uint polynomial, int width) in CRCPolynomial()
188 if(width < 1 || width > 32) in CRCPolynomial()
192 if(BitHelper.GetMostSignificantSetBitIndex(polynomial) + 1 > width) in CRCPolynomial()
198 Width = width; in CRCPolynomial()
DTable.cs43 var width = content.Max(x => x.Length); in ToArray()
45 var result = new string[height, width]; in ToArray()
48 for(var j = 0; j < width; j++) in ToArray()
DRawImageData.cs17 public RawImageData(byte[] bytes, int width, int height) in RawImageData()
19 if(bytes.Length != width * height * PixelFormat.GetColorDepth()) in RawImageData()
24 Width = width; in RawImageData()
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Core/Structure/Registers/
DPeripheralRegister.cs483 public void Reserved(int position, int width, ulong? allowedValue = null) in Reserved() argument
485 Tag("RESERVED", position, width, allowedValue); in Reserved()
495 public void Tag(string name, int position, int width, ulong? allowedValue = null) in Tag() argument
497 ThrowIfRangeIllegal(position, width, name); in Tag()
501 ThrowIfAllowedValueDoesNotFitInWidth(width, allowedValue.Value, name); in Tag()
508 Width = width, in Tag()
559 …public IValueRegisterField DefineValueField(int position, int width, FieldMode mode = FieldMode.Re… in DefineValueField() argument
563 ThrowIfRangeIllegal(position, width, name); in DefineValueField()
564 ThrowIfZeroWidth(position, width, name); in DefineValueField()
565 …var field = new ValueRegisterField(this, position, width, mode, readCallback, writeCallback, chang… in DefineValueField()
[all …]
DRegisterField.cs38 …public ValueRegisterField(PeripheralRegister parent, int position, int width, FieldMode fieldMode,… in ValueRegisterField() argument
40 …: base(parent, position, width, fieldMode, readCallback, writeCallback, changeCallback, valueProvi… in ValueRegisterField()
57 …public EnumRegisterField(PeripheralRegister parent, int position, int width, FieldMode fieldMode, … in EnumRegisterField() argument
59 …: base(parent, position, width, fieldMode, readCallback, writeCallback, changeCallback, valueProvi… in EnumRegisterField()
104 if((binary >> width) > 0 && width < 64)
112 public int Width => width;
164 …protected RegisterField(PeripheralRegister parent, int position, int width, FieldMode fieldMode, A… in RegisterField() argument
165 …ck, Func<T, T> valueProviderCallback, string name) : base(parent, position, width, fieldMode, name) in RegisterField()
194 public readonly int width; field in Antmicro.Renode.Core.Structure.Registers.PeripheralRegister.RegisterField
198 …protected RegisterField(PeripheralRegister parent, int position, int width, FieldMode fieldMode, s… in RegisterField() argument
[all …]
DPeripheralRegisterExtensions.cs94 …public static T WithValueField<T>(this T register, int position, int width, FieldMode mode = Field…
98 …register.DefineValueField(position, width, mode, readCallback, writeCallback, changeCallback, valu…
120 …public static T WithValueFields<T>(this T register, int position, int width, int count, FieldMode …
124 …return WithValueFields(register, position, width, count, out var _, mode, readCallback, writeCallb…
131 …public static R WithEnumField<R, T>(this R register, int position, int width, FieldMode mode = Fie…
136 …register.DefineEnumField<T>(position, width, mode, readCallback, writeCallback, changeCallback, va… in register.DefineEnumField()
144 …public static T WithTag<T>(this T register, string name, int position, int width) where T : Periph…
146 register.Tag(name, position, width);
154 …public static T WithTags<T>(this T register, string name, int position, int width, int count) wher…
158 register.Tag(name == null ? null : $"{name}_{i}", position + (i * width), width);
[all …]
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Peripherals/Bus/
DBusHookHandler.cs16 public BusHookHandler(BusHookDelegate action, SysbusAccessWidth width) in BusHookHandler() argument
19 this.width = width; in BusHookHandler()
25 if((currentWidth & width) != 0) in Invoke()
39 private readonly SysbusAccessWidth width; field in Antmicro.Renode.Peripherals.Bus.BusHookHandler
DSVDParser.cs84 public bool TryReadAccess(ulong offset, out ulong value, SysbusAccessWidth width) in TryReadAccess() argument
86 var bytesToRead = CheckAndGetWidth(width); in TryReadAccess()
96 … LogReadSuccess(value, tmpRegister.Peripheral.Name, tmpRegister.Name, offset, width); in TryReadAccess()
100 LogReadFail(tmpRegister.Peripheral.Name, tmpRegister.Name, offset, width); in TryReadAccess()
105 value = AssembleValueFromRegisters(offset, width, ref weHaveIt); in TryReadAccess()
110 public bool TryWriteAccess(ulong offset, ulong value, SysbusAccessWidth width) in TryWriteAccess() argument
112 int bytesToWrite = CheckAndGetWidth(width); in TryWriteAccess()
119 …riteSuccess(value, tmpRegister.Peripheral.Name, tmpRegister.Name, offset, width, tmpRegister.HasWr… in TryWriteAccess()
123 … LogWriteFail(value, tmpRegister.Peripheral.Name, tmpRegister.Name, offset, width); in TryWriteAccess()
128 LogWriteRequests(value, offset, width, ref weHaveIt); in TryWriteAccess()
[all …]
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Extensions/Utilities/GDB/Commands/
DWriteRegisterCommand.cs35 var width = reg.Width / 8; in Execute()
36 if(value.Length > width) in Execute()
39 var excess = value.Skip(isLittleEndian ? width : 0).Take(value.Length - width); in Execute()
40 value = value.Skip(isLittleEndian ? 0 : value.Length - width).Take(width).ToArray(); in Execute()
DBreakpointCommand.cs118 …id AccessWatchpointHook(ICpuSupportingGdb cpu, ulong address, SysbusAccessWidth width, ulong value) in AccessWatchpointHook() argument
126 …oid WriteWatchpointHook(ICpuSupportingGdb cpu, ulong address, SysbusAccessWidth width, ulong value) in WriteWatchpointHook() argument
131 …void ReadWatchpointHook(ICpuSupportingGdb cpu, ulong address, SysbusAccessWidth width, ulong value) in ReadWatchpointHook() argument
180 foreach(SysbusAccessWidth width in Enum.GetValues(typeof(SysbusAccessWidth))) in CalculateAllCoveringAddressess()
182 … for(var offset = -(long)(address % (ulong)width); offset < kind; offset += (long)width) in CalculateAllCoveringAddressess()
184 … yield return new WatchpointDescriptor(address - (ulong)(-offset), width, access, hook); in CalculateAllCoveringAddressess()
193 …public WatchpointDescriptor(ulong address, SysbusAccessWidth width, Access access, BusHookDelegate… in WatchpointDescriptor() argument
196 Width = width; in WatchpointDescriptor()
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Extensions/HostInterfaces/Camera/
DHostCamera.cs98 public void SetImageSize(int width, int height) in SetImageSize() argument
100 var result = VideoCapturer.SetImageSize(width, height); in SetImageSize()
106 if(result.Item1 != width || result.Item2 != height) in SetImageSize()
110 cropToSize = Tuple.Create(width, height); in SetImageSize()
177 …private static byte[] CompressRawToJpeg(byte[] input, int width, int height, int scale, int qualit… in CompressRawToJpeg() argument
189 if(crop != null && width > crop.Item1) in CompressRawToJpeg()
191 widthToSkip = (width - crop.Item1); in CompressRawToJpeg()
205 cinfo.Image_width = (width - widthToSkip) / scale; in CompressRawToJpeg()
222 int inputOffset = heightToSkipTop * width; in CompressRawToJpeg()
242 inputOffset += 3 * (scale - 1) * width; in CompressRawToJpeg()
[all …]
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Cores/Arm/
DArmSignalsUnit.cs268 signals.InitSignal(this, "DBGROMADDR", ArmSignals.DebugROMAddress, width: 20); in InitSignals()
269 signals.InitSignal(this, "DBGROMADDRV", ArmSignals.DebugROMAddressValid, width: 1); in InitSignals()
270 signals.InitSignal(this, "DBGSELFADDR", ArmSignals.DebugSelfAddress, width: 15); in InitSignals()
271 signals.InitSignal(this, "DBGSELFADDRV", ArmSignals.DebugSelfAddressValid, width: 1); in InitSignals()
285 signals.InitSignal(this, "PPHBASE", ArmSignals.AHBBaseAddress, width: 20); in InitSignals()
286 signals.InitSignal(this, "PPXBASE", ArmSignals.AXIBaseAddress, width: 20); in InitSignals()
287 signals.InitSignal(this, "PPVBASE", ArmSignals.VirtualAXIBaseAddress, width: 20); in InitSignals()
289 signals.InitSignal(this, "PPHSIZE", ArmSignals.AHBSize, width: 5); in InitSignals()
290 signals.InitSignal(this, "PPXSIZE", ArmSignals.AXISize, width: 5); in InitSignals()
291 signals.InitSignal(this, "PPVSIZE", ArmSignals.VirtualAXISize, width: 5); in InitSignals()
[all …]
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Cores/Common/
DRegisterTemplate.tt129 foreach(var width in widths)
132 case <#=width#>:
133 … SetRegisterValue<#=width#>(r.Index, checked((<#=RegisterTypeHelper.GetTypeName(width)#>)value));
139 throw new ArgumentException($"Unsupported register width: {r.Width}");
176 foreach(var width in widths)
179 case <#=width#>:
180 return GetRegisterValue<#=width#>(r.Index);
185 throw new ArgumentException($"Unsupported register width: {r.Width}");
295 …foreach(var width in parser.RegisterGroups.Select(x => x.Width).Union(parser.Registers.Select(x =>…
301 [Import(Name = "<#=ACCESSOR_PREFIX#>set_register_value_<#=width#>")]
[all …]
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Testing/
DFrameBufferTester.cs121 …ferTester WaitForFrameROI(string fileName, uint startX, uint startY, uint width, uint height, floa… in WaitForFrameROI() argument
125 …return WaitForFrameROI(bytes, startX, startY, width, height, timeout.HasValue ? TimeSpan.FromSecon… in WaitForFrameROI()
128 …public FrameBufferTester WaitForFrameROI(byte[] frame, uint startX, uint startY, uint width, uint … in WaitForFrameROI() argument
130 …if(width > frameWidth || startX > frameWidth - width || height > frameHeight || startY > frameHeig… in WaitForFrameROI()
135 if(height == 0 || width == 0) in WaitForFrameROI()
158 for(uint j = startX; roiEqual && j < startX + width; j++) in WaitForFrameROI()
182 …private void HandleConfigurationChange(int width, int height, Backends.Display.PixelFormat format,… in HandleConfigurationChange() argument
184 if(width == 0 || height == 0) in HandleConfigurationChange()
192 frameWidth = width; in HandleConfigurationChange()
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/SPI/
DIMXRT_FlexSPI.cs106 private uint ReadFromCiphertext(long offset, int width) in ReadFromCiphertext() argument
108 DebugHelper.Assert(width > 0 && width <= 4); in ReadFromCiphertext()
113 dataSize.Value = (uint)width; in ReadFromCiphertext()
120 var result = rxQueue.Read(0, width); in ReadFromCiphertext()
122 …Debug, "Read {0}-byte{1} from ciphertext at offset 0x{2:X}: 0x{3:X}", width, width == 1 ? string.E… in ReadFromCiphertext()
127 private void WriteToCiphertext(long offset, uint value, int width) in WriteToCiphertext() argument
129 DebugHelper.Assert(width > 0 && width <= 4); in WriteToCiphertext()
130 …ebug, "Writing {0}-byte{1} to ciphertext at offset 0x{2:X}: 0x{3:X}", width, width == 1 ? string.E… in WriteToCiphertext()
135 dataSize.Value = (uint)width; in WriteToCiphertext()
136 var count = txQueue.Fill(BitConverter.GetBytes(value).Take(width), reset: true); in WriteToCiphertext()
[all …]
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Utilities/Packets/
DPacket.cs160 var width = field.Width; in TryDecode()
161 if(offset + width > data.Count) in TryDecode()
165 if(width == 0) in TryDecode()
170 var v = new byte[width]; in TryDecode()
171 for(var i = 0; i < width; i++) in TryDecode()
177 offset += width; in TryDecode()
321 var width = field.Width; in EncodeInner()
322 if(width == 0) in EncodeInner()
332 val = new byte[width]; in EncodeInner()
335 if(width != val.Length) in EncodeInner()
[all …]
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/Timers/
DEFR32_Timer.cs18 public EFR32_Timer(IMachine machine, long frequency, TimerWidth width) : base(machine) in EFR32_Timer() argument
21 this.width = width; in EFR32_Timer()
24 …tTimer(machine.ClockSource, frequency, this, "timer", limit: (1UL << (int)width) - 1, direction: D… in EFR32_Timer()
107 ….WithValueField(0, (int)width, writeCallback: (_, value) => innerTimer.Limit = value, valueProvide… in DefineRegisters()
111 ….WithValueField(0, (int)width, writeCallback: (_, value) => innerTimer.Value = value, valueProvide… in DefineRegisters()
141 private TimerWidth width; field in Antmicro.Renode.Peripherals.Timers.EFR32_Timer
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Extensions/UserInterface/Commands/
DDisplayImageCommand.cs44 var width = (int)widthToken.Value; in Run()
46 if(width <= 0 || height <= 0) in Run()
51 var bytes = new byte[width * height * RawImageData.PixelFormat.GetColorDepth()]; in Run()
56 var image = new RawImageData(bytes, width, height); in Run()
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Peripherals/CPU/
DCPURegister.cs18 … public CPURegister(int index, int width, bool isGeneral, bool isReadonly, string[] aliases = null) in CPURegister()
20 if(width % 8 != 0) in CPURegister()
27 Width = width; in CPURegister()
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Peripherals/Video/
DAutoRepaintingVideo.cs95 …protected void Reconfigure(int? width = null, int? height = null, PixelFormat? format = null, bool… in Reconfigure() argument
100 if(width != null && Width != width.Value) in Reconfigure()
102 Width = width.Value; in Reconfigure()
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Cores/RiscV/
DCV32E40P.cs132 … private void LoadRegisterImmediate(ulong opcode, Width width, BitExtension extension, string log) in LoadRegisterImmediate() argument
142 SetRegister(rD, GetMemValue(width, extension, (ulong)rs1Value)); in LoadRegisterImmediate()
146 …private void LoadRegisterRegister(ulong opcode, Width width, BitExtension extension, string log, b… in LoadRegisterRegister() argument
159 … SetRegister(rD, GetMemValue(width, extension, postIncrement ? rs1Value : rs1Value + rs2Value)); in LoadRegisterRegister()
166 private void StoreRegisterImmediate(ulong opcode, Width width, string log) in StoreRegisterImmediate() argument
176 SetMemValue(width, rs2Value, (ulong)rs1Value); in StoreRegisterImmediate()
180 …private void StoreRegisterRegister(ulong opcode, Width width, string log, bool postIncrement = fal… in StoreRegisterRegister() argument
194 SetMemValue(width, rs2Value, postIncrement ? rs1Value : rs1Value + rs3Value); in StoreRegisterRegister()
233 …ateBitsInRegister(ulong opcode, Source source, Operation operation, Width width, Sign sign, string… in ManipulateBitsInRegister() argument
272 result = ExtractBits(width, sign, is2, is3, rs1Value); in ManipulateBitsInRegister()
[all …]

123