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

Subversion Repositories usbhostslave

[/] [usbhostslave/] [tags/] [rel_00_06_alpha/] [RTL/] [buffers/] [TxFifo.v] - Blame information for rev 5

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

Line No. Rev Author Line
1 2 sfielding
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
//// TxFifo.v                                                     ////
4
////                                                              ////
5
//// This file is part of the usbhostslave opencores effort.
6
//// <http://www.opencores.org/cores//>                           ////
7
////                                                              ////
8
//// Module Description:                                          ////
9
////  parameterized TxFifo wrapper. Min depth = 2, Max depth = 65536
10
////  fifo write access via bus interface, fifo read access is direct
11
//// 
12
////                                                              ////
13
//// To Do:                                                       ////
14
//// 
15
////                                                              ////
16
//// Author(s):                                                   ////
17
//// - Steve Fielding, sfielding@base2designs.com                 ////
18
////                                                              ////
19
//////////////////////////////////////////////////////////////////////
20
////                                                              ////
21
//// Copyright (C) 2004 Steve Fielding and OPENCORES.ORG          ////
22
////                                                              ////
23
//// This source file may be used and distributed without         ////
24
//// restriction provided that this copyright statement is not    ////
25
//// removed from the file and that any derivative work contains  ////
26
//// the original copyright notice and the associated disclaimer. ////
27
////                                                              ////
28
//// This source file is free software; you can redistribute it   ////
29
//// and/or modify it under the terms of the GNU Lesser General   ////
30
//// Public License as published by the Free Software Foundation; ////
31
//// either version 2.1 of the License, or (at your option) any   ////
32
//// later version.                                               ////
33
////                                                              ////
34
//// This source is distributed in the hope that it will be       ////
35
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
36
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
37
//// PURPOSE. See the GNU Lesser General Public License for more  ////
38
//// details.                                                     ////
39
////                                                              ////
40
//// You should have received a copy of the GNU Lesser General    ////
41
//// Public License along with this source; if not, download it   ////
42
//// from <http://www.opencores.org/lgpl.shtml>                   ////
43
////                                                              ////
44
//////////////////////////////////////////////////////////////////////
45
//
46 5 sfielding
// $Id: TxFifo.v,v 1.2 2004-12-18 14:36:06 sfielding Exp $
47 2 sfielding
//
48
// CVS Revision History
49
//
50
// $Log: not supported by cvs2svn $
51 5 sfielding
// Revision 1.1.1.1  2004/10/11 04:00:51  sfielding
52
// Created
53 2 sfielding
//
54 5 sfielding
//
55 2 sfielding
 
56
`timescale 1ns / 1ps
57
 
58
module TxFifo(
59
  clk,
60
  rst,
61
  fifoREn,
62
  fifoEmpty,
63
  busAddress,
64
  busWriteEn,
65
  busStrobe_i,
66
  busFifoSelect,
67
  busDataIn,
68
  busDataOut,
69
  fifoDataOut );
70
  //FIFO_DEPTH = ADDR_WIDTH^2
71 5 sfielding
  parameter FIFO_DEPTH = 64;
72 2 sfielding
  parameter ADDR_WIDTH = 6;
73
 
74
input clk;
75
input rst;
76
input fifoREn;
77
output fifoEmpty;
78
input [2:0] busAddress;
79
input busWriteEn;
80
input busStrobe_i;
81
input busFifoSelect;
82
input [7:0] busDataIn;
83
output [7:0] busDataOut;
84
output [7:0] fifoDataOut;
85
 
86
wire clk;
87
wire rst;
88
wire fifoREn;
89
wire fifoEmpty;
90
wire [2:0] busAddress;
91
wire busWriteEn;
92
wire busStrobe_i;
93
wire busFifoSelect;
94
wire [7:0] busDataIn;
95
wire [7:0] busDataOut;
96
wire [7:0] fifoDataOut;
97
 
98
//internal wires and regs
99
wire fifoWEn;
100
wire forceEmpty;
101
wire [15:0] numElementsInFifo;
102
wire fifoFull;
103
 
104
fifoRTL #(8, FIFO_DEPTH, ADDR_WIDTH) u_fifo(
105
  .clk(clk),
106
  .rst(rst),
107
  .dataIn(busDataIn),
108
  .dataOut(fifoDataOut),
109
  .fifoWEn(fifoWEn),
110
  .fifoREn(fifoREn),
111
  .fifoFull(fifoFull),
112
  .fifoEmpty(fifoEmpty),
113
  .forceEmpty(forceEmpty),
114
  .numElementsInFifo(numElementsInFifo) );
115
 
116
TxfifoBI u_TxfifoBI(
117
  .address(busAddress),
118
  .writeEn(busWriteEn),
119
  .strobe_i(busStrobe_i),
120
  .clk(clk),
121
  .rst(rst),
122
  .fifoSelect(busFifoSelect),
123
  .busDataIn(busDataIn),
124
  .busDataOut(busDataOut),
125
  .fifoWEn(fifoWEn),
126
  .fifoFull(fifoFull),
127
  .forceEmpty(forceEmpty),
128
  .numElementsInFifo(numElementsInFifo)
129
  );
130
 
131
endmodule

powered by: WebSVN 2.1.0

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