Skip to content

Commit aa29487

Browse files
committed
docs: add a hint about file processing order
1 parent 2864ced commit aa29487

File tree

2 files changed

+25
-12
lines changed

2 files changed

+25
-12
lines changed

docs/basic.rst

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@ Basic usage
44
Project Configuration
55
---------------------
66

7-
The first steps involve importing the necessary module to support the desired tool and instantiating the corresponding *class*:
7+
The first steps involve importing the necessary module to support the desired tool and instantiating the corresponding ``class``:
88

99
.. code-block:: python
1010
1111
from pyfpga.vivado import Vivado
1212
1313
prj = Vivado('PRJNAME', odir='OUTDIR')
1414
15-
In the example, we are using Vivado, specifying the optional parameter *project name* (*tool name* if omitted) and *output directory* (*results* by default).
15+
In the example, we are using Vivado, specifying the optional parameters
16+
``project name`` (``tool name`` if omitted) and ``output directory``
17+
(``results`` by default).
1618

1719
Next step is to specify the target FPGA device:
1820

@@ -32,9 +34,8 @@ HDL source files are added using one of the following methods:
3234
prj.add_vlog('PATH_TO_FILES_GLOB_COMPATIBLE')
3335
prj.add_slog('PATH_TO_FILES_GLOB_COMPATIBLE')
3436
35-
In these methods, you provide a path to the files. The path can include wildcards (like `*.vhdl`), allowing you to match multiple files at once.
36-
37-
For `add_vhdl`, you can also optionally specify a library name where the files will be included.
37+
In these methods, you provide a path to the files. The path can include wildcards (like ``*.vhdl``), allowing you to match multiple files at once.
38+
In case of ``add_vhdl``, you can also optionally specify a library name where the files will be included.
3839

3940
.. note::
4041

@@ -43,6 +44,15 @@ For `add_vhdl`, you can also optionally specify a library name where the files w
4344
.. _glob: https://docs.python.org/3/library/glob.html
4445
.. _Path: https://docs.python.org/3/library/pathlib.html
4546

47+
.. hint::
48+
49+
Files are processed in the order they are added. If a file is specified more than once,
50+
it is removed from its previous position and placed at the end of the list.
51+
This allows you to ensure that a file is processed after others when necessary
52+
(e.g., placing a top-level at the end) or to customize options
53+
(e.g., removing a VHDL library specification in case of a top-level)
54+
when multiple files are added using a wildcard.
55+
4656
Generics/parameters can be specified with:
4757

4858
.. code-block:: python
@@ -82,7 +92,8 @@ After configuring the project, you can run the following to generate a bitstream
8292
8393
prj.make()
8494
85-
By default, this method performs *project creation*, *synthesis*, *place and route*, and *bitstream generation*.
95+
By default, this method performs **project creation**, **synthesis**, **place and route**,
96+
and **bitstream generation**.
8697
However, you can optionally specify both the initial and final stages, as follows:
8798

8899
.. code-block:: python
@@ -100,7 +111,8 @@ However, you can optionally specify both the initial and final stages, as follow
100111

101112
.. note::
102113

103-
After executing this method, you will find the file `<TOOL>.tcl` (or `sh` in some cases) in the output directory.
114+
After executing this method, you will find the file ``<TOOL>.tcl``
115+
(``<TOOL>.sh`` in some cases) in the output directory.
104116
For debugging purposes, if things do not work as expected, you can review this file.
105117

106118
Bitstream programming
@@ -112,13 +124,14 @@ The final step is programming the FPGA:
112124
113125
prj.prog('BITSTREAM', 'POSITION')
114126
115-
Both `BITSTREAM` and `POSITION` are optional.
116-
If `BITSTREAM` is not specified, PyFPGA will attempt to discover it based on project information.
117-
The `POSITION` parameter is not always required (depends on the tool being used).
127+
Both ``BITSTREAM`` and ``POSITION`` are optional.
128+
If ``BITSTREAM`` is not specified, PyFPGA will attempt to discover it based on project information.
129+
The ``POSITION`` parameter is not always required (depends on the tool being used).
118130

119131
.. note::
120132

121-
After executing this method, you will find the file `<TOOL>prog.tcl` (or `sh` in some cases) in the output directory.
133+
After executing this method, you will find the file ``<TOOL>prog.tcl``
134+
(``<TOOL>-prog.sh`` in some cases) in the output directory.
122135
For debugging purposes, if things do not work as expected, you can review this file.
123136

124137
Debugging

docs/extending.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Extending
33

44
.. note::
55

6-
All <TOOL> classes inherit from project.py.
6+
All <TOOL> classes inherit from ``Project`` (``project.py``).
77

88
This is a guide on how to add support for a new TOOL.
99

0 commit comments

Comments
 (0)