2021-06-26 15:24:07 +02:00
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
/*
|
|
|
|
|
* Copyright (C) 2019 Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
|
|
|
|
|
*/
|
|
|
|
|
|
2019-09-26 18:29:20 +02:00
|
|
|
#ifndef BITPARSER_H
|
|
|
|
|
#define BITPARSER_H
|
|
|
|
|
|
|
|
|
|
#include <iostream>
|
2019-10-05 10:28:44 +02:00
|
|
|
#include <fstream>
|
2021-02-24 06:36:48 +01:00
|
|
|
#include <string>
|
2019-09-26 18:29:20 +02:00
|
|
|
|
2019-10-05 10:28:44 +02:00
|
|
|
#include "configBitstreamParser.hpp"
|
|
|
|
|
|
|
|
|
|
class BitParser: public ConfigBitstreamParser {
|
2019-09-26 18:29:20 +02:00
|
|
|
public:
|
2020-09-25 18:42:32 +02:00
|
|
|
BitParser(const std::string &filename, bool reverseOrder, bool verbose = false);
|
2019-09-26 18:29:20 +02:00
|
|
|
~BitParser();
|
2020-08-19 16:53:49 +02:00
|
|
|
int parse() override;
|
2019-09-26 18:29:20 +02:00
|
|
|
|
|
|
|
|
private:
|
2021-02-24 06:36:48 +01:00
|
|
|
int parseHeader();
|
2020-09-25 18:42:32 +02:00
|
|
|
bool _reverseOrder;
|
2019-09-26 18:29:20 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|