Root/m1/jtag-boot/README

Source at commit bcd12fe644dc5da543df10e87959d172d1319ec2 created 12 years 6 months ago.
By Werner Almesberger, m1/jtag-boot/: moved explanation from mkboot to README and added more details
1jtag-boot (for Milkymist One)
2=============================
3
4This collection of scripts talks via JTAG to the FPGA of a Milkymist One.
5It makes the FPGA load a bitstream (FPGA configuration) from NOR.
6
7
8Elements involved
9-----------------
10
11The mkboot script generates a very short bitstream that instructs the
12configuration subsystem of the FPGA to perform the boot operation.
13
14A bitstream is a sequence of instructions for the configuration subsystem.
15Bitstreams are used for various purposes, for example, the configuration
16data of the FPGA is also contained in a (much larger) bitstream.
17
18mkboot also adds the minimum set of headers of the ".bit" format to the
19bitstream. This allows the bitstream to be transferred to the FPGA via
20JTAG, using the UrJTAG utility.
21
22UrJTAG is controlled via the boot.jtag script, which performs the basic
23initialization of the JTAG system, defines a few chip-specific constants,
24and then loads and executes the bitstream generated by mkboot.
25
26
27Bitstream content and format
28----------------------------
29
30The bitstream instructs the configuration subsystem of the to erase the
31present FPGA configuration, load a new one from NOR, and then let the
32FPGA "run" it.
33
34The structure of this kind of bitstream is described on Table 7-1 on page
35126, section "IPROG Reconfiguration", of [1]. The format of the bitstream
36is described in the section "Configuration packets" starting at page 88
37of [1].
38
39The NOR address from where the configuration bitstream will be loaded was
40obtained from the M1 standby bitstream, starting around line 205 of [2].
41
42Finally, the format of the .bit file was simply taken from the function
43xlx_bitstream_load_bit of [3]. This is the same function in UrJTAG that
44loads the file with the "pld load" command.
45
46[1] Xilinx. "Spartan-6 FPGA Configuration User Guide"
47    http://www.xilinx.com/support/documentation/user_guides/ug380.pdf
48[2] https://github.com/milkymist/milkymist/blob/master/boards/milkymist-one/standby/standby.v
49[3] http://urjtag.git.sourceforge.net/git/gitweb.cgi?p=urjtag/urjtag;a=blob_plain;f=urjtag/src/pld/xilinx_bitstream.c;hb=HEAD
50
51
52System state and behaviour
53--------------------------
54
55This process differs from a regular boot in that it should be able to
56boot the FPGA into the "regular" bitstream (or the "rescue" bitstream)
57from any state, including after a failed attempt to load the "standby"
58bitstream.
59
60The successful booting of FlickerNoise with jtag-boot does therefore not
61mean that the M1 would be able to boot regularly. E.g., if the standby
62bitstream is corrupted, the M1's FPGA initialization - without using
63JTAG - would fail at this first step.
64

Archive Download this file

Branches:
master



interactive