Skip to content

Commit f7ec945

Browse files
BuildTheDocsBuildTheDocs
authored andcommitted
update d654a9d
0 parents  commit f7ec945

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+11202
-0
lines changed

.buildinfo

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Sphinx build info version 1
2+
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3+
config: 5ee66292091ff32fcf1050388dd8a28f
4+
tags: 645f666f9bcd5a90fca523b33c5a78b7

.nojekyll

Whitespace-only changes.

_images/max10_flash-memory.png

18.5 KB
Loading
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.. _compatibility:boards:
2+
3+
Boards
4+
######
5+
6+
.. NOTE::
7+
`arty` can be any of the board names from the first column.
8+
9+
.. code-block:: bash
10+
11+
openFPGALoader -b arty bitstream.bit # Loading in SRAM (volatile)
12+
openFPGALoader -b arty -f bitstream.bit # Writing in flash (non-volatile)
13+
14+
.. include:: boards.inc
15+
16+
* IF: Internal Flash
17+
* EF: External Flash
18+
* AS: Active Serial flash mode
19+
* NA: Not Available
20+
* NT: Not Tested
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. _compatibility:cables:
2+
3+
Cables
4+
######
5+
6+
.. include:: cable.inc
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.. _compatibility:fpgas:
2+
3+
FPGAs
4+
#####
5+
6+
.. include:: fpga.inc
7+
8+
* IF: Internal Flash
9+
* AS: Active Serial flash mode
10+
* NA: Not Available
11+
* NT: Not Tested

_sources/guide/advanced.rst.txt

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
.. _advanced-usage:
2+
3+
Advanced usage of openFPGALoader
4+
################################
5+
6+
Resetting an FPGA
7+
=================
8+
9+
.. code-block:: bash
10+
11+
openFPGALoader [options] -r
12+
13+
Using negative edge for TDO's sampling
14+
======================================
15+
16+
If transaction are unstable you can try to change read edge by using
17+
18+
.. code-block:: bash
19+
20+
openFPGALoader [options] --invert-read-edge
21+
22+
Reading the bitstream from STDIN
23+
================================
24+
25+
.. code-block:: bash
26+
27+
cat /path/to/bitstream.ext | openFPGALoader --file-type ext [options]
28+
29+
``--file-type`` is required to detect file type.
30+
31+
.. NOTE::
32+
It's possible to load a bitstream through network:
33+
34+
.. code-block:: bash
35+
36+
# FPGA side
37+
nc -lp port | openFPGALoader --file-type xxx [option]
38+
39+
# Bitstream side
40+
nc -q 0 host port < /path/to/bitstream.ext
41+
42+
Automatic file type detection bypass
43+
====================================
44+
45+
Default behavior is to use file extension to determine file parser.
46+
To avoid this mechanism ``--file-type type`` must be used.
47+
48+
FT231/FT232 bitbang mode and pins configuration
49+
===============================================
50+
51+
FT232R and ft231X may be used as JTAG programmer.
52+
JTAG communications are emulated in bitbang mode.
53+
54+
To use these devices user needs to provides both the cable and the pin mapping:
55+
56+
.. code-block:: bash
57+
58+
openFPGALoader [options] -cft23XXX --pins=TDI:TDO:TCK:TMS /path/to/bitstream.ext
59+
60+
where:
61+
62+
* ft23XXX may be ``ft232RL`` or ``ft231X``.
63+
* TDI:TDO:TCK:TMS may be the pin ID (0 <= id <= 7) or string value.
64+
65+
allowed values are:
66+
67+
===== ==
68+
value ID
69+
===== ==
70+
TXD 0
71+
RXD 1
72+
RTS 2
73+
CTS 3
74+
DTR 4
75+
DSR 5
76+
DCD 6
77+
RI 7
78+
===== ==
79+
80+
Writing to an arbitrary address in flash memory
81+
===============================================
82+
83+
With FPGA using an external SPI flash (*xilinx*, *lattice ECP5/nexus/ice40*, *anlogic*, *efinix*) option ``-o`` allows
84+
one to write raw binary file to an arbitrary adress in FLASH.
85+
86+
Detect/read/write on primary/secondary flash memories
87+
=====================================================
88+
89+
With FPGA using two external SPI flash (some *xilinx* boards) option ``--target-flash`` allows to select the QSPI chip.
90+
91+
To detect:
92+
93+
.. code-block:: bash
94+
95+
openFPGALoader -b kcu105 -f --target-flash {primary,secondary} --detect
96+
97+
To read the primary flash memory:
98+
99+
.. code-block:: bash
100+
101+
openFPGALoader -b kcu105 -f --target-flash primary --dump-flash --file-size N_BYTES mydump.bin
102+
103+
and the second flash memory:
104+
105+
.. code-block:: bash
106+
107+
openFPGALoader -b kcu105 -f --target-flash secondary --dump-flash --file-size N_BYTES --secondary-bitstream mydump.bin
108+
109+
To write on secondary flash memory:
110+
111+
.. code-block:: bash
112+
113+
openFPGALoader -b kcu105 -f --target-flash secondary --secondary-bitstream mySecondaryBitstream.bin
114+
115+
Using an alternative directory for *spiOverJtag*
116+
================================================
117+
118+
By setting ``OPENFPGALOADER_SOJ_DIR`` it's possible to override default
119+
*spiOverJtag* bitstreams directory:
120+
121+
.. code-block:: bash
122+
123+
export OPENFPGALOADER_SOJ_DIR=/somewhere
124+
openFPGALoader xxxx
125+
126+
or
127+
128+
.. code-block:: bash
129+
130+
OPENFPGALOADER_SOJ_DIR=/somewhere openFPGALoader xxxx

