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