irioCoreCpp Library Module  2.1.0
bfp.h
1 #pragma once
2 
3 #include <vector>
4 #include <unordered_map>
5 #include <string>
6 
7 #include "register.h"
8 #include "dma.h"
9 
10 namespace irio {
11 namespace bfp {
20 class BFP {
21  public:
31  explicit BFP(const std::string &bitfile, const bool warnUnsupported = true);
32 
37  std::string getBitfilePath() const;
38 
43  std::string getBitfileVersion() const;
44 
49  std::string getSignature() const;
50 
55  std::unordered_map<std::string, Register> getRegisters() const;
56 
65  Register getRegister(const std::string &registerName) const;
66 
72  std::unordered_map<std::string, DMA> getDMAs() const;
73 
82  DMA getDMA(const std::string &dmaName) const;
83 
84  private:
86  const std::string m_bitfilePath;
87 
89  std::string m_signature;
91  std::uint32_t m_baseAddress;
93  std::string m_bitfileVersion;
94 
96  std::unordered_map<std::string, Register> m_regMap;
98  std::unordered_map<std::string, DMA> m_dmaMap;
99 };
100 } // namespace bfp
101 } // namespace irio
BitFile Parser.
Definition: bfp.h:20
Register getRegister(const std::string &registerName) const
Get specific register.
std::uint32_t m_baseAddress
Bitfile's base address.
Definition: bfp.h:91
std::unordered_map< std::string, Register > m_regMap
Map storing the data of the registers parsed, using their names as keys.
Definition: bfp.h:96
std::unordered_map< std::string, Register > getRegisters() const
Get map with all the registers parsed, the key is the register name (without spaces)
std::string getSignature() const
Return the Bitfile' signature.
std::string m_bitfileVersion
Bitfile's version.
Definition: bfp.h:93
std::string m_signature
Bitfile's signature.
Definition: bfp.h:89
const std::string m_bitfilePath
Path to the bitfile to be parsed.
Definition: bfp.h:86
std::unordered_map< std::string, DMA > m_dmaMap
Map storing the data of the DMAs parsed, using their names as keys.
Definition: bfp.h:98
std::string getBitfilePath() const
Return the path of the parsed Bitfile.
std::string getBitfileVersion() const
Returns the Bitfile version.
BFP(const std::string &bitfile, const bool warnUnsupported=true)
Parse the specified bitfile.
DMA getDMA(const std::string &dmaName) const
Get specific DMA.
std::unordered_map< std::string, DMA > getDMAs() const
Get map with all the DMAs parsed, the key if the DMA name (without spaces)
Class holding information about one DMA.
Definition: dma.h:16
Class holding information about one Register.
Definition: register.h:16