File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ if(Sphinx_FOUND)
1313 "${CMAKE_CURRENT_LIST_DIR } /src/assets/wishbone-write.svg"
1414 "${CMAKE_CURRENT_LIST_DIR } /src/assets/traceability.svg"
1515 "${CMAKE_CURRENT_LIST_DIR } /src/index.rst"
16+ "${CMAKE_CURRENT_LIST_DIR } /src/guide/registers.rst"
17+ "${CMAKE_CURRENT_LIST_DIR } /src/spec/content/spi_cr.rst"
18+ "${CMAKE_CURRENT_LIST_DIR } /src/spec/content/spi_rxdr.rst"
19+ "${CMAKE_CURRENT_LIST_DIR } /src/spec/content/spi_sr.rst"
20+ "${CMAKE_CURRENT_LIST_DIR } /src/spec/content/spi_txdr.rst"
1621 "${CMAKE_CURRENT_LIST_DIR } /src/spec/index.rst"
1722 "${CMAKE_CURRENT_LIST_DIR } /src/spec/1_introduction.rst"
1823 "${CMAKE_CURRENT_LIST_DIR } /src/spec/2_overall-description.rst"
Original file line number Diff line number Diff line change @@ -14,3 +14,40 @@ Memory Map and Registers
1414 - Reset value
1515 - Section/page
1616
17+ * - 0000_0000h
18+ - Status register (SPI_SR)
19+ - 32
20+ - R
21+ - 0000_0000h
22+ - :ref: `SPI_SR <GUIDE_SPI_SR >`
23+ * - 0000_0004h
24+ - Control register (SPI_CR)
25+ - 32
26+ - R/W
27+ - 0000_0000h
28+ - :ref: `SPI_CR <GUIDE_SPI_CR >`
29+ * - 0000_0008h
30+ - Receive Data register (SPI_RXDR)
31+ - 32
32+ - R
33+ - 0000_0000h
34+ - :ref: `SPI_RXDR <GUIDE_SPI_RXDR >`
35+ * - 0000_000Ch
36+ - Transmit Data register (SPI_TXDR)
37+ - 32
38+ - W
39+ - 0000_0000h
40+ - :ref: `SPI_TXDR <GUIDE_SPI_TXDR >`
41+
42+ .. _GUIDE_SPI_SR :
43+ .. include :: ../spec/content/spi_sr.rst
44+
45+ .. _GUIDE_SPI_CR :
46+ .. include :: ../spec/content/spi_cr.rst
47+
48+ .. _GUIDE_SPI_RXDR :
49+ .. include :: ../spec/content/spi_rxdr.rst
50+
51+ .. _GUIDE_SPI_TXDR :
52+ .. include :: ../spec/content/spi_txdr.rst
53+
Original file line number Diff line number Diff line change @@ -142,6 +142,55 @@ Memory-mapped registers
142142
143143 The following registers shall be implemented and accessible through the wishbone memory interface.
144144
145+ .. list-table ::
146+ :header-rows: 1
147+ :widths: 1 94 1 1 1 1
148+
149+ * - Address Offset
150+ - Register name
151+ - Width (in bits)
152+ - Access
153+ - Reset value
154+ - Section/page
155+
156+ * - 0000_0000h
157+ - Status register (SPI_SR)
158+ - 32
159+ - R
160+ - 0000_0000h
161+ - :ref: `SPI_SR <GUIDE_SPI_SR >`
162+ * - 0000_0004h
163+ - Control register (SPI_CR)
164+ - 32
165+ - R/W
166+ - 0000_0000h
167+ - :ref: `SPI_CR <GUIDE_SPI_CR >`
168+ * - 0000_0008h
169+ - Receive Data register (SPI_RXDR)
170+ - 32
171+ - R
172+ - 0000_0000h
173+ - :ref: `SPI_RXDR <GUIDE_SPI_RXDR >`
174+ * - 0000_000Ch
175+ - Transmit Data register (SPI_TXDR)
176+ - 32
177+ - W
178+ - 0000_0000h
179+ - :ref: `SPI_TXDR <GUIDE_SPI_TXDR >`
180+
181+ .. _GUIDE_SPI_SR :
182+ .. include :: ../spec/content/spi_sr.rst
183+
184+ .. _GUIDE_SPI_CR :
185+ .. include :: ../spec/content/spi_cr.rst
186+
187+ .. _GUIDE_SPI_RXDR :
188+ .. include :: ../spec/content/spi_rxdr.rst
189+
190+ .. _GUIDE_SPI_TXDR :
191+ .. include :: ../spec/content/spi_txdr.rst
192+
193+
145194Non-functional Requirements
146195---------------------------
147196
Original file line number Diff line number Diff line change 1+ Control register (SPI_CR)
2+ """"""""""""""""""""""""""
3+
4+ SPI_CR contains the control for selecting the SPI frequency and controlling the chip select.
5+
6+ .. bitfield ::
7+ :bits: 32
8+ :lanes: 2
9+ :vspace: 70
10+ :hspace: 700
11+
12+ [
13+ { "name": "CS", "bits": 1},
14+ { "name": "reserved", "bits": 15, "type": 1},
15+ { "name": "PRESCALER", "bits": 16}
16+ ]
17+
18+ |
19+
20+ .. list-table ::
21+ :header-rows: 1
22+ :widths: 1 1 99
23+
24+ * - Position
25+ - Field
26+ - Description
27+
28+ * - 31-16
29+ - Prescaler
30+ - *SPI frequency selector *
31+
32+ The specified SPI frequency is f_spi = (f_sys / (2 * prescaler)).
33+ * - 15-1
34+ - reserved
35+ - *This field is reserved. *
36+
37+ This read-only field is reserved and always has the value 0.
38+ * - 0
39+ - CS
40+ - *Active-high Chip select *
41+
42+ 0 |tab | Chip-select disabled
43+
44+ 1 |tab | Chip-select enabled
Original file line number Diff line number Diff line change 1+ Receive Data register (SPI_RXDR)
2+ """""""""""""""""""""""""""""""""
3+
4+ .. bitfield ::
5+ :bits: 32
6+ :lanes: 2
7+ :vspace: 70
8+ :hspace: 700
9+
10+ [
11+ { "name": "RXD", "bits": 8},
12+ { "name": "reserved", "bits": 24, "type": 1}
13+ ]
14+
15+ |
16+
17+ .. list-table ::
18+ :header-rows: 1
19+ :widths: 1 1 99
20+
21+ * - Position
22+ - Field
23+ - Description
24+
25+ * - 31-8
26+ - reserved
27+ - *This field is reserved. *
28+
29+ This read-only field is reserved and always has the value 0.
30+ * - 7-0
31+ - RXD
32+ - *Receive Data *
33+
34+ The received data is written to this field.
35+
36+ The field is cleared by hardware after being read.
Original file line number Diff line number Diff line change 1+ Status register (SPI_SR)
2+ """""""""""""""""""""""""
3+
4+ .. bitfield ::
5+ :bits: 32
6+ :lanes: 2
7+ :vspace: 70
8+ :hspace: 700
9+
10+ [
11+ { "name": "TXE", "bits": 1},
12+ { "name": "reserved", "bits": 31, "type": 1}
13+ ]
14+
15+ |
16+
17+ .. list-table ::
18+ :header-rows: 1
19+ :widths: 1 1 99
20+
21+ * - Position
22+ - Field
23+ - Description
24+
25+ * - 31-1
26+ - Reserved
27+ - *This field is reserved. *
28+
29+ This read-only field is reserved and always has the value 0.
30+ * - 0
31+ - TXE
32+ - *Transmit register Empty *
33+
34+ 0 |tab | The transmit register is full (being sent)
35+
36+ 1 |tab | The transmit register is empty
Original file line number Diff line number Diff line change 1+ Transmit Data register (SPI_TXDR)
2+ """"""""""""""""""""""""""""""""""
3+
4+ .. bitfield ::
5+ :bits: 32
6+ :lanes: 2
7+ :vspace: 70
8+ :hspace: 700
9+
10+ [
11+ { "name": "TXD", "bits": 8},
12+ { "name": "reserved", "bits": 24, "type": 1}
13+ ]
14+
15+ |
16+
17+ .. list-table ::
18+ :header-rows: 1
19+ :widths: 1 1 99
20+
21+ * - Position
22+ - Field
23+ - Description
24+
25+ * - 31-8
26+ - reserved
27+ - *This field is reserved. *
28+ * - 7-0
29+ - TXD
30+ - *Transmit Data *
31+
32+ Data written to this field is sent through the serial link.
33+
34+ The TXE field of the SPI_SR shall be sample before writing again to this field to prevent data loss.
You can’t perform that action at this time.
0 commit comments