Home
last modified time | relevance | path

Searched refs:size (Results 1 – 25 of 100) sorted by relevance

1234

/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Storage/
DDataStorage.cs17 …public static Stream Create(string imageFile, long? size = null, bool persistent = false, byte pad… in Create() argument
20 return CreateFromFile(imageFile, size, persistent, paddingByte); in Create()
23 …public static Stream CreateFromFile(string imageFile, long? size = null, bool persistent = false, … in CreateFromFile() argument
37 … SerializableStreamView(new FileStream(imageFile, FileMode.OpenOrCreate), size, paddingByte: paddi… in CreateFromFile()
40 public static Stream Create(long size, byte paddingByte = 0) in Create() argument
43 return CreateInTemporaryFile(size, paddingByte); in Create()
46 public static Stream CreateInTemporaryFile(long size, byte paddingByte = 0) in CreateInTemporaryFile() argument
48 …ream(TemporaryFilesManager.Instance.GetTemporaryFile(), FileMode.OpenOrCreate), size, paddingByte); in CreateInTemporaryFile()
51 public static Stream CreateInMemory(int size, byte paddingByte = 0) in CreateInMemory() argument
53 var mem = new byte[size]; in CreateInMemory()
[all …]
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Core/Extensions/
DMemoryDumpExtensions.cs23 …nary(this IMemory memory, SequencedFilePath fileName, ulong offset, ulong size, ICPU context = nul… in DumpBinary() argument
25 AssertArguments(memory, offset, size); in DumpBinary()
31 var windows = (int)((size - offset + WindowSize - 1) / WindowSize - 1); in DumpBinary()
37 var lastChunkSize = (size - offset) % WindowSize; in DumpBinary()
53 …pHEX(this IMemory memory, SequencedFilePath fileName, ulong offset, ulong size, ICPU context = nul… in DumpHEX() argument
55 AssertArguments(memory, offset, size); in DumpHEX()
69 if(baseAddress + size > (1UL << 32)) in DumpHEX()
78 … var chunks = (int)((size - offset + MaxHexRecordDataLength - 1) / MaxHexRecordDataLength - 1); in DumpHEX()
84 var lastChunkSize = (size - offset) % MaxHexRecordDataLength; in DumpHEX()
96 …(FileStream writer, IMemory memory, ulong offset, int chunk, ICPU context, ulong size = WindowSize) in WriteBinaryMemoryChunk() argument
[all …]
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/SD/
DSDCardExtensions.cs17 …eripheralRegister<DeprecatedSDCard, NullRegistrationPoint> attachTo, long size, bool persistent = … in SdCardFromFile() argument
19 var card = new DeprecatedSDCard(file, size, persistent); in SdCardFromFile()
24 …g file, IPeripheralRegister<SDCard, NullRegistrationPoint> attachTo, long size, bool persistent = … in SdCardFromFile() argument
26 var card = new SDCard(file, size, persistent); in SdCardFromFile()
31 …IPeripheralRegister<ISPIPeripheral, NullRegistrationPoint> attachTo, long size, bool persistent = … in SdCardFromFile() argument
33 var card = new SDCard(file, size, persistent, spiMode: true); in SdCardFromFile()
38 …er<ISPIPeripheral, NumberRegistrationPoint<int>> attachTo, int port, long size, bool persistent = … in SdCardFromFile() argument
40 var card = new SDCard(file, size, persistent, spiMode: true); in SdCardFromFile()
45 …er<ISPIPeripheral, NumberRegistrationPoint<int>> attachTo, int port, long size, string name = null) in EmptySdCard() argument
47 var card = new SDCard(size, spiMode: true); in EmptySdCard()
DDeprecatedSDCard.cs168 public byte[] ReadData(long offset, int size) in ReadData() argument
171 this.Log(LogLevel.Info, "Reading {0} bytes from card finished.", size); in ReadData()
172 return file.ReadBytes(size); in ReadData()
175 public void WriteData(long offset, int size, byte[] data) in WriteData() argument
178 file.Write(data, 0, size); in WriteData()
179 this.Log(LogLevel.Info, "Writing {0} bytes to card finished.", (int)size); in WriteData()
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/MTD/
DAMDCFIFlash.cs62 …public void AddBackingFile(ReadFilePath path, long offset, int size, bool read = true, bool write … in AddBackingFile() argument
68 if(size + offset > Size) in AddBackingFile()
72 this.DebugLog("Loading {0} bytes at 0x{1:x} from {2}", size, offset, path); in AddBackingFile()
78 bytes = reader.ReadBytes(size); in AddBackingFile()
81 if(bytes.Length < size) in AddBackingFile()
83 …this.WarningLog("Wanted to read {0} bytes from '{1}', but got only {2}", size, path, bytes.Length); in AddBackingFile()
95 backingFiles.Add(offset, new BackingFile(size, path)); in AddBackingFile()
113 public void AddSectorSizes(long size, int repeat, int bank) in AddSectorSizes() argument
116 var entry = Enumerable.Repeat(size, repeat); in AddSectorSizes()
145 this.DebugLog("Saving {0} bytes at 0x{1:x} to {2}", file.size, offset, file.path); in Dispose()
[all …]
DCFIFlash.cs23 …public CFIFlash(string fileName, int? size = null, SysbusAccessWidth bits = SysbusAccessWidth.Doub… in CFIFlash() argument
39 Init(fileName, size, nonPersistent); in CFIFlash()
47 return size;
73 if(size % value != 0)
76 … "Erase block has to divide flash size, which is {0}B.", Misc.NormalizeBinary(size))
79 if(size / value > ushort.MaxValue + 1)
83 Misc.NormalizeBinary(size / (ushort.MaxValue + 1)),
97 eraseBlockCountMinusOne = (ushort)(size / value - 1);
265 size = (int)stream.Length; in Init()
266 CheckSize(size, requestedSize); in Init()
[all …]
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/Miscellaneous/
DOpenTitan_ScrambledMemory.cs17 public OpenTitan_ScrambledMemory(IMachine machine, long size) in OpenTitan_ScrambledMemory() argument
19 if(size % PageSize != 0) in OpenTitan_ScrambledMemory()
21 size += (PageSize - (size % PageSize)); in OpenTitan_ScrambledMemory()
25 underlyingMemory = new MappedMemory(machine, size); in OpenTitan_ScrambledMemory()
70 private void MarkWritten(long offset, int size = 1) in MarkWritten() argument
72 for(var i = 0; i < size; i++) in MarkWritten()
78 private bool CheckAccess(long offset, int size = 1) in CheckAccess() argument
DEOSS3_PacketFIFO.cs179 public PacketFifoBase(EOSS3_PacketFIFO parent, string name, int size) in PacketFifoBase() argument
183 this.size = size; in PacketFifoBase()
206 protected int size; field in Antmicro.Renode.Peripherals.Miscellaneous.EOSS3_PacketFIFO.PacketFifoBase
212 … public PacketFifo(EOSS3_PacketFIFO parent, string name, int size) : base(parent, name, size) in PacketFifo() argument
227 if(fifo.Count > size) in EnqueueCallback()
274 … public PacketFifoSwitchable(EOSS3_PacketFIFO pf, string name, int size) : base(pf, name, size) in PacketFifoSwitchable() argument
276 pf3BufferMode = new CircularBuffer<UInt16>(size); in PacketFifoSwitchable()
277 pf3QueueMode = new Queue<UInt16>(size); in PacketFifoSwitchable()
296 var size = Math.Max(pf3QueueMode.Count, 4096); in EnableRingMode()
297 pf3BufferMode = new CircularBuffer<UInt16> (size); in EnableRingMode()
[all …]
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Peripherals/Memory/
DMappedMemory.cs66 …public MappedMemory(IMachine machine, long size, int? segmentSize = null, string sharedMemoryFileR… in MappedMemory() argument
68 if(size == 0) in MappedMemory()
75 …edSegmentSize = Math.Min(MaximalSegmentSize, Math.Max(MinimalSegmentSize, size / RecommendedNumber… in MappedMemory()
81 this.size = size; in MappedMemory()
123 if(offset < 0 || offset >= size) in ReadByte()
125 …d to read byte at offset 0x{0:X} outside the range of the peripheral 0x0 - 0x{1:X}", offset, size); in ReadByte()
136 if(offset < 0 || offset >= size) in WriteByte()
138 …0x{0:X} to offset 0x{1:X} outside the range of the peripheral 0x0 - 0x{2:X}", value, offset, size); in WriteByte()
150 if(offset < 0 || offset > size - sizeof(ushort)) in ReadWord()
152 …d to read word at offset 0x{0:X} outside the range of the peripheral 0x0 - 0x{1:X}", offset, size); in ReadWord()
[all …]
DArrayMemory.cs27 public ArrayMemory(ulong size, byte initialValue = 0x00) in ArrayMemory() argument
29 if(size > MaxSize) in ArrayMemory()
33 array = new byte[size]; in ArrayMemory()
178 private bool IsCorrectOffset(long offset, int size) in IsCorrectOffset() argument
180 var result = offset >= 0 && offset <= array.Length - size; in IsCorrectOffset()
183 …(s) at offset 0x{1:X} outside the range of the peripheral 0x0 - 0x{2:X}", size, offset, array.Leng… in IsCorrectOffset()
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Core/
DRange.cs19 public Range(ulong startAddress, ulong size) in Range()
22 EndAddress = startAddress + size - 1; in Range()
337 public static Range By(this ulong startAddress, ulong size) in By() argument
339 return new Range(startAddress, size); in By()
342 public static Range By(this long startAddress, ulong size) in By() argument
344 return new Range(checked((ulong)startAddress), size); in By()
347 public static Range By(this long startAddress, long size) in By() argument
349 return new Range(checked((ulong)startAddress), checked((ulong)size)); in By()
352 public static Range By(this int startAddress, ulong size) in By() argument
354 return new Range(checked((ulong)startAddress), size); in By()
[all …]
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Utilities/
DBlobManager.cs33 var size = reader.ReadInt64(); in Load()
35 reader.ReadBytes((int)size); in Load()
36 provider.BlobIsReady(tempFile, localPosition, size); in Load()
40 var size = reader.ReadInt64(); in Load()
43 reader.CopyTo(fileStream, size); in Load()
45 provider.BlobIsReady(tempFile, 0, size); in Load()
DBitHelper.cs507 public static byte GetValue(byte reg, int offset, int size) in GetValue() argument
509 if(size < 0 || size > 8) in GetValue()
513 return (byte)(((uint)reg >> offset) & ((0x1ul << size) - 1)); in GetValue()
516 public static uint GetValue(uint reg, int offset, int size) in GetValue() argument
518 if(size < 0 || size > 32) in GetValue()
522 return (uint)((reg >> offset) & ((0x1ul << size) - 1)); in GetValue()
525 public static ulong GetValue(ulong reg, int offset, int size) in GetValue() argument
527 if(size < 0 || size > 64) in GetValue()
531 return (ulong)((reg >> offset) & ((size == 64 ? 0 : (0x1ul << size)) - 1)); in GetValue()
618 public static uint SignExtend(uint value, int size) in SignExtend() argument
[all …]
DSocketServerProvider.cs136 var size = BufferSize; in ReaderThreadBody()
137 var buffer = new byte[size]; in ReaderThreadBody()
141 if(size != BufferSize) in ReaderThreadBody()
143 size = BufferSize; in ReaderThreadBody()
144 buffer = new byte[size]; in ReaderThreadBody()
148 var count = stream.Read(buffer, 0, size); in ReaderThreadBody()
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/GPIOPort/
DLiteX_GPIO.cs133 var size = 0; in DefineInRegisters()
138 size += 0x4; in DefineInRegisters()
144 size += 0x4; in DefineInRegisters()
148 size += 0x4; in DefineInRegisters()
153 size += 0x4; in DefineInRegisters()
158 size += 0x4; in DefineInRegisters()
163 size += 0x4; in DefineInRegisters()
166 return size; in DefineInRegisters()
171 var size = 0; in DefineOutRegisters()
184 size += 0x4; in DefineOutRegisters()
[all …]
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Peripherals/Bus/
DBusMultiRegistration.cs20 …ration(ulong address, ulong size, string region, IPeripheral cpu = null, ICluster<ICPU> cluster = … in BusMultiRegistration() argument
24 …blic BusMultiRegistration(ulong address, ulong size, string region, string condition) : this(addre… in BusMultiRegistration() argument
68size, string region, StateMask? stateMask, IPeripheral cpu = null, ICluster<ICPU> cluster = null, … in BusMultiRegistration() argument
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/Input/
DPL050.cs20 public PL050(IMachine machine, int size = 0x1000) : base(machine) in PL050() argument
22 this.size = size; in PL050()
23 …idHelper = new PrimeCellIDHelper(size, new byte[] { 0x50, 0x10, 0x04, 0x00, 0x0D, 0xF0, 0x05, 0xB1… in PL050()
32 return size;
125 private readonly int size; field in Antmicro.Renode.Peripherals.Input.PL050
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Peripherals/Python/
DPythonPeripheral.cs20 …d PyDevFromFile(this Machine @this, ReadFilePath path, ulong address, int size, bool initable = fa… in PyDevFromFile() argument
22 var pyDev = new PythonPeripheral(size, initable, filename: path); in PyDevFromFile()
30 …oid PyDevFromString(this Machine @this, string script, ulong address, int size, bool initable = fa… in PyDevFromString() argument
32 var pyDev = new PythonPeripheral(size, initable, script: script); in PyDevFromString()
44 …public PythonPeripheral(int size, bool initable = false, string script = null, string filename = n… in PythonPeripheral() argument
46 this.size = size; in PythonPeripheral()
153 get { return size; }
214 private readonly int size; field in Antmicro.Renode.Peripherals.Python.PythonPeripheral
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Peripherals/DMA/
DRequest.cs14 …public Request(Place source, Place destination, int size, TransferType readTransferType, TransferT… in Request()
19 this.Size = size; in Request()
28 …public Request(Place source, Place destination, int size, TransferType readTransferType, TransferT… in Request()
34 this.Size = size; in Request()
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/Miscellaneous/SiLabs/
DEFR32xG2_LockbitsData.cs25 public EFR32xG2_LockbitsData(uint size, in EFR32xG2_LockbitsData() argument
51 if ((size & 0x3) > 0) in EFR32xG2_LockbitsData()
55 this.size = size; in EFR32xG2_LockbitsData()
57 memory = new byte[size]; in EFR32xG2_LockbitsData()
58 for(uint i = 0; i < size; i++) in EFR32xG2_LockbitsData()
217 private uint size; field in Antmicro.Renode.Peripherals.Miscellaneous.SiLabs.EFR32xG2_LockbitsData
219 public long Size => (long)size;
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/
DEtherBoneBridge.cs129 var size = Marshal.SizeOf(ebRecord); in EtherBoneRecordToBytes()
130 var result = new byte[size]; in EtherBoneRecordToBytes()
132 var ptr = Marshal.AllocHGlobal(size); in EtherBoneRecordToBytes()
134 Marshal.Copy(ptr, result, 0, size); in EtherBoneRecordToBytes()
146 var size = Marshal.SizeOf(typeof(EtherBoneRecord)); in EtherBoneRecordFromBytes()
147 var ptr = Marshal.AllocHGlobal(size); in EtherBoneRecordFromBytes()
149 Marshal.Copy(bytes, 0, ptr, size); in EtherBoneRecordFromBytes()
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Peripherals/CAN/
DSocketCAN.cs85 Misc.EndiannessSwapInPlace(frame, marker.size, marker.offset, marker.size); in ByteSwap()
123 public static FieldMarker Create(int size, int offset) => in Create()
124 new FieldMarker { size = size, offset = offset }; in Create()
126 public int size; field
184 FieldMarker.Create(size: 4, offset: 0)
257 FieldMarker.Create(size: 4, offset: 0)
314 FieldMarker.Create(size: 4, offset: 0), // prio
315 FieldMarker.Create(size: 2, offset: 6), // len
316 FieldMarker.Create(size: 4, offset: 8) // af
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Cores/renode/
Drenode_memory.c17 uint64_t size; member
23 uint64_t size; member
39 uint32_t size; member
85 …->element->start && offset <= (current_block->element->start + current_block->element->size - 1)) { in tlib_guest_offset_to_host_ptr()
110 …host_pointer && ptr <= (current_block->element->host_pointer + current_block->element->size - 1)) { in tlib_host_ptr_to_guest_offset()
147 new_mappings->size = count; in renode_set_host_blocks()
157 new_mappings->elements[i].size = blocks[i].size; in renode_set_host_blocks()
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/DMA/
DMPFS_PDMA.cs268 ulong size = nextBytesHigh.Value; in InitTransfer()
269 size = size << 32; in InitTransfer()
270 size = size + nextBytesLow.Value; in InitTransfer()
274 IssueCopy(sourceAddress, destinationAddress, size); in InitTransfer()
275 FinishTransfer(sourceAddress, destinationAddress, size); in InitTransfer()
279 private void IssueCopy(ulong sourceAddress, ulong destinationAddress, ulong size) in IssueCopy() argument
281 var dataLeft = size; in IssueCopy()
304 private void FinishTransfer(ulong sourceAddress, ulong destinationAddress, ulong size) in FinishTransfer() argument
308 var execSource = sourceAddress + size; in FinishTransfer()
311 var execDestination = destinationAddress + size; in FinishTransfer()
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/Memory/
DGenericI2cEeprom.cs36 …public GenericI2cEeprom(ulong size, int addressBitSize = DefaultAddressBitSize, bool writable = De… in GenericI2cEeprom() argument
37 : this(new ArrayMemory(size, Byte.MaxValue), addressBitSize, writable, pageSize) in GenericI2cEeprom()
155 private IEnumerable<byte> ReadRollover(int start, int size, int offset, int count) in ReadRollover() argument
157 var data = Memory.ReadBytes(start, size); in ReadRollover()
158 return Enumerable.Repeat<IEnumerable<byte>>(data, (count + size - 1) / size) in ReadRollover()

1234