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

Subversion Repositories spi

[/] [spi/] [tags/] [rel_3/] [rtl/] [verilog/] [spi_defines.v] - Blame information for rev 7

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

Line No. Rev Author Line
1 2 simons
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  spi_define.v                                                ////
4
////                                                              ////
5
////  This file is part of the SPI IP core project                ////
6
////  http://www.opencores.org/projects/spi/                      ////
7
////                                                              ////
8
////  Author(s):                                                  ////
9
////      - Simon Srot (simons@opencores.org)                     ////
10
////                                                              ////
11
////  All additional information is avaliable in the Readme.txt   ////
12
////  file.                                                       ////
13
////                                                              ////
14
//////////////////////////////////////////////////////////////////////
15
////                                                              ////
16
//// Copyright (C) 2002 Authors                                   ////
17
////                                                              ////
18
//// This source file may be used and distributed without         ////
19
//// restriction provided that this copyright statement is not    ////
20
//// removed from the file and that any derivative work contains  ////
21
//// the original copyright notice and the associated disclaimer. ////
22
////                                                              ////
23
//// This source file is free software; you can redistribute it   ////
24
//// and/or modify it under the terms of the GNU Lesser General   ////
25
//// Public License as published by the Free Software Foundation; ////
26
//// either version 2.1 of the License, or (at your option) any   ////
27
//// later version.                                               ////
28
////                                                              ////
29
//// This source is distributed in the hope that it will be       ////
30
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
31
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
32
//// PURPOSE.  See the GNU Lesser General Public License for more ////
33
//// details.                                                     ////
34
////                                                              ////
35
//// You should have received a copy of the GNU Lesser General    ////
36
//// Public License along with this source; if not, download it   ////
37
//// from http://www.opencores.org/lgpl.shtml                     ////
38
////                                                              ////
39
//////////////////////////////////////////////////////////////////////
40
 
41
//
42
// Number of bits used for devider register. If used in system with
43
// low frequency of system clock this can be reduced.
44
// Default is 16.
45
//
46
`define SPI_DIVIDER_BIT_NB      16
47
 
48
//
49
// Maximum nuber of bits that can be send/received at once. Alloved values are
50 7 simons
// 64, 32, 16 and 8. SPI_CHAR_LEN_BITS must be also set to 6, 5, 4 or 3 respectively.
51
// Default is 64.
52
// If SPI_MAX_CHAR is 64, SPI_MAX_CHAR_64 must be defined, otherwise comment it
53 2 simons
//
54 7 simons
`define SPI_MAX_CHAR_64         1
55
`define SPI_MAX_CHAR            64
56
`define SPI_CHAR_LEN_BITS       6
57 2 simons
 
58
//
59
// Number of device select signals.
60
//
61
`define SPI_SS_NB               8
62
//
63
// Bits of WISHBONE address used for partial decoding of SPI registers.
64
//
65 7 simons
`define SPI_OFS_BITS              4:2
66 2 simons
 
67
//
68
// Register offset
69
//
70 7 simons
`define SPI_RX_L                0
71
`define SPI_RX_H                1
72
`define SPI_TX_L                0
73
`define SPI_TX_H                1
74
`define SPI_CTRL                2
75
`define SPI_DEVIDE              3
76
`define SPI_SS                  4
77 2 simons
 
78
//
79
// Number of bits in ctrl register
80
//
81 7 simons
`define SPI_CTRL_BIT_NB         11
82 2 simons
 
83
//
84
// Control register bit position
85
//
86 7 simons
`define SPI_CTRL_IE             10
87
`define SPI_CTRL_LSB            9
88
`define SPI_CTRL_CHAR_LEN       8:3
89 2 simons
`define SPI_CTRL_TX_NEGEDGE     2
90
`define SPI_CTRL_RX_NEGEDGE     1
91
`define SPI_CTRL_GO             0
92
 
93
 

powered by: WebSVN 2.1.0

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