OpenCores
URL https://opencores.org/ocsvn/spi_slave/spi_slave/trunk

Subversion Repositories spi_slave

[/] [spi_slave/] [trunk/] [doc/] [src/] [content/] [spec.tex] - Blame information for rev 11

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dkoethe
\chapter{Introduction}
2
This document describe a SPI Slave core designed for the Xilinx EDK. \cite{bib_xilinx_edk}
3
 
4
\section{Features}
5
\begin{itemize}
6
\item OPB-Clock and SPI-Clock are complete independent
7
\item SPI can run faster than OPB if guaranteed that no TX-FIFO Underrunn or RX-FIFO Overrunn occure.
8
\item variable transfer length 2..32
9
\end{itemize}
10
 
11
 
12
 
13
 
14
\section{Limitations}
15
\begin{itemize}
16
\item designed only for Xilinx Spartan-3/Virtex-4 at the moment
17
\item only Slave Operation
18
\end{itemize}
19
 
20
\chapter{Core configuration}
21
\begin{table} [h]
22
        \centering
23 7 dkoethe
                \begin{tabularx} {160mm} {|l|l|c|X|} \hline
24 2 dkoethe
                        Description                                                     & Parameter Name & Allowable Values     & Default Value \\ \hline
25
                        \multicolumn{4} {|c|} {System Parameter} \\ \hline
26
                  Base address for OPB SPI& C\_BASEADDR          & 0x00                                                 & 0x00000000            \\ \hline
27
                  High address for OPB SPI& C\_HIGHADDR          & BASEADDR+0x3F                & BASEADDR+0x3f \\ \hline
28
                  OPB address bus width         & C\_OPB\_AWIDTH & 32                                                           & 32                                            \\ \hline
29
                  OPB data bus width            & C\_OPB\_DWIDTH & 32                                                           & 32                                            \\ \hline
30
                  Target FPGA Family      & C\_FAMILY                    & spartan3,virtex4 & virtex4                   \\ \hline
31
                  \multicolumn{4} {|c|} {User Parameter} \\ \hline
32
                        Shift register width            & C\_SR\_WIDTH   & 8-32                                                 & 8                                                     \\ \hline
33
                        Shift MSB First                           & C\_MSB\_FIRST  & true, false                        & true                          \\ \hline
34
                        SPI Clock Polarity                & C\_CPOL                              & 0,1                                                  &       0                                                        \\ \hline
35
                        SPI Clock Phase                           & C\_CPHA                              & 0,1                                                  &       0                                                        \\ \hline
36
                FIFO Size Width(TX/RX)\footnotemark[1]  & C\_FIFO\_DEPTH & 4-7                                                  &       4                                               \\ \hline
37
                        DMA\_EN                                                   & C\_DMA\_EN           & true, false                  &       false                                   \\ \hline
38 7 dkoethe
                \end{tabularx}
39 2 dkoethe
        \caption{Generics}
40
        \label{tab:Generics}
41
\end{table}
42
 
43
\footnotetext[1]{FIFO depth is $2^{Value}$ =(16,32,64,128)}
44
 
45
 
46
 
47
\chapter{IO-Ports}
48
\begin{table} [h]
49
        \centering
50 7 dkoethe
                \begin{tabularx} {160mm}{|l|l|l|X|} \hline
51 2 dkoethe
                \textbf{Port}           & \textbf{width}        & \textbf{direction}    & \textbf{Description} \\ \hline
52
                SPI\_SCLK                               & 1             & input                 & Serial clock input    \\
53
                SPI\_MOSI                               & 1             & input                 & Master Out Slave in \\
54
                SPI\_MISO                               & 1     & output                & Master in Slave out   \\
55
                SPI\_SS                                 & 1             & input                 & Slave select                          \\ \hline
56
                opb\_irq                                & 1             & output                & IRQ Output                                    \\ \hline
57 7 dkoethe
                \end{tabularx}
58 2 dkoethe
        \caption{external ports}
59
        \label{tab:externalPorts}
60
\end{table}
61
 
62
\chapter{Registers}
63
\section{Adressmap}
64
\begin{table} [!h]
65
        \centering
66 7 dkoethe
                \begin{tabularx} {160mm} {|l|c|c|X|} \hline
67 2 dkoethe
                \textbf{Name}           & \textbf{Adress}       & \textbf{Acess}        & \textbf{Description}                          \\ \hline
