irioCoreCpp Library Module  2.1.0
dma.h
1 #pragma once
2 
3 #include <string>
4 #include <pugixml.hpp>
5 #include "resource.h"
6 
7 
8 namespace irio {
9 namespace bfp {
10 
16 class DMA: public Resource {
17  public:
29  DMA(const std::string &_name, const FpgaTypes &_fpgaType,
30  const ElemTypes &_elemType, const std::uint32_t &_address,
31  const size_t &_numElem = 1);
32 
33  DMA() = default;
34 
41  static DMA processDMA(const pugi::xml_node &dmaNode);
42 
48  std::uint32_t getDMANumber() const;
49 
54  bool isTargetToHost() const;
55 
61  bool isHostToTarget() const;
62 
63  private:
65  bool m_isTargetToHost = false;
66 };
67 
68 } // namespace bfp
69 } // namespace irio
70 
Class holding information about one DMA.
Definition: dma.h:16
static DMA processDMA(const pugi::xml_node &dmaNode)
Creates a DMA object from an XML node.
bool isTargetToHost() const
Returns whether the DMA is Target to Host (TtH) or not.
DMA(const std::string &_name, const FpgaTypes &_fpgaType, const ElemTypes &_elemType, const std::uint32_t &_address, const size_t &_numElem=1)
Contructor.
std::uint32_t getDMANumber() const
Returns the number that identifies this DMA.
bool isHostToTarget() const
Returns whether the DMA is Host to Target (HtT) or not.
bool m_isTargetToHost
If the DMA is TtH or HtT.
Definition: dma.h:65
Class holding information about one resource (Register or DMA)
Definition: resource.h:16
ElemTypes
Supported types for the elements of the different Resources in the Bitfile.
Definition: elemtypes.h:13
FpgaTypes
Type of Resource possible in the Bitfile.
Definition: fpgatypes.h:11