1 //
2 // Copyright (c) 2010-2018 Antmicro
3 // Copyright (c) 2011-2015 Realtime Embedded
4 //
5 // This file is licensed under the MIT License.
6 // Full license text is available in 'licenses/MIT.txt'.
7 //
8 using System;
9 
10 namespace Antmicro.Renode.Peripherals.DMA
11 {
12     public struct Request
13     {
RequestAntmicro.Renode.Peripherals.DMA.Request14         public Request(Place source, Place destination, int size, TransferType readTransferType, TransferType writeTransferType,
15             bool incrementReadAddress = true, bool incrementWriteAddress = true) : this()
16         {
17             this.Source = source;
18             this.Destination = destination;
19             this.Size = size;
20             this.ReadTransferType = readTransferType;
21             this.WriteTransferType = writeTransferType;
22             this.IncrementReadAddress = incrementReadAddress;
23             this.IncrementWriteAddress = incrementWriteAddress;
24             this.SourceIncrementStep = (uint)readTransferType;
25             this.DestinationIncrementStep = (uint)writeTransferType;
26         }
27 
RequestAntmicro.Renode.Peripherals.DMA.Request28         public Request(Place source, Place destination, int size, TransferType readTransferType, TransferType writeTransferType,
29             uint sourceIncrementStep, uint destinationIncrementStep, bool incrementReadAddress = true,
30             bool incrementWriteAddress = true) : this()
31         {
32             this.Source = source;
33             this.Destination = destination;
34             this.Size = size;
35             this.ReadTransferType = readTransferType;
36             this.WriteTransferType = writeTransferType;
37             this.IncrementReadAddress = incrementReadAddress;
38             this.IncrementWriteAddress = incrementWriteAddress;
39             this.SourceIncrementStep = sourceIncrementStep;
40             this.DestinationIncrementStep = destinationIncrementStep;
41         }
42 
43         public Place Source { get; private set; }
44         public Place Destination { get; private set; }
45         public uint SourceIncrementStep { get; private set; }
46         public uint DestinationIncrementStep { get; private set; }
47         public int Size { get; private set; }
48         public TransferType ReadTransferType { get; private set; }
49         public TransferType WriteTransferType { get; private set; }
50         public bool IncrementReadAddress { get; private set; }
51         public bool IncrementWriteAddress { get; private set; }
52     }
53 }
54 
55