68
                SPI\_CR                                 & 0x00                                          & R/W                                                   & SPI Control Register                          \\ \hline
69
                SPI\_SR                                 & 0x04                                          & R/W                                                   & SPI  Status Register                          \\ \hline
70
                SPI\_TD                                 & 0x08                                          & W                                                             & SPI Transmit Data  Register \\ \hline
71
                SPI\_RD                                 & 0x0C                                          & R                                                             & SPI Receive Data  Register    \\ \hline
72
                TX\_THRESH              & 0x10                                          & R/W                                                   & TX-Threshold Prog Full/Emty   \\ \hline
73
                RX\_THRESH                & 0x14                                                & R/W                                                   & RX-Threshold Prog Full/Emty \\ \hline
74
                TX\_DMA\_CTL            & 0x18                                          & R/W                                                   & TX DMA Control                                                        \\ \hline
75
                TX\_DMA\_ADDR           & 0x1C                                          & R/W                                                   & TX DMA Base Adress Offset             \\ \hline
76
                TX\_DMA\_NUM            & 0x20                                          & R/W                                                   & TX DMA Number of Transfers    \\ \hline
77
                RX\_DMA\_CTL            & 0x24                                          & R/W                                                   & RX DMA Control                                                        \\ \hline
78
                RX\_DMA\_ADDR           & 0x28                                          & R/W                                                   & RX DMA Base Adress Offset             \\ \hline
79
                RX\_DMA\_NUM            & 0x2C                                          & R/W                                                   & RX DMA Number of Transfers    \\ \hline
80
 
81
                DGIE                                    & 0x40                                          & R/W                                                   & Device global IRQ Enable Register     \\ \hline
82
                IPISR                                   & 0x44                                          & R/W                                                   & IRQ Status Register                           \\ \hline
83
                IPIER                                   & 0x48                                          & R/W                                                   & IRQ Enable Register                           \\ \hline
84 7 dkoethe
                \end{tabularx}
85 2 dkoethe
        \caption{Address-Map}
86
        \label{tab:registers}
87
\end{table}
88
 
89
\section{SPI\_CR}
90
\begin{table} [!h]
91
        \centering
92 7 dkoethe
                \begin{tabularx} {160mm}{|p{1.5cm}|p{3cm}|p{1.5cm}|p{1.5cm}|X|} \hline
93 2 dkoethe
                \textbf{Bit}            & \textbf{Name} & \textbf{Acess} & \textbf{Reset Value} & \textbf{Description}                          \\ \hline
94
          31                                                    & DGE                                           & R/W                                            & 0                                                                            & Device Global Enable                          \\
95
                                                                        &                                                               &                                                                &                                                                                      & 0: Disable                                                                    \\
96
                                                                        &                                                               &                                                                &                                                                                      & 1: Enable                                                             \\ \hline
97
          30                                                    & TX\_EN                                & R/W                                            & 0                                                                            & Transmit Enable                                               \\
98
                                                                        &                                                               &                                                                &                                                                                      & 0: Disable                                                                    \\
99
                                                                        &                                                               &                                                                &                                                                                      & 1: Enable                                                             \\ \hline
100
          29                                                    & RX\_EN                                & R/W                                            & 0                                                                            & Receive Enable                                                \\
101
                                                                        &                                                               &                                                                &                                                                                      & 0: Disable                                                                    \\
102
                                                                        &                                                               &                                                                &                                                                                      & 1: Enable                                                             \\ \hline
103
          29                                                    & RESET                                 & R/W                                            & 0                                                                            & Reset Device(self cleared)    \\
104
                                                                        &                                                               &                                                                &                                                                                      & 0: Normal Operation                                   \\
105 7 dkoethe
                                                                        &                                                               &                                                                &                                                                                      & 1: Reset SPI-Core(SR/FIFO)  \\ \hline
106
         28..0                                          &       \multicolumn{4} {c|} {reserved} \\ \hline
107
         \end{tabularx}
108 2 dkoethe
        \caption{SPI\_CR Register}
109
        \label{tab:SPI_CR}
110
\end{table}
111
 
112
 
113
\section{SPI\_SR}
114
\begin{table} [!h]
115
        \centering
116 7 dkoethe
                \begin{tabularx} {160mm}{|p{1cm}|p{5cm}|p{1.5cm}|p{1cm}|X|} \hline
117 2 dkoethe
                \textbf{Bit}            & \textbf{Name} & \textbf{Acess} & \textbf{Reset Value} & \textbf{Description}                          \\ \hline
