[BACK]Return to xilinx CVS log [TXT][DIR] Up to [local] / src / usr.bin / file / magdir

File: [local] / src / usr.bin / file / magdir / xilinx (download)

Revision 1.2, Sun Apr 26 14:17:45 2009 UTC (15 years, 1 month ago) by chl
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, HEAD
Changes since 1.1: +1 -0 lines

add missing $OpenBSD$ tags

ok ian@

#	$OpenBSD: xilinx,v 1.2 2009/04/26 14:17:45 chl 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
#
# First there is the sync header and its length
0	beshort 0x0009
>2 	belong	=0x0ff00ff0
>>&0	belong  =0x0ff00ff0
>>>&0	beshort =0x0000	
>>>>&0	pstring	a	Xilinx BIT data
# Next is a Pascal-style string with the NCD name. We want to capture that.
>>>>0x0F	pstring	x	- from %s
# It is followed by a NUL
>>>>>&1	byte	0x00
# And then 'b'
>>>>>&2	string b
# With the part number:
#>>>>>&5 string	4v	(Virtex4)
#>>>>>&5 string  2v	(Virtex II
#>>>>>>&0	string	!p	\b)
#>>>>>>&0	string	p	Pro)
>>>>>&4	pstring x	- for %s
# And then NUL / 'c' / Build Data / NUL / 'd' / Date / NUL / 'e' / Data Length
>>>>>>&1	byte	0x00
>>>>>>&2	string	c
>>>>>>&4	pstring	x	- built %s
>>>>>>>&1	byte	0x00
>>>>>>>&2	string	d
>>>>>>>&4	pstring	x	\b(%s)
>>>>>>>>&1	byte	0x00
>>>>>>>>&2	string	e
>>>>>>>>&4	belong	x	- data length 0x%lx