blob: fd1467813cbc0b87f656d37d1ca890bca1f99c1f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
#------------------------------------------------------------------------------
# $File: xilinx,v 1.10 2022/12/18 14:59:32 christos Exp $
# This is Aaron's attempt at a MAGIC file for Xilinx .bit files.
# Xilinx-Magic@RevRagnarok.com
# Got the info from FPGA-FAQ 0026
#
# Rewritten to use pstring/H instead of hardcoded lengths by O. Freyermuth,
# fixes at least reading of bitfiles from Spartan 2, 3, 6.
# http://www.fpga-faq.com/FAQ_Pages/0026_Tell_me_about_bit_files.htm
#
# First there is the sync header and its length
0 beshort 0x0009
>2 belong =0x0ff00ff0
>>&0 belong =0x0ff00ff0
>>>&0 byte =0x00
>>>&1 beshort =0x0001
>>>&3 string a Xilinx BIT data
# Next is a Pascal-style string with the NCD name. We want to capture that.
>>>>&0 pstring/H x - from %s
# And then 'b'
>>>>>&1 string b
# Then the model / part number:
>>>>>>&0 pstring/H x - for %s
# Then 'c'
>>>>>>>&1 string c
# Then the build-date
>>>>>>>>&0 pstring/H x - built %s
# Then 'd'
>>>>>>>>>&1 string d
# Then the build-time
>>>>>>>>>>&0 pstring/H x \b(%s)
# Then 'e'
>>>>>>>>>>>&1 string e
# And length of data
>>>>>>>>>>>>&0 belong x - data length %#x
# Raw bitstream files
0 long 0xffffffff
>&0 belong 0xaa995566 Xilinx RAW bitstream (.BIN)
# AXLF (xclbin) files used by AMD/Xilinx accelerators.
# The file format is defined by XRT source tree:
# https://github.com/Xilinx/XRT/blob/master/src/runtime_src/core/include/xclbin.h
# Display file size, creation date, accelerator shell name, xclbin uuid and
# number of sections.
0 string xclbin2 AMD/Xilinx accelerator AXLF (xclbin) file
>0x130 lequad x \b, %lld bytes
>0x138 leqdate x \b, created %s
>0x160 string >0 \b, shell "%.64s"
>0x1a0 ubelong x \b, uuid %08x
>0x1a4 ubeshort x \b-%04x
>0x1a6 ubeshort x \b-%04x
>0x1a8 ubeshort x \b-%04x
>0x1aa ubelong x \b-%08x
>0x1ae ubeshort x \b%04x
>0x1c0 lelong x \b, %d sections
|