118
          31                                                    & TX Prog Full  & R                                                      & 0                                                                            & Prog Full Flag                                                \\
119
                                                                        &                                                               &                                                                &                                                                                      & 1: FIFO Prog Full                                     \\ \hline
120
          30                                                    & TX Full                               & R                                                      & 0                                                                            & Full Flag                                                             \\
121
                                                                        &                                                               &                                                                &                                                                                      & 1: FIFO Full                                                          \\ \hline
122
          29                                                    & TX Overflow           & R                                                      & 0                                                                            & Overflow Flag                                                         \\
123
                                                                        &                                                               &                                                                &                                                                                      & 1: FIFO Overflow                                              \\
124
                                                                        &                                                               &                                                                &                                                                                      & (Cleared only at Reset)                       \\ \hline
125
          28                                                    & TX Prog Empty & R                                                      & 0                                                                            & Prog Empty Flag                                       \\
126
                                                                        &                                                               &                                                                &                                                                                      & 1: FIFO Prog Empty                                    \\ \hline
127
          27                                                    & TX Empty                      & R                                                      & 0                                                                            & Full Flag                                                             \\
128
                                                                        &                                                               &                                                                &                                                                                      & 1: FIFO Empty                                                         \\ \hline
129
          26                                                    & TX Underflow  & R                                                      & 0                                                                            & Underflow Flag                                                        \\
130
                                                                        &                                                               &                                                                &                                                                                      & 1: FIFO Underflow                                             \\
131
                                                                        &                                                               &                                                                &                                                                                      & (Cleared only at Reset)                       \\ \hline
132
          25                                                    & RX Prog Full  & R                                                      & 0                                                                            & Prog Full Flag                                                \\
133
                                                                        &                                                               &                                                                &                                                                                      & 1: FIFO Prog Full                                     \\ \hline
134
          24                                                    & RX Full                               & R                                                      & 0                                                                            & Full Flag                                                             \\
135
                                                                        &                                                               &                                                                &                                                                                      & 1: FIFO Full                                                          \\ \hline
136
          23                                                    & RX Overflow           & R                                                      & 0                                                                            & Overflow Flag                                                         \\
137
                                                                        &                                                               &                                                                &                                                                                      & 1: FIFO Overflow                                              \\
138
                                                                        &                                                               &                                                                &                                                                                      & (Cleared only at Reset)                       \\ \hline
139
          22                                                    & RX Prog Empty & R                                                      & 0                                                                            & Prog Empty Flag                                       \\
140
                                                                        &                                                               &                                                                &                                                                                      & 1: FIFO Prog Empty                                    \\ \hline
141
          21                                                    & RX Empty                      & R                                                      & 0                                                                            & Full Flag                                                             \\
142
                                                                        &                                                               &                                                                &                                                                                      & 1: FIFO Empty                                                         \\ \hline
143
          20                                                    & RX Underflow  & R                                                      & 0                                                                            & Underflow Flag                                                        \\
144
                                                                        &                                                               &                                                                &                                                                                      & 1: FIFO Underflow                                             \\
145
                                                                        &                                                               &                                                                &                                                                                      & (Cleared only at Reset)                       \\ \hline
146
          19                                                    & Chip Select   & R                                                      & 0                                                                            & Chip Select Flag                                              \\
147
                                                                        &                                                               &                                                                &                                                                                      & 0: CS\_N Low                                                          \\
148
                                                                        &                                                               &                                                                &                                                                                      & 1: CS\_N High                                                         \\ \hline
149
          18                                                    & TX DMA Done   & R                                                      & 0                                                                            & Transmit DMA done                                             \\
150
                                                                        &                                                               &                                                                &                                                                                      & 0: TX DMA in progress                         \\
151 7 dkoethe
                                                                        &                                                               &                                                                &                                                                                      & 1: TX DMA all Transfers done\\ \hline
152
          17                                                    & RX DMA Done   & R                                                      & 0                                                                            & Receive DMA done                                              \\
153 2 dkoethe
                                                                        &                                                               &                                                                &                                                                                      & 0: RX DMA in progress                         \\
154
                                                                        &                                                               &                                                                &                                                                                      & 1: RX DMA all Transfers done\\ \hline
155 7 dkoethe
                16:0                                            &       \multicolumn{4} {c|} {reserved} \\ \hline                                                                                                                                                                                                                                               \end{tabularx}
