Merge pull request #1321 from mwalker33/desfire
[RRG-proxmark3.git] / common_fpga / fpga.h
blobc8390ff7efb9a3590b34d720f74d7d67a4b699f2
1 //-----------------------------------------------------------------------------
2 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
3 // at your option, any later version. See the LICENSE.txt file for the text of
4 // the license.
5 //-----------------------------------------------------------------------------
7 #ifndef __FPGA_H
8 #define __FPGA_H
10 #include <stdbool.h>
11 #include <inttypes.h>
13 #define FPGA_BITSTREAM_FIXED_HEADER_SIZE sizeof(bitparse_fixed_header)
14 #define FPGA_INTERLEAVE_SIZE 288
15 #define FPGA_CONFIG_SIZE 42336L // our current fpga_[lh]f.bit files are 42175 bytes. Rounded up to next multiple of FPGA_INTERLEAVE_SIZE
16 #define FPGA_RING_BUFFER_BYTES (1024 * 39)
17 #define FPGA_TRACE_SIZE 3072
19 static const uint8_t bitparse_fixed_header[] = {0x00, 0x09, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x00, 0x00, 0x01};
20 extern const int g_fpga_bitstream_num;
21 extern const char *const g_fpga_version_information[];
23 #endif