From: Christos Zoulas Date: Tue, 15 Jan 2008 00:53:59 +0000 (+0000) Subject: new magic. X-Git-Tag: pre-rrt-big-changes-post-4-23~84 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ba34f7191ccb8ee31144d30fc8674a42d72315ec;p=file new magic. --- diff --git a/magic/Magdir/xilinx b/magic/Magdir/xilinx new file mode 100644 index 00000000..8f411ce2 --- /dev/null +++ b/magic/Magdir/xilinx @@ -0,0 +1,34 @@ + +#------------------------------------------------------------------------------ +# 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 diff --git a/magic/Makefile.am b/magic/Makefile.am index 95879894..f7bd3383 100644 --- a/magic/Makefile.am +++ b/magic/Makefile.am @@ -214,6 +214,7 @@ Magdir/vxl \ Magdir/wordprocessors \ Magdir/xdelta \ Magdir/xenix \ +Magdir/xilinx \ Magdir/xo65 \ Magdir/xwindows \ Magdir/zilog \