156 2 dkoethe
        \caption{SPI\_SR Register}
157
        \label{tab:SPI_SR}
158
\end{table}
159
 
160
\section{TX\_THRESH}
161
\begin{table}[!h]
162
        \centering
163 7 dkoethe
                \begin{tabularx} {160mm}{|p{1cm}|p{5cm}|p{1.5cm}|p{1cm}|X|} \hline
164 2 dkoethe
                \textbf{Bit}            & \textbf{Name} & \textbf{Acess} & \textbf{Reset}                               & \textbf{Description}                          \\
165
                                                                                &                                                               &                                                                & \textbf{Value}                               &                                                                                                                       \\ \hline
166 7 dkoethe
          31:16                                         & TX\_THRESH\_PROG\_FULL        & R/W    & 0                                                                            & Transmit Prog Full Threshold\\
167 2 dkoethe
                                                                        &                                                               &                                                                &                                                                                      & [1..$2^{C\_FIFO\_DEPTH}-2$]   \\ \hline
168 7 dkoethe
          15:0                                          & TX\_THRESH\_PROG\_EMPTY       & R/W    & 0                                                                            & Transmit Prog Empty   Threshold\\
169 2 dkoethe
                                                                        &                                                               &                                                                &                                                                                      & [1..$2^{C\_FIFO\_DEPTH}-2$]   \\ \hline
170 7 dkoethe
        \end{tabularx}
171 2 dkoethe
        \caption{TX\_THRESH Register}
172
        \label{tab:TX_THRESH}
173
\end{table}
174
 
175 7 dkoethe
This Register sets the Almost Full and Empty Flag Thresholds for Transmit FIFO. IF the DMA-Engine is used, the TX\_THRESH\_PROG\_EMPTY is used to trigger the DMA-Transfer. If Transmit FIFO is Almost Empty the Engine fills the FIFO with 16 Words(4..32bit). If the OPB-Bus is at medium or full load, increase Almost Empty Threshold to ensure there are ''some bytes reserve'' in Fifo until the DMA-Engine has access to the bus and can start transfer. Under light load condition a value of 4 should sufficient.
176 2 dkoethe
 
177 7 dkoethe
 
178 2 dkoethe
\section{RX\_THRESH}
179
\begin{table}[!h]
180
        \centering
181 7 dkoethe
                \begin{tabularx} {160mm}{|p{1cm}|p{5cm}|p{1.5cm}|p{1cm}|X|} \hline
182 2 dkoethe
                \textbf{Bit}            & \textbf{Name} & \textbf{Acess} & \textbf{Reset}                               & \textbf{Description}                          \\
183
                                                                                &                                                               &                                                                & \textbf{Value}                               &                                                                                                                       \\ \hline
184 7 dkoethe
          31:16                                         & RX\_THRESH\_PROG\_FULL        & R/W    & 0                                                                            & Receive Prog Full Threshold   \\
185 2 dkoethe
                                                                        &                                                               &                                                                &                                                                                      & [1..$2^{C\_FIFO\_DEPTH}-2$] \\ \hline
186 7 dkoethe
          15:0                                          & RX\_THRESH\_PROG\_EMPTY       & R/W    & 0                                                                            & Receive Prog Empty Threshold\\
187
                                                                        &                                                               &                                                                &                                                                                      & [1..$2^{C\_FIFO\_DEPTH}-2$] \\ \hline                                 \end{tabularx}
188 2 dkoethe
        \caption{RX\_THRESH Register}
189
        \label{tab:RX_THRESH}
190
\end{table}
191
 
192 7 dkoethe
This Register sets the Almost Full and Empty Flag Thresholds for Receive FIFO. IF the DMA-Engine is used, the RX\_THRESH\_PROG\_FULL is used to trigger the DMA-Transfer. Normally set this Threshold to the block size of 16. If the OPB-Bus is at medium or full load, increase the FIFO Size(C\_FIFO\_WIDTH) to ensure there are 'some bytes free'' in FIFO until overflow occurs.
193 2 dkoethe
 
194 7 dkoethe
 
195
\section{TX\_DMA\_CTL}
196 2 dkoethe
\begin{table} [!h]
197
        \centering
198 7 dkoethe
                \begin{tabularx} {160mm}{|p{1cm}|p{5cm}|p{1.5cm}|p{1cm}|X|} \hline
