latticeBitParser: check file size during parse. Improved a bit parsing speed

This commit is contained in:
Gwenhael Goavec-Merou
2026-04-06 17:22:02 +02:00
parent 816d6558fe
commit b4bfad4b1c
2 changed files with 142 additions and 56 deletions
+7 -1
View File
@@ -24,11 +24,17 @@ class LatticeBitParser: public ConfigBitstreamParser {
* \brief return configuration data with structure similar to jedec
* \return configuration data
*/
std::vector<std::string> getDataArray() {return _bit_array;}
std::vector<std::string> &getDataArray() {return _bit_array;}
private:
int parseHeader();
bool parseCfgData();
/*!
* \brief format a 32-bit value as 8 zero-padded lowercase hex digits
* \param[in] id: value to format
* \return 8-character hex string
*/
static std::string fmtIdcode(uint32_t id);
size_t _endHeader;
bool _is_machXO2;
bool _is_ecp3;