xref: /dragonfly/contrib/file/magic/Magdir/xilinx (revision 4a65f651)
1
2#------------------------------------------------------------------------------
3# This is Aaron's attempt at a MAGIC file for Xilinx .bit files.
4# Xilinx-Magic@RevRagnarok.com
5# Got the info from FPGA-FAQ 0026
6#
7# First there is the sync header and its length
80	beshort 0x0009
9>2 	belong	=0x0ff00ff0
10>>&0	belong  =0x0ff00ff0
11>>>&0	beshort =0x0000
12>>>>&0	pstring	a	Xilinx BIT data
13# Next is a Pascal-style string with the NCD name. We want to capture that.
14>>>>0x0F	pstring	x	- from %s
15# It is followed by a NUL
16>>>>>&1	byte	0x00
17# And then 'b'
18>>>>>&2	string b
19# With the part number:
20#>>>>>&5 string	4v	(Virtex4)
21#>>>>>&5 string  2v	(Virtex II
22#>>>>>>&0	string	!p	\b)
23#>>>>>>&0	string	p	Pro)
24>>>>>&4	pstring x	- for %s
25# And then NUL / 'c' / Build Data / NUL / 'd' / Date / NUL / 'e' / Data Length
26>>>>>>&1	byte	0x00
27>>>>>>&2	string	c
28>>>>>>&4	pstring	x	- built %s
29>>>>>>>&1	byte	0x00
30>>>>>>>&2	string	d
31>>>>>>>&4	pstring	x	\b(%s)
32>>>>>>>>&1	byte	0x00
33>>>>>>>>&2	string	e
34>>>>>>>>&4	belong	x	- data length 0x%lx
35