199 2 dkoethe
                \textbf{Bit}            & \textbf{Name} & \textbf{Acess} & \textbf{Reset Value} & \textbf{Description}                          \\ \hline
200 7 dkoethe
          31                                                    & TX\_DMA\_EN     & R/W                                          & 0                                                                            & Transmit DMA Enable                                   \\
201 2 dkoethe
                                                                        &                                                               &                                                                &                                                                                      & 0: Disable                                                                    \\
202
                                                                        &                                                               &                                                                &                                                                                      & 1: Enable                                                             \\ \hline
203 7 dkoethe
                29:0                                            &       \multicolumn{4} {c|} {reserved} \\ \hline                                                                                                                                                                                                                                               \end{tabularx}
204
        \caption{TX\_DMA\_CTL Register}
205
        \label{tab:tx_dma_ctl}
206 2 dkoethe
\end{table}
207 7 dkoethe
This Register is only available if C\_DMA\_EN is set.
208
Set the Bit TX\_DMA\_EN to 1 to enable the Transmit DMA Engine. With Engine Start the Register TX\_DMA\_ADDR and TX\_DMA\_NUM are copied to internal register. Do not change this Registers if DMA Enable set.
209 2 dkoethe
 
210 7 dkoethe
\section{TX\_DMA\_ADDR}
211
\begin{table} [!h]
212
        \centering
213
                \begin{tabularx} {160mm}{|p{1cm}|p{5cm}|p{1.5cm}|p{1cm}|X|} \hline
214
                \textbf{Bit}            & \textbf{Name} & \textbf{Acess} & \textbf{Reset Value} & \textbf{Description}                          \\ \hline
215
          31:0                                          & TX\_DMA\_Adr  & R/W                                            & 0                                                                            & Transmit DMA Base Adress              \\ \hline
216
        \end{tabularx}
217
        \caption{TX\_DMA\_ADDR Register}
218
        \label{tab:tx_dma_addr}
219
\end{table}
220
 
221
This Register is only available if C\_DMA\_EN is set. With this Register the Base-Adress of the TX-DMA is set. The Adress must 4 Byte aligned. Remark: For this memory area the Data-Chache of the Microblaze can be enabled, because the Cache is a Write-True type. Using a controller with write-back cache only the first write will written in memory, the second only in the internal cache.
222
 
223
\section{TX\_DMA\_NUM}
224
\begin{table} [!h]
225
        \centering
226
                \begin{tabularx} {160mm}{|p{1cm}|p{5cm}|p{1.5cm}|p{1cm}|X|} \hline
227
                \textbf{Bit}            & \textbf{Name} & \textbf{Acess} & \textbf{Reset Value} & \textbf{Description}                          \\ \hline
228 11 dkoethe
          31:8                                          & TX\_DMA\_LEN  & R/W                                            & 0                                                                            & TX DMA Number of Block Transfers              \\ \hline
229
                7:0                                               &     \multicolumn{4} {c|} {reserved} \\ \hline
230 7 dkoethe
        \end{tabularx}
231
        \caption{TX\_DMA\_NUM Register}
232
        \label{tab:tx_dma_len}
233
\end{table}
234
This Register is only available if C\_DMA\_EN is set. The Register set the Number of Blocktransfers. If all transfers done, the IRQ TX DMA Done asserted. The block size of the DMA is 16. A system configured with C\_SR\_WIDTH = 8 transfers 16 Bytes, if C\_SR\_WIDTH=32 64 Bytes are written to or read from the memory in one DMA-Cycle.
235
 
236
\section{RX\_DMA\_CTL}
237
\begin{table} [!h]
238
        \centering
239
                \begin{tabularx} {160mm}{|p{1cm}|p{5cm}|p{1.5cm}|p{1cm}|X|} \hline
240
                \textbf{Bit}            & \textbf{Name} & \textbf{Acess} & \textbf{Reset Value} & \textbf{Description}                          \\ \hline
241
          31                                                    & RX\_DMA\_EN     & R/W                                          & 0                                                                            & Transmit DMA Enable                                   \\
242
                                                                        &                                                               &                                                                &                                                                                      & 0: Disable                                                                    \\
243
                                                                        &                                                               &                                                                &                                                                                      & 1: Enable                                                             \\ \hline
244
                29:0                                            &       \multicolumn{4} {c|} {reserved} \\ \hline                                                                                                                                                                                                                                               \end{tabularx}
245
        \caption{RX\_DMA\_CTL Register}
246
        \label{tab:RX_dma_ctl}
247
\end{table}
248
 
249
This Register is only available if C\_DMA\_EN is set. See Register TX\_DMA\_CTL for Description.
250
 
251
 
252
\section{RX\_DMA\_ADDR}
253
\begin{table} [!h]
254
        \centering
255
                \begin{tabularx} {160mm}{|p{1cm}|p{5cm}|p{1.5cm}|p{1cm}|X|} \hline
256
                \textbf{Bit}            & \textbf{Name} & \textbf{Acess} & \textbf{Reset Value} & \textbf{Description}                          \\ \hline
257
          31:0                                          & RX\_DMA\_Adr  & R/W                                            & 0                                                                            & Transmit DMA Base Adress              \\ \hline
258
        \end{tabularx}
259
        \caption{RX\_DMA\_ADDR Register}
260
        \label{tab:RX_dma_addr}
261
\end{table}
262
 
263
This Register is only available if C\_DMA\_EN is set. See Register TX\_DMA\_ADDR for Description.
264
\newline
265
\fbox{\parbox{160mm} {Remark: Check RX\_DMA\_ADDR that is set to the right memory section. If wrong set, program-Code or date overwritten with SPI-Data!}}
266
 
267
\section{RX\_DMA\_NUM}
268
\begin{table} [!h]
269
        \centering
270
                \begin{tabularx} {160mm}{|p{1cm}|p{5cm}|p{1.5cm}|p{1cm}|X|} \hline
271
                \textbf{Bit}            & \textbf{Name} & \textbf{Acess} & \textbf{Reset Value} & \textbf{Description}                          \\ \hline
272 11 dkoethe
          31:8                                          & RX\_DMA\_LEN  & R/W                                            & 0                                                                            & RX DMA Number of Block Transfers              \\ \hline
273
                7:0                                                     & \multicolumn{4} {c|} {reserved} \\ \hline
274 7 dkoethe
        \end{tabularx}
275
        \caption{RX\_DMA\_NUM Register}
276
        \label{tab:RX_dma_len}
277
\end{table}
278
 
279
This Register is only available if C\_DMA\_EN is set. See Register TX\_DMA\_NUM for Description.
280
 
281 2 dkoethe
\section{IPISR}
282
\begin{table} [!h]
283
        \centering
284 7 dkoethe
                \begin{tabularx} {160mm}{|p{1cm}|p{5cm}|p{1.5cm}|p{1cm}|X|} \hline
285 2 dkoethe
                \textbf{Bit}            & \textbf{Name} & \textbf{Acess} & \textbf{Reset Value} & \textbf{Description}                          \\ \hline
286
          31                                                    & TX\_Prog\_Empty & R/ToW\footnotemark[1]        & 0                                                                            & IRQ Prog Empty Flag                   \\ \hline
287
          29                                                    & TX\_Empty                     & R/ToW                                  & 0                                                                            & IRQ Full Flag                                                         \\ \hline
288
          28                                                    & RX\_Prog\_Full& R/ToW                                  & 0                                                                            & IRQ Prog Full Flag                            \\ \hline
289
          27                                                    & RX\_Full                      & R/ToW                                  & 0                                                                            & IRQ Full Flag                                                         \\ \hline
290
          26                                                    & SS\_FALL                      & R/ToW                                  & 0                                                                            & IRQ SS FALL Flag                                              \\ \hline
291
          25                                                    & SS\_RISE                      & R/ToW                                  & 0                                                                            & IRQ SS RISE Flag                                              \\ \hline
292 7 dkoethe
                24..0                                           &       \multicolumn{4} {c|} {reserved} \\ \hline                                                                                                                                                                                                                                               \end{tabularx}
293 2 dkoethe
        \caption{IPISR Register}
294
        \label{tab:IPISR}
295
\end{table}
296
 
297
\footnotetext[1]{Read and ToggleOnWrite (writing 1 clears the bit)}
298
 
299
\section{IPISE}
300
\begin{table} [!h]
301
        \centering
302 7 dkoethe
                \begin{tabularx} {160mm}{|p{1cm}|p{5cm}|p{1.5cm}|p{1cm}|X|} \hline
303 2 dkoethe
                \textbf{Bit}            & \textbf{Name}                 & \textbf{Acess} & \textbf{Reset Value} & \textbf{Description}                          \\ \hline
304
          31                                                    & TX\_Prog\_Empty       & R/W                                            & 0                                                                              & IRQ Prog Empty Enable               \\ \hline
305
          29                                                    & TX\_Empty                                     & R/W                                            & 0                                                                            & IRQ Full Enable                                                       \\ \hline
306
          28                                                    & RX\_Prog\_Full                & R/W                                            & 0                                                                            & IRQ Prog Full Enable                          \\ \hline
307
          27                                                    & RX\_Full                                      & R/W                                            & 0                                                                            & IRQ Full Enable                                                       \\ \hline
308
          26                                                    & SS\_FALL                              & R/W                                            & 0                                                                            & IRQ SS FALL Enable                                    \\ \hline
309
          25                                                    & SS\_RISE                                      & R/W                                            & 0                                                                            & IRQ SS RISE Enable                              \\ \hline
310
          24                                                    & TX\_DMA\_DONE                 & R/W                                            & 0                                                                            & IRQ TX Transfer done  Enable\\ \hline
311 7 dkoethe
          23                                                    & TX\_DMA\_DONE                 & R/W                                            & 0                                                                            & IRQ RX Transfer done  Enable\\ \hline
312
          22..0                                  &      \multicolumn{4} {c|} {reserved} \\ \hline                                                                                                                                                                                                                                               \end{tabularx}
313 2 dkoethe
        \caption{IPISE Register}
314
        \label{tab:IPISE}
315
\end{table}
316
 
317
 
318
\chapter{System Integration}
319
To integrate this IP-Core in your System, unzip the opb\_spi\_slave.zip to your project-directory. Then Rescan the user repository with \textit{Project $\rightarrow$ Rescan User Repositories}. This will take some seconds. After this you find the core in the \textit{IP Catalog $\rightarrow$ Project Repository}.
320
 
321
\section{MPD-File}
322
\begin{verbatim}
323
BEGIN opb_spi_slave
324
 PARAMETER INSTANCE = opb_spi_slave_0
325
 PARAMETER HW_VER = 1.00.a
326
 PARAMETER C_BASEADDR = 0x7d600000
327
 PARAMETER C_HIGHADDR = 0x7d60ffff
328
 BUS_INTERFACE MSOPB = mb_opb
329
 PORT sclk = opb_spi_slave_0_sclk
330
 PORT ss_n = opb_spi_slave_0_ss_n
331
 PORT mosi = opb_spi_slave_0_mosi
332
 PORT miso = opb_spi_slave_0_miso
333
 PORT opb_irq = opb_spi_slave_0_opb_irq
334
END
335
\end{verbatim}
336
 
337
\section{UCF-File}
338
\begin{verbatim}
339
# assign I/O Pins
340
NET opb_spi_slave_0_sclk_pin LOC= AA24; # must CC capable IO in virtex-4
341
NET opb_spi_slave_0_ss_n_pin LOC= V20;
342
NET opb_spi_slave_0_mosi_pin LOC= AC25;
343
NET opb_spi_slave_0_miso_pin LOC= AC24;
344
NET opb_spi_slave_0_miso_pin SLEW = FAST;
345
 
346
#### Module OPB_SPI_Slave constraints
347
Net opb_spi_slave_0_sclk_pin TNM_NET = spi_clk;
348
TIMESPEC TS_spi_clk = PERIOD spi_clk 40 ns;
349
 
350
NET "opb_spi_slave_0_mosi_pin" TNM = "spi_in";
351
#NET "opb_spi_slave_0_cs_n_pin" TNM = "spi_in";
352
TIMEGRP "spi_in" OFFSET = IN 5 ns VALID 10 ns BEFORE "opb_spi_slave_0_sclk_pin" HIGH ;
353
 
354
NET "opb_spi_slave_0_miso_pin" TNM = "spi_out";
355
TIMEGRP "spi_out" OFFSET = OUT 14 ns AFTER "opb_spi_slave_0_sclk_pin" LOW ;
356
\end{verbatim}
357
 
358
\section{Register Header}
359
 
360
\verbatiminput{opb_spi_slave.h}
361
 
362
 
363
\chapter{Operations}
364
 
365 7 dkoethe
 
366 2 dkoethe
\chapter{Architecture}
367
 
368
\begin{figure}[h]
369
        \centering
370
                \includegraphics[width=1.00\textwidth]{Grafik/block_diagramm}
371
        \caption{Blockdiagramm}
372
        \label{fig:blockdiagramm}
373
\end{figure}
374
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.