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

Subversion Repositories uart16550

[/] [uart16550/] [tags/] [initial/] [verilog/] [UART_RX_FIFO.v] - Blame information for rev 106

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 gorban
//  UART core receiver FIFO
2
//
3
// Author: Jacob Gorban   (jacob.gorban@flextronicssemi.com)
4
// Company: Flextronics Semiconductor
5
//
6
// Filename: UART_RX_FIFO.v
7
//
8
// The standard FIFO logic is in the FIFO_inc.v file
9
// Additional logic is in this file.
10
//
11
// Releases:
12
//              1.1     First release
13
//
14
 
15
 
16
`include "timescale.v"
17
`include "UART_defines.v"
18
 
19
module UART_RX_FIFO (clk,
20
        wb_rst_i, data_in, data_out,
21
// Control signals
22
        push, // push strobe, active high
23
        pop,   // pop strobe, active high
24
// status signals
25
        underrun,
26
        overrun,
27
        count,
28
        error_bit
29
        );
30
 
31
output          error_bit;  // a parity or framing error is inside the receiver FIFO.
32
wire            error_bit;
33
 
34
`include "FIFO_inc.v"
35
 
36
// Additional logic for detection of error conditions (parity and framing) inside the FIFO
37
// for the Line Status Register bit 7
38
wire    [`FIFO_REC_WIDTH-1:0]    word0 = fifo[0];
39
wire    [`FIFO_REC_WIDTH-1:0]    word1 = fifo[1];
40
wire    [`FIFO_REC_WIDTH-1:0]    word2 = fifo[2];
41
wire    [`FIFO_REC_WIDTH-1:0]    word3 = fifo[3];
42
wire    [`FIFO_REC_WIDTH-1:0]    word4 = fifo[4];
43
wire    [`FIFO_REC_WIDTH-1:0]    word5 = fifo[5];
44
wire    [`FIFO_REC_WIDTH-1:0]    word6 = fifo[6];
45
wire    [`FIFO_REC_WIDTH-1:0]    word7 = fifo[7];
46
 
47
wire    [`FIFO_REC_WIDTH-1:0]    word8 = fifo[8];
48
wire    [`FIFO_REC_WIDTH-1:0]    word9 = fifo[9];
49
wire    [`FIFO_REC_WIDTH-1:0]    word10 = fifo[10];
50
wire    [`FIFO_REC_WIDTH-1:0]    word11 = fifo[11];
51
wire    [`FIFO_REC_WIDTH-1:0]    word12 = fifo[12];
52
wire    [`FIFO_REC_WIDTH-1:0]    word13 = fifo[13];
53
wire    [`FIFO_REC_WIDTH-1:0]    word14 = fifo[14];
54
wire    [`FIFO_REC_WIDTH-1:0]    word15 = fifo[15];
55
 
56
// a 1 is returned if any of the error bits in the fifo is 1
57
assign  error_bit = |(word0[1:0]  | word1[1:0]  | word2[1:0]  | word3[1:0]  |
58
                      word4[1:0]  | word5[1:0]  | word6[1:0]  | word7[1:0]  |
59
                      word8[1:0]  | word9[1:0]  | word10[1:0] | word11[1:0] |
60
                      word12[1:0] | word13[1:0] | word14[1:0] | word15[1:0] );
61
 
62
endmodule

powered by: WebSVN 2.1.0

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