Date:2011-09-06 17:29:31 (8 years 9 days ago)
Author:Werner Almesberger
Commit:f3b289413dab2381b5d54de12ff88a1aed756c80
Message:m1/jtag-boot/mkboot: added comments with pointers to information sources

Files: m1/jtag-boot/mkboot (2 diffs)

Change Details

m1/jtag-boot/mkboot
66# Hacked 2001 by Werner Almesberger
77#
88
9# magic, copied from xilinx_bitstream.c:xlx_bitstream_load_bit
9#
10# bitstream file magic, copied from xilinx_bitstream.c:xlx_bitstream_load_bit
11#
12# here is the source:
13# http://urjtag.git.sourceforge.net/git/gitweb.cgi?p=urjtag/urjtag;a=blob_plain;f=urjtag/src/pld/xilinx_bitstream.c;hb=HEAD
14#
15
1016print pack("C*",
1117    0x00, 0x09, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0,
1218    0x0f, 0xf0, 0x00, 0x00, 0x01);
1319
20#
21# "bitstream" according to Table 7-1 (page 126) of
22# http://www.xilinx.com/support/documentation/user_guides/ug380.pdf
23#
24# and the M1 standby bitstream:
25# https://github.com/milkymist/milkymist/blob/master/boards/milkymist-one/standby/standby.v#L205
26#
27# The 0xffff dummy and the 0x2000 NOP seem to be unnecessary in this case,
28# so we omit them.
29#
30# To boot the rescue bitstream instead of the regular bitstream, change
31# the value of GENERAL2 from 0x0037 to 0x0005.
32#
33
1434@seq = (
1535# 0xffff, # DUMMY
1636    0xaa99, # Sync(1)
...... 
2343    0x000e); # IPROG
2444# 0x2000); # NOP
2545
46#
47# "e" section in bitstream file, with the length in bytes.
48#
49
2650print pack("aN", "e", 2*@seq);
2751
52#
53# the actual bitstream
54#
55
2856print pack("n*", @seq);

Archive Download the corresponding diff file

Branches:
master



interactive