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

Subversion Repositories ac97

[/] [ac97/] [trunk/] [rtl/] [verilog/] [ac97_defines.v] - Blame information for rev 12

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

Line No. Rev Author Line
1 4 rudi
/////////////////////////////////////////////////////////////////////
2
////                                                             ////
3
////  WISHBONE AC 97 Controller Definitions                      ////
4
////                                                             ////
5
////                                                             ////
6
////  Author: Rudolf Usselmann                                   ////
7
////          rudi@asics.ws                                      ////
8
////                                                             ////
9
////                                                             ////
10
////  Downloaded from: http://www.opencores.org/cores/ac97_ctrl/ ////
11
////                                                             ////
12
/////////////////////////////////////////////////////////////////////
13
////                                                             ////
14
//// Copyright (C) 2001 Rudolf Usselmann                         ////
15
////                    rudi@asics.ws                            ////
16
////                                                             ////
17
//// This source file may be used and distributed without        ////
18
//// restriction provided that this copyright statement is not   ////
19
//// removed from the file and that any derivative work contains ////
20
//// the original copyright notice and the associated disclaimer.////
21
////                                                             ////
22
////     THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY     ////
23
//// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED   ////
24
//// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS   ////
25
//// FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR      ////
26
//// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,         ////
27
//// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES    ////
28
//// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE   ////
29
//// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR        ////
30
//// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF  ////
31
//// LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT  ////
32
//// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT  ////
33
//// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE         ////
34
//// POSSIBILITY OF SUCH DAMAGE.                                 ////
35
////                                                             ////
36
/////////////////////////////////////////////////////////////////////
37
 
38
//  CVS Log
39
//
40 12 rudi
//  $Id: ac97_defines.v,v 1.4 2002-03-11 03:21:22 rudi Exp $
41 4 rudi
//
42 12 rudi
//  $Date: 2002-03-11 03:21:22 $
43
//  $Revision: 1.4 $
44 4 rudi
//  $Author: rudi $
45
//  $Locker:  $
46
//  $State: Exp $
47
//
48
// Change History:
49
//               $Log: not supported by cvs2svn $
50 12 rudi
//               Revision 1.3  2002/03/05 04:44:05  rudi
51
//
52
//               - Fixed the order of the thrash hold bits to match the spec.
53
//               - Many minor synthesis cleanup items ...
54
//
55 10 rudi
//               Revision 1.2  2001/08/10 08:09:42  rudi
56
//
57
//               - Removed RTY_O output.
58
//               - Added Clock and Reset Inputs to documentation.
59
//               - Changed IO names to be more clear.
60
//               - Uniquifyed define names to be core specific.
61
//
62 6 rudi
//               Revision 1.1  2001/08/03 06:54:49  rudi
63
//
64
//
65
//               - Changed to new directory structure
66
//
67 4 rudi
//               Revision 1.1.1.1  2001/05/19 02:29:14  rudi
68
//               Initial Checkin
69
//
70
//
71
//
72
//
73
 
74
`timescale 1ns / 10ps
75
 
76
/////////////////////////////////////////////////////////////////////
77
// This AC97 Controller supports up to 6 Output and 3 Input Channels.
78
// Comment out the define statement for which channels you do not wish
79
// to support in your implementation. The main Left and Right channels
80
// are always supported. 
81
 
82
// Surround Left + Right
83 10 rudi
`define AC97_SURROUND           1
84 4 rudi
 
85
// Center Channel
86 6 rudi
`define AC97_CENTER             1
87 4 rudi
 
88
// LFE Channel
89 6 rudi
`define AC97_LFE                1
90 4 rudi
 
91
// Stereo Input
92 6 rudi
`define AC97_SIN                1
93 4 rudi
 
94
// Mono Microphone Input
95 6 rudi
`define AC97_MICIN              1
96 4 rudi
 
97
/////////////////////////////////////////////////////////////////////
98
//
99
// This define selects how the WISHBONE interface determines if
100
// the internal register file is selected.
101
// This should be a simple address decoder. "wb_addr_i" is the
102
// WISHBONE address bus (32 bits wide).
103 6 rudi
`define AC97_REG_SEL            (wb_addr_i[31:29] == 3'h0)
104 4 rudi
 
105
/////////////////////////////////////////////////////////////////////
106
//
107
// This is a prescaler that generates a pulse every 250 nS.
108
// The value here should one less than the actually calculated
109
// value.
110
// For a 200 MHz wishbone clock, this value is 49 (50-1).
111 10 rudi
`define AC97_250_PS     6'h31
112 4 rudi
 
113
/////////////////////////////////////////////////////////////////////
114
//
115
// AC97 Cold reset Must be asserted for at least 1uS. The AC97
116
// controller will stretch the reset pulse to at least 1uS.
117
// The reset timer is driven by the AC97_250_PS prescaler.
118
// This value should probably be never changed. Adjust the
119
// AC97_250_PS instead.
120 10 rudi
`define AC97_RST_DEL    3'h4
121 4 rudi
 
122
/////////////////////////////////////////////////////////////////////
123
//
124
// This value indicates for how long the resume signaling (asserting sync)
125
// should be done. This counter is driven by the AC97_250_PS prescaler.
126
// This value times 250nS is the duration of the resume signaling.
127
// The actual value must be incremented by one, as we do not know
128
// the current state of the prescaler, and must somehow insure we
129
// meet the minimum 1uS length. This value should probably be never
130
// changed. Modify the AC97_250_PS instead.
131 10 rudi
`define AC97_RES_SIG    3'h5
132 4 rudi
 
133
/////////////////////////////////////////////////////////////////////
134
//
135
// If the bit clock is absent for at least two "predicted" bit
136
// clock periods (163 nS) we should signal "suspended".
137
// This value defines how many WISHBONE cycles must pass without
138
// any change on the bit clock input before we signal "suspended".
139
// For a 200 MHz WISHBONE clock this would be about (163/5) 33 cycles.
140 10 rudi
`define AC97_SUSP_DET   6'h21
141 4 rudi
 
142 12 rudi
/////////////////////////////////////////////////////////////////////
143
//
144
// Select FIFO Depth. For most applications a FIFO depth of 4 should
145
// be sufficient. For systems with slow interrupt processing or slow
146
// DMA response or systems with low internal bus bandwidth you might
147
// want to increase the FIFO sizes to reduce the interrupt/DMA service
148
// request frequencies.
149
// Service request frequency can be calculated as follows:
150
// Channel bandwidth / FIFO size = Service Request Frequency
151
// For Example: 48KHz / 4 = 12 kHz
152
//
153
// Select Input FIFO depth by uncommenting ONE of the following define
154
// statements:
155
`define AC97_IN_FIFO_DEPTH_4
156
//`define AC97_IN_FIFO_DEPTH_8
157
//`define AC97_IN_FIFO_DEPTH_16
158
//
159
// Select Output FIFO depth by uncommenting ONE of the following define
160
// statements:
161
`define AC97_OUT_FIFO_DEPTH_4
162
//`define AC97_OUT_FIFO_DEPTH_8
163
//`define AC97_OUT_FIFO_DEPTH_16
164
 

powered by: WebSVN 2.1.0

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