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

Subversion Repositories ac97

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

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 10 rudi
//  $Id: ac97_defines.v,v 1.3 2002-03-05 04:44:05 rudi Exp $
41 4 rudi
//
42 10 rudi
//  $Date: 2002-03-05 04:44:05 $
43
//  $Revision: 1.3 $
44 4 rudi
//  $Author: rudi $
45
//  $Locker:  $
46
//  $State: Exp $
47
//
48
// Change History:
49
//               $Log: not supported by cvs2svn $
50 10 rudi
//               Revision 1.2  2001/08/10 08:09:42  rudi
51
//
52
//               - Removed RTY_O output.
53
//               - Added Clock and Reset Inputs to documentation.
54
//               - Changed IO names to be more clear.
55
//               - Uniquifyed define names to be core specific.
56
//
57 6 rudi
//               Revision 1.1  2001/08/03 06:54:49  rudi
58
//
59
//
60
//               - Changed to new directory structure
61
//
62 4 rudi
//               Revision 1.1.1.1  2001/05/19 02:29:14  rudi
63
//               Initial Checkin
64
//
65
//
66
//
67
//
68
 
69
`timescale 1ns / 10ps
70
 
71
/////////////////////////////////////////////////////////////////////
72
// This AC97 Controller supports up to 6 Output and 3 Input Channels.
73
// Comment out the define statement for which channels you do not wish
74
// to support in your implementation. The main Left and Right channels
75
// are always supported. 
76
 
77
// Surround Left + Right
78 10 rudi
`define AC97_SURROUND           1
79 4 rudi
 
80
// Center Channel
81 6 rudi
`define AC97_CENTER             1
82 4 rudi
 
83
// LFE Channel
84 6 rudi
`define AC97_LFE                1
85 4 rudi
 
86
// Stereo Input
87 6 rudi
`define AC97_SIN                1
88 4 rudi
 
89
// Mono Microphone Input
90 6 rudi
`define AC97_MICIN              1
91 4 rudi
 
92
/////////////////////////////////////////////////////////////////////
93
//
94
// This define selects how the WISHBONE interface determines if
95
// the internal register file is selected.
96
// This should be a simple address decoder. "wb_addr_i" is the
97
// WISHBONE address bus (32 bits wide).
98 6 rudi
`define AC97_REG_SEL            (wb_addr_i[31:29] == 3'h0)
99 4 rudi
 
100
/////////////////////////////////////////////////////////////////////
101
//
102
// This is a prescaler that generates a pulse every 250 nS.
103
// The value here should one less than the actually calculated
104
// value.
105
// For a 200 MHz wishbone clock, this value is 49 (50-1).
106 10 rudi
`define AC97_250_PS     6'h31
107 4 rudi
 
108
/////////////////////////////////////////////////////////////////////
109
//
110
// AC97 Cold reset Must be asserted for at least 1uS. The AC97
111
// controller will stretch the reset pulse to at least 1uS.
112
// The reset timer is driven by the AC97_250_PS prescaler.
113
// This value should probably be never changed. Adjust the
114
// AC97_250_PS instead.
115 10 rudi
`define AC97_RST_DEL    3'h4
116 4 rudi
 
117
/////////////////////////////////////////////////////////////////////
118
//
119
// This value indicates for how long the resume signaling (asserting sync)
120
// should be done. This counter is driven by the AC97_250_PS prescaler.
121
// This value times 250nS is the duration of the resume signaling.
122
// The actual value must be incremented by one, as we do not know
123
// the current state of the prescaler, and must somehow insure we
124
// meet the minimum 1uS length. This value should probably be never
125
// changed. Modify the AC97_250_PS instead.
126 10 rudi
`define AC97_RES_SIG    3'h5
127 4 rudi
 
128
/////////////////////////////////////////////////////////////////////
129
//
130
// If the bit clock is absent for at least two "predicted" bit
131
// clock periods (163 nS) we should signal "suspended".
132
// This value defines how many WISHBONE cycles must pass without
133
// any change on the bit clock input before we signal "suspended".
134
// For a 200 MHz WISHBONE clock this would be about (163/5) 33 cycles.
135 10 rudi
`define AC97_SUSP_DET   6'h21
136 4 rudi
 

powered by: WebSVN 2.1.0

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