Skip to content

Commit

Permalink
update 318ebca
Browse files Browse the repository at this point in the history
  • Loading branch information
BuildTheDocs authored and BuildTheDocs committed Dec 15, 2024
0 parents commit db703e7
Show file tree
Hide file tree
Showing 71 changed files with 10,765 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 5ee66292091ff32fcf1050388dd8a28f
tags: 645f666f9bcd5a90fca523b33c5a78b7
Empty file added .nojekyll
Empty file.
20 changes: 20 additions & 0 deletions _sources/compatibility/board.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. _compatibility:boards:

Boards
######

.. NOTE::
`arty` can be any of the board names from the first column.

.. code-block:: bash
openFPGALoader -b arty bitstream.bit # Loading in SRAM (volatile)
openFPGALoader -b arty -f bitstream.bit # Writing in flash (non-volatile)
.. include:: boards.inc

* IF: Internal Flash
* EF: External Flash
* AS: Active Serial flash mode
* NA: Not Available
* NT: Not Tested
6 changes: 6 additions & 0 deletions _sources/compatibility/cable.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. _compatibility:cables:

Cables
######

.. include:: cable.inc
11 changes: 11 additions & 0 deletions _sources/compatibility/fpga.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.. _compatibility:fpgas:

FPGAs
#####

.. include:: fpga.inc

* IF: Internal Flash
* AS: Active Serial flash mode
* NA: Not Available
* NT: Not Tested
101 changes: 101 additions & 0 deletions _sources/guide/advanced.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
.. _advanced-usage:

Advanced usage of openFPGALoader
################################

Resetting an FPGA
=================

.. code-block:: bash
openFPGALoader [options] -r
Using negative edge for TDO's sampling
======================================

If transaction are unstable you can try to change read edge by using

.. code-block:: bash
openFPGALoader [options] --invert-read-edge
Reading the bitstream from STDIN
================================

.. code-block:: bash
cat /path/to/bitstream.ext | openFPGALoader --file-type ext [options]
``--file-type`` is required to detect file type.

.. NOTE::
It's possible to load a bitstream through network:

.. code-block:: bash
# FPGA side
nc -lp port | openFPGALoader --file-type xxx [option
# Bitstream side
nc -q 0 host port < /path/to/bitstream.ext
Automatic file type detection bypass
====================================
Default behavior is to use file extension to determine file parser.
To avoid this mechanism ``--file-type type`` must be used.
FT231/FT232 bitbang mode and pins configuration
===============================================
FT232R and ft231X may be used as JTAG programmer.
JTAG communications are emulated in bitbang mode.
To use these devices user needs to provides both the cable and the pin mapping:
.. code-block:: bash
openFPGALoader [options] -cft23XXX --pins=TDI:TDO:TCK:TMS /path/to/bitstream.ext
where:
* ft23XXX may be ``ft232RL`` or ``ft231X``.
* TDI:TDO:TCK:TMS may be the pin ID (0 <= id <= 7) or string value.
allowed values are:
===== ==
value ID
===== ==
TXD 0
RXD 1
RTS 2
CTS 3
DTR 4
DSR 5
DCD 6
RI 7
===== ==
Writing to an arbitrary address in flash memory
===============================================
With FPGA using an external SPI flash (*xilinx*, *lattice ECP5/nexus/ice40*, *anlogic*, *efinix*) option ``-o`` allows
one to write raw binary file to an arbitrary adress in FLASH.
Using an alternative directory for *spiOverJtag*
================================================
By setting ``OPENFPGALOADER_SOJ_DIR`` it's possible to override default
*spiOverJtag* bitstreams directory:
.. code-block:: bash
export OPENFPGALOADER_SOJ_DIR=/somewhere
openFPGALoader xxxx
or
.. code-block:: bash
OPENFPGALOADER_SOJ_DIR=/somewhere openFPGALoader xxxx
65 changes: 65 additions & 0 deletions _sources/guide/first-steps.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
.. _first-steps:

First steps with openFPGALoader
###############################

Install
=======

Packages are available for Linux distributions, Windows (MSYS2) and macOS:

* *Arch Linux*: ``sudo pacman -S openfpgaloader``

* *Fedora*: ``sudo dnf copr enable mobicarte/openFPGALoader; sudo dnf install openFPGALoader``

* *MSYS2*: ``pacman -S mingw-w64-ucrt-x86_64-openFPGALoader``

* *macOS*: ``brew install openfpgaloader``

More instructions for other installation scenarios are available in :ref:`install`.

Programming a development board
===============================

Just simply replace ``my_fpga_board`` with any FPGA board from :ref:`compatibility:boards`
(or ``openFPGALoader --list-boards``) in any of the two commands below, depending on if you want to program the volatile
part of your FPGA (faster but not persistent) or the flash part of your FPGA (slower but persistent):

.. code-block:: bash
openFPGALoader -b my_fpga_board my_bitstream.bit # Program to SRAM
openFPGALoader -b my_fpga_board -f my_bitstream.bit # Program to flash
.. NOTE::
When a bitstream file is compatible with both memory load and FLASH write, the default behavior is to load bitstream
in memory.

Programming an "standalone" FPGA
================================

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
to use from :ref:`compatibility:cables` (or ``openFPGALoader --list-cables``):

.. code-block:: bash
openFPGALoader -c my_cable my_bitstream.bit # Program to SRAM
openFPGALoader -c my_cable -f my_bitstream.bit # Program to flash
.. NOTE::
For some cable (like digilent adapters) signals from the converter are not just directly to the FPGA.
For this case, the ``-c`` must be added.

.. HINT::
FTDI/FTDI-compatible cable users: the ``-d`` option lets you specify a specific FTDI device:

.. code-block:: bash
openFPGALoader -d /dev/ttyUSBX
When the ``-d`` option is not provided, openFPGALoader will opens the first FTDI adapter it finds.
Therefore it is preferable to use this flag if your computer is connected to multiple FTDI devices.

Troubleshooting
===============

Please refer to :ref:`troubleshooting`.
Loading

0 comments on commit db703e7

Please sign in to comment.