2018-07-28 20:25:12 +08:00
|
|
|
//-----------------------------------------------------------------------------
|
2022-01-07 08:58:03 +08:00
|
|
|
// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
|
|
|
|
//
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// See LICENSE.txt for the text of the license.
|
2018-07-28 20:25:12 +08:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#ifndef __FPGA_H
|
|
|
|
#define __FPGA_H
|
|
|
|
|
2019-08-09 20:41:44 +08:00
|
|
|
#include <stdbool.h>
|
|
|
|
#include <inttypes.h>
|
2019-08-08 22:57:33 +08:00
|
|
|
|
2018-07-28 20:25:12 +08:00
|
|
|
#define FPGA_BITSTREAM_FIXED_HEADER_SIZE sizeof(bitparse_fixed_header)
|
|
|
|
#define FPGA_INTERLEAVE_SIZE 288
|
2021-08-22 05:43:06 +08:00
|
|
|
#if defined XC3
|
2023-08-25 00:22:50 +08:00
|
|
|
#define FPGA_TYPE "3s100evq100"
|
|
|
|
#define FPGA_CONFIG_SIZE 72864L // FPGA .bit file rounded up to next multiple of FPGA_INTERLEAVE_SIZE
|
2021-08-22 05:43:06 +08:00
|
|
|
#else
|
2023-08-25 00:22:50 +08:00
|
|
|
#define FPGA_TYPE "2s30vq100"
|
|
|
|
#define FPGA_CONFIG_SIZE 42336L // FPGA .bit file rounded up to next multiple of FPGA_INTERLEAVE_SIZE
|
2021-08-22 05:43:06 +08:00
|
|
|
#endif
|
2022-03-29 01:30:55 +08:00
|
|
|
#define FPGA_RING_BUFFER_BYTES (1024 * 30)
|
2020-01-12 23:45:24 +08:00
|
|
|
#define FPGA_TRACE_SIZE 3072
|
|
|
|
|
2018-07-28 20:25:12 +08:00
|
|
|
static const uint8_t bitparse_fixed_header[] = {0x00, 0x09, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x00, 0x00, 0x01};
|
2020-05-19 23:43:13 +08:00
|
|
|
extern const int g_fpga_bitstream_num;
|
|
|
|
extern const char *const g_fpga_version_information[];
|
2018-07-28 20:25:12 +08:00
|
|
|
|
|
|
|
#endif
|