_sources/guide/first-steps.rst.txt

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
.. _first-steps:
2+
3+
First steps with openFPGALoader
4+
###############################
5+
6+
Install
7+
=======
8+
9+
Packages are available for Linux distributions, Windows (MSYS2) and macOS:
10+
11+
* *Arch Linux*: ``sudo pacman -S openfpgaloader``
12+
13+
* *Fedora*: ``sudo dnf copr enable mobicarte/openFPGALoader; sudo dnf install openFPGALoader``
14+
15+
* *MSYS2*: ``pacman -S mingw-w64-ucrt-x86_64-openFPGALoader``
16+
17+
* *macOS*: ``brew install openfpgaloader``
18+
19+
More instructions for other installation scenarios are available in :ref:`install`.
20+
21+
Programming a development board
22+
===============================
23+
24+
Just simply replace ``my_fpga_board`` with any FPGA board from :ref:`compatibility:boards`
25+
(or ``openFPGALoader --list-boards``) in any of the two commands below, depending on if you want to program the volatile
26+
part of your FPGA (faster but not persistent) or the flash part of your FPGA (slower but persistent):
27+
28+
.. code-block:: bash
29+
30+
openFPGALoader -b my_fpga_board my_bitstream.bit # Program to SRAM
31+
openFPGALoader -b my_fpga_board -f my_bitstream.bit # Program to flash
32+
33+
.. NOTE::
34+
When a bitstream file is compatible with both memory load and FLASH write, the default behavior is to load bitstream
35+
in memory.
36+
37+
Programming an "standalone" FPGA
38+
================================
39+
40+
If your FPGA doesn't come with a built-in programmer or if you prefer to use an external cable, you can specify a cable
41+
to use from :ref:`compatibility:cables` (or ``openFPGALoader --list-cables``):
42+
43+
.. code-block:: bash
44+
45+
openFPGALoader -c my_cable my_bitstream.bit # Program to SRAM
46+
openFPGALoader -c my_cable -f my_bitstream.bit # Program to flash
47+
48+
.. NOTE::
49+
For some cable (like digilent adapters) signals from the converter are not just directly to the FPGA.
50+
For this case, the ``-c`` must be added.
51+
52+
.. HINT::
53+
FTDI/FTDI-compatible cable users: the ``-d`` option lets you specify a specific FTDI device:
54+
55+
.. code-block:: bash
56+
57+
openFPGALoader -d /dev/ttyUSBX
58+
59+
When the ``-d`` option is not provided, openFPGALoader will opens the first FTDI adapter it finds.
60+
Therefore it is preferable to use this flag if your computer is connected to multiple FTDI devices.
61+
62+
Troubleshooting
63+
===============
64+
65+
Please refer to :ref:`troubleshooting`.

0 commit comments

Comments
 (0)