1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-11-15 11:36:15 +02:00

m1/jtag-boot/mkboot: added comments with pointers to information sources

This commit is contained in:
Werner Almesberger 2011-09-06 12:29:31 -03:00
parent 96a5dd3b60
commit f3b289413d

View File

@ -6,11 +6,31 @@
# Hacked 2001 by Werner Almesberger # Hacked 2001 by Werner Almesberger
# #
# magic, copied from xilinx_bitstream.c:xlx_bitstream_load_bit #
# bitstream file magic, copied from xilinx_bitstream.c:xlx_bitstream_load_bit
#
# here is the source:
# http://urjtag.git.sourceforge.net/git/gitweb.cgi?p=urjtag/urjtag;a=blob_plain;f=urjtag/src/pld/xilinx_bitstream.c;hb=HEAD
#
print pack("C*", print pack("C*",
0x00, 0x09, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x00, 0x09, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0,
0x0f, 0xf0, 0x00, 0x00, 0x01); 0x0f, 0xf0, 0x00, 0x00, 0x01);
#
# "bitstream" according to Table 7-1 (page 126) of
# http://www.xilinx.com/support/documentation/user_guides/ug380.pdf
#
# and the M1 standby bitstream:
# https://github.com/milkymist/milkymist/blob/master/boards/milkymist-one/standby/standby.v#L205
#
# The 0xffff dummy and the 0x2000 NOP seem to be unnecessary in this case,
# so we omit them.
#
# To boot the rescue bitstream instead of the regular bitstream, change
# the value of GENERAL2 from 0x0037 to 0x0005.
#
@seq = ( @seq = (
# 0xffff, # DUMMY # 0xffff, # DUMMY
0xaa99, # Sync(1) 0xaa99, # Sync(1)
@ -23,6 +43,14 @@ print pack("C*",
0x000e); # IPROG 0x000e); # IPROG
# 0x2000); # NOP # 0x2000); # NOP
#
# "e" section in bitstream file, with the length in bytes.
#
print pack("aN", "e", 2*@seq); print pack("aN", "e", 2*@seq);
#
# the actual bitstream
#
print pack("n*", @seq); print pack("n*", @seq);