1 //////////////////////////////////////////////////////////////////////
6 //// This file is part of the "UART 16550 compatible" project ////
7 //// http://www.opencores.org/cores/uart16550/ ////
9 //// Documentation related to this project: ////
10 //// - http://www.opencores.org/cores/uart16550/ ////
12 //// Projects compatibility: ////
14 //// RS232 Protocol ////
15 //// 16550D uart (mostly supported) ////
17 //// Overview (main Features): ////
18 //// UART core top level. ////
20 //// Known problems (limits): ////
21 //// Note that transmitter and receiver instances are inside ////
22 //// the uart_regs.v file. ////
25 //// Nothing so far. ////
28 //// - gorban@opencores.org ////
29 //// - Jacob Gorban ////
31 //// Created: 2001/05/12 ////
32 //// Last Updated: 2001/05/17 ////
33 //// (See log for the revision history) ////
36 //////////////////////////////////////////////////////////////////////
38 //// Copyright (C) 2000 Jacob Gorban, gorban@opencores.org ////
40 //// This source file may be used and distributed without ////
41 //// restriction provided that this copyright statement is not ////
42 //// removed from the file and that any derivative work contains ////
43 //// the original copyright notice and the associated disclaimer. ////
45 //// This source file is free software; you can redistribute it ////
46 //// and/or modify it under the terms of the GNU Lesser General ////
47 //// Public License as published by the Free Software Foundation; ////
48 //// either version 2.1 of the License, or (at your option) any ////
49 //// later version. ////
51 //// This source is distributed in the hope that it will be ////
52 //// useful, but WITHOUT ANY WARRANTY; without even the implied ////
53 //// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
54 //// PURPOSE. See the GNU Lesser General Public License for more ////
57 //// You should have received a copy of the GNU Lesser General ////
58 //// Public License along with this source; if not, download it ////
59 //// from http://www.opencores.org/lgpl.shtml ////
61 //////////////////////////////////////////////////////////////////////
63 // CVS Revision History
65 // $Log: uart_top.v,v $
66 // Revision 1.4 2001/05/31 20:08:01 gorban
67 // FIFO changes and other corrections.
69 // Revision 1.3 2001/05/21 19:12:02 gorban
70 // Corrected some Linter messages.
72 // Revision 1.2 2001/05/17 18:34:18 gorban
73 // First 'stable' release. Should be sythesizable now. Also added new header.
75 // Revision 1.0 2001-05-17 21:27:12+02 jacob
80 `include "timescale.v"
81 `include "uart_defines.v"
87 wb_rst_i, wb_addr_i, wb_dat_i, wb_dat_o, wb_we_i, wb_stb_i, wb_cyc_i, wb_ack_o,
88 int_o, // interrupt request
91 // serial input/output
95 rts_pad_o, cts_pad_i, dtr_pad_o, dsr_pad_i, ri_pad_i, dcd_pad_i
99 parameter uart_data_width = 8;
100 parameter uart_addr_width = `UART_ADDR_WIDTH;
104 // WISHBONE interface
106 input [uart_addr_width-1:0] wb_addr_i;
107 input [uart_data_width-1:0] wb_dat_i;
108 output [uart_data_width-1:0] wb_dat_o;
129 wire [uart_addr_width-1:0] wb_addr_i;
130 wire [uart_data_width-1:0] wb_dat_i;
131 wire [uart_data_width-1:0] wb_dat_o;
133 wire we_o; // Write enable for registers
134 wire re_o; // Read enable for registers
139 //// WISHBONE interface module
140 uart_wb wb_interface(
142 .wb_rst_i( wb_rst_i ),
144 .wb_stb_i( wb_stb_i ),
145 .wb_cyc_i( wb_cyc_i ),
146 .wb_ack_o( wb_ack_o ),
154 .wb_rst_i( wb_rst_i ),
155 .wb_addr_i( wb_addr_i ),
156 .wb_dat_i( wb_dat_i ),
157 .wb_dat_o( wb_dat_o ),
160 .modem_inputs( {cts_pad_i, dsr_pad_i,
161 ri_pad_i, dcd_pad_i} ),
162 .stx_pad_o( stx_pad_o ),
163 .srx_pad_i( srx_pad_i ),
165 .rts_pad_o( rts_pad_o ),
166 .dtr_pad_o( dtr_pad_o ),