mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-01 19:16:29 -04:00
CPLD: Method to calculate bitstream CRC32.
This commit is contained in:
parent
df825807d6
commit
3ed1d9e24a
2 changed files with 24 additions and 0 deletions
|
@ -23,6 +23,7 @@
|
|||
#define __CPLD_MAX5_H__
|
||||
|
||||
#include "jtag.hpp"
|
||||
#include "crc.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
|
@ -75,6 +76,8 @@ public:
|
|||
|
||||
bool is_blank();
|
||||
|
||||
uint32_t crc();
|
||||
|
||||
std::pair<bool, uint8_t> boundary_scan();
|
||||
|
||||
enum class Instruction {
|
||||
|
@ -135,6 +138,9 @@ private:
|
|||
|
||||
bool is_blank_block(const uint16_t id, const size_t count);
|
||||
|
||||
using crc_t = CRC<32, true, true>;
|
||||
void block_crc(const uint16_t id, const size_t count, crc_t& crc);
|
||||
|
||||
const uint32_t IDCODE = 0b00000010000010100101000011011101;
|
||||
|
||||
const size_t IR_LENGTH = 10;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue