irioCoreCpp Library Module
2.1.0
|
BitFile Parser. More...
#include <bfp.h>
Public Member Functions | |
BFP (const std::string &bitfile, const bool warnUnsupported=true) | |
Parse the specified bitfile. More... | |
std::string | getBitfilePath () const |
Return the path of the parsed Bitfile. More... | |
std::string | getBitfileVersion () const |
Returns the Bitfile version. More... | |
std::string | getSignature () const |
Return the Bitfile' signature. More... | |
std::unordered_map< std::string, Register > | getRegisters () const |
Get map with all the registers parsed, the key is the register name (without spaces) More... | |
Register | getRegister (const std::string ®isterName) const |
Get specific register. More... | |
std::unordered_map< std::string, DMA > | getDMAs () const |
Get map with all the DMAs parsed, the key if the DMA name (without spaces) More... | |
DMA | getDMA (const std::string &dmaName) const |
Get specific DMA. More... | |
Private Attributes | |
const std::string | m_bitfilePath |
Path to the bitfile to be parsed. | |
std::string | m_signature |
Bitfile's signature. | |
std::uint32_t | m_baseAddress |
Bitfile's base address. | |
std::string | m_bitfileVersion |
Bitfile's version. | |
std::unordered_map< std::string, Register > | m_regMap |
Map storing the data of the registers parsed, using their names as keys. | |
std::unordered_map< std::string, DMA > | m_dmaMap |
Map storing the data of the DMAs parsed, using their names as keys. | |
BitFile Parser.
Manages parsing a bitfile and extracting the Registers and DMAs on it. It also extracts the signature and Bitfile version.
|
explicit |
Parse the specified bitfile.
irio::errors::BFPParseBitfileError | Unable to parse bitfile |
bitfile | Bitfile to parse |
warnUnsupported | If true, a message will be printed by std::cerr informing of the registers found with an unsupported type |
std::string irio::bfp::BFP::getBitfilePath | ( | ) | const |
Return the path of the parsed Bitfile.
std::string irio::bfp::BFP::getBitfileVersion | ( | ) | const |
Returns the Bitfile version.
DMA irio::bfp::BFP::getDMA | ( | const std::string & | dmaName | ) | const |
Get specific DMA.
Throws a runtime exception if not found.
irio::errors::ResourceNotFoundError | Specified dmaName not found |
dmaName | DMA name to get |
std::unordered_map<std::string, DMA> irio::bfp::BFP::getDMAs | ( | ) | const |
Get map with all the DMAs parsed, the key if the DMA name (without spaces)
Register irio::bfp::BFP::getRegister | ( | const std::string & | registerName | ) | const |
Get specific register.
Throws a runtime exception if not found.
irio::errors::ResourceNotFoundError | Specified registerName not found |
registerName | Register name to get |
std::unordered_map<std::string, Register> irio::bfp::BFP::getRegisters | ( | ) | const |
Get map with all the registers parsed, the key is the register name (without spaces)
std::string irio::bfp::BFP::getSignature | ( | ) | const |
Return the Bitfile' signature.