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 43

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
`timescale 1ns / 1ps
47
 
48
module TxFifo(
49
  clk,
50
  rst,
51
  fifoREn,
52
  fifoEmpty,
53
  busAddress,
54
  busWriteEn,
55
  busStrobe_i,
56
  busFifoSelect,
57
  busDataIn,
58
  busDataOut,
59
  fifoDataOut );
60
  //FIFO_DEPTH = ADDR_WIDTH^2
61 5 sfielding
  parameter FIFO_DEPTH = 64;
62 2 sfielding
  parameter ADDR_WIDTH = 6;
63
 
64
input clk;
65
input rst;
66
input fifoREn;
67
output fifoEmpty;
68
input [2:0] busAddress;
69
input busWriteEn;
70
input busStrobe_i;
71
input busFifoSelect;
72
input [7:0] busDataIn;
73
output [7:0] busDataOut;
74
output [7:0] fifoDataOut;
75
 
76
wire clk;
77
wire rst;
78
wire fifoREn;
79
wire fifoEmpty;
80
wire [2:0] busAddress;
81
wire busWriteEn;
82
wire busStrobe_i;
83
wire busFifoSelect;
84
wire [7:0] busDataIn;
85
wire [7:0] busDataOut;
86
wire [7:0] fifoDataOut;
87
 
88
//internal wires and regs
89
wire fifoWEn;
90
wire forceEmpty;
91
wire [15:0] numElementsInFifo;
92
wire fifoFull;
93
 
94
fifoRTL #(8, FIFO_DEPTH, ADDR_WIDTH) u_fifo(
95
  .clk(clk),
96
  .rst(rst),
97
  .dataIn(busDataIn),
98
  .dataOut(fifoDataOut),
99
  .fifoWEn(fifoWEn),
100
  .fifoREn(fifoREn),
101
  .fifoFull(fifoFull),
102
  .fifoEmpty(fifoEmpty),
103
  .forceEmpty(forceEmpty),
104
  .numElementsInFifo(numElementsInFifo) );
105
 
106
TxfifoBI u_TxfifoBI(
107
  .address(busAddress),
108
  .writeEn(busWriteEn),
109
  .strobe_i(busStrobe_i),
110
  .clk(clk),
111
  .rst(rst),
112
  .fifoSelect(busFifoSelect),
113
  .busDataIn(busDataIn),
114
  .busDataOut(busDataOut),
115
  .fifoWEn(fifoWEn),
116
  .fifoFull(fifoFull),
117
  .forceEmpty(forceEmpty),
118
  .numElementsInFifo(numElementsInFifo)
119
  );
120
 
121
endmodule

powered by: WebSVN 2.1.0

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