Skip to content

Commit 6de471e

Browse files
committed
docs/library/spi_engine: update docs
Inserted documentation for SDI/SDO lane mask registers; Updated Configuration Write Instruction; Updated parameter from NUM_OF_SDI to NUM_OF_SDIO. Signed-off-by: Carlos Souza <carlos.souza@analog.com>
1 parent 4458ec0 commit 6de471e

File tree

6 files changed

+47
-22
lines changed

6 files changed

+47
-22
lines changed

docs/library/spi_engine/axi_spi_engine.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@ If an application attempts to read data while the FIFO is empty undefined data
116116
is returned and the state of the FIFO remains unmodified.
117117
It is possible to read the first entry in the SDI FIFO without removing it by
118118
reading from the SDI_FIFO_PEEK register.
119-
It is important to point out that each read represents one lane of the SPI. So,
120-
for ``NUM_OF_SDI`` lanes it is necessary to read ``NUM_OF_SDI`` times. Reading
119+
It is important to point out that each read represents one active lane of the SPI.
120+
So, for ``N`` active lanes it is necessary to read ``N`` times. Reading
121121
always starts from lane 0.
122122
The number of valid entries in the SDI FIFO register can be queried by reading
123-
the SDI_FIFO_LEVEL register. This value must be a multiple of ``NUM_OF_SDI``.
123+
the SDI_FIFO_LEVEL register. This value must be a multiple of ``NUM_OF_SDIO``.
124124

125125
Data can be inserted into the SDO FIFO by writing to the SDO_FIFO register
126126
**only the valid lanes**. For example, if there are 4 lanes and just 2 of them

docs/library/spi_engine/control-interface.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Signal Pins
7676
- ``sdi_valid``
7777
- Input
7878
- Valid signal of the SDI stream
79-
* - [(NUM_OF_SDI*DATA_WIDTH-1):0]
79+
* - [(NUM_OF_SDIO*DATA_WIDTH-1):0]
8080
- ``sdi_data``
8181
- Input
8282
- Data signal of the SDI stream

docs/library/spi_engine/instruction-format.rst

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ SPI Engine Instruction Set Specification
44
================================================================================
55

66
The SPI Engine instruction set is a 16-bit instruction set of which 13-bits are
7-
currently allocated (bits 15,11,10 are always 0).
7+
currently allocated (bits 15 and 11 are always 0). Bit 10 is only being used by
8+
the :ref:`spi_engine write-configuration-instruction`.
89

910
Instructions
1011
--------------------------------------------------------------------------------
@@ -165,6 +166,8 @@ prescaled).
165166
- Chip-select
166167
- The new chip-select configuration.
167168

169+
.. _spi_engine write-configuration-instruction:
170+
168171
Configuration Write Instruction
169172
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
170173

@@ -192,7 +195,7 @@ Configuration Write Instruction
192195
- 1
193196
- 0
194197
- rv
195-
- rv
198+
- rg
196199
- rg
197200
- rg
198201
- v
@@ -222,10 +225,11 @@ with a new value.
222225
- Register
223226
- Configuration register address:
224227

225-
- 2'b00 = :ref:`spi_engine prescaler-configuration-register`.
226-
- 2'b01 = :ref:`spi_engine spi-configuration-register`.
227-
- 2'b10 = :ref:`spi_engine dynamic-transfer-length-register`.
228-
- 2'b11 = :ref:`spi_engine spi-lane-mask-register`.
228+
- 3'b000 = :ref:`spi_engine prescaler-configuration-register`.
229+
- 3'b001 = :ref:`spi_engine spi-configuration-register`.
230+
- 3'b010 = :ref:`spi_engine dynamic-transfer-length-register`.
231+
- 3'b011 = :ref:`spi_engine sdi-lane-mask-register`.
232+
- 3'b100 = :ref:`spi_engine sdo-lane-mask-register`.
229233
* - v
230234
- Value
231235
- New value for the configuration register.
@@ -471,15 +475,36 @@ bus behavior.
471475
- When 1, data is sampled on the trailing edge and updated on the
472476
leading edge.
473477

478+
.. _spi_engine sdi-lane-mask-register:
479+
480+
SDI Lane Mask Register
481+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
482+
483+
This register configures the SDI mask that defines which lanes are active
484+
(active-high). The user must define a mask that contains up to ``NUM_OF_SDIO``
485+
lanes (the number of activated lanes cannot be bigger than the number of lanes).
486+
For now, it is possible to have up to 8 lanes due to the instruction size.
487+
488+
.. list-table::
489+
:widths: 10 15 50
490+
:header-rows: 1
491+
492+
* - Bits
493+
- Name
494+
- Description
495+
* - [7:0]
496+
- SDI lane mask
497+
- Only bits set to 1 have their respective lane active.
498+
474499

475-
.. _spi_engine spi-lane-mask-register:
500+
.. _spi_engine sdo-lane-mask-register:
476501

477-
SPI Lane Mask Register
502+
SDO Lane Mask Register
478503
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
479504

480-
This register configures the mask that defines which lanes are active
481-
(active-high). The user must define a mask that contains up to ``NUM_OF_SDI``
482-
lanes (the number of activated lanes cannot be bigger than the numer of lanes).
505+
This register configures the SDO mask that defines which lanes are active
506+
(active-high). The user must define a mask that contains up to ``NUM_OF_SDIO``
507+
lanes (the number of activated lanes cannot be bigger than the number of lanes).
483508
For now, it is possible to have up to 8 lanes due to the instruction size.
484509

485510
.. list-table::
@@ -490,7 +515,7 @@ For now, it is possible to have up to 8 lanes due to the instruction size.
490515
- Name
491516
- Description
492517
* - [7:0]
493-
- Lane mask
518+
- SDO lane mask
494519
- Only bits set to 1 have their respective lane active.
495520

496521
.. _spi_engine prescaler-configuration-register:

docs/library/spi_engine/spi_engine_execution.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ Configuration Parameters
4040
* - DATA_WIDTH
4141
- Data width of the parallel data stream. Will define the transaction's
4242
granularity. Supported values: 8/16/24/32
43-
* - NUM_OF_SDI
44-
- Number of multiple SDI lines, (min: 1, max: 8)
43+
* - NUM_OF_SDIO
44+
- Number of multiple SDI/SDO lines, (min: 1, max: 8)
4545

4646
Signal and Interface Pins
4747
--------------------------------------------------------------------------------

docs/library/spi_engine/spi_engine_interconnect.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ Configuration Parameters
4040

4141
* - DATA_WIDTH
4242
- Data width of the parallel SDI/SDO data interfaces.
43-
* - NUM_OF_SDI
44-
- Number of SDI lines on the physical SPI interface.
43+
* - NUM_OF_SDIO
44+
- Number of SDI/SDO lines on the physical SPI interface.
4545

4646

4747
Signal and Interface Pins

docs/library/spi_engine/spi_engine_offload.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ Configuration Parameters
4545
* - DATA_WIDTH
4646
- Data width of the parallel data stream. Will define the transaction's
4747
granularity. Supported values: 8/16/24/32
48-
* - NUM_OF_SDI
49-
- Number of multiple SDI lines, (min: 1, max: 8)
48+
* - NUM_OF_SDIO
49+
- Number of multiple SDI/SDO lines, (min: 1, max: 8)
5050
* - SDO_STREAMING
5151
- Enables the s_axis_sdo interface. This allows for sourcing the SDO data
5252
stream from a DMA or other similar sources, useful for DACs.

0 commit comments

Comments
 (0)