xilinx 1015 B

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