mirror of
https://github.com/trabucayre/openFPGALoader.git
synced 2026-09-01 18:48:49 +02:00
update bitparser:
- now it's a subclass to configBitstreamParser - use ifstream instead of FILE - use a string to store data - simplify header parse
This commit is contained in:
+5
-7
@@ -2,17 +2,18 @@
|
||||
#define BITPARSER_H
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
class BitParser {
|
||||
#include "configBitstreamParser.hpp"
|
||||
|
||||
class BitParser: public ConfigBitstreamParser {
|
||||
public:
|
||||
BitParser(std::string filename);
|
||||
~BitParser();
|
||||
int parse();
|
||||
unsigned char *getData();
|
||||
int getLength() {return file_length;}
|
||||
|
||||
private:
|
||||
int parseField(unsigned char type, FILE *fd);
|
||||
int parseField();
|
||||
unsigned char reverseByte(unsigned char c);
|
||||
std::string fieldA;
|
||||
std::string part_name;
|
||||
@@ -21,9 +22,6 @@ class BitParser {
|
||||
std::string design_name;
|
||||
std::string userID;
|
||||
std::string toolVersion;
|
||||
int file_length;
|
||||
unsigned char *bit_data;
|
||||
std::string _filename;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user