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

Subversion Repositories systemverilog-uart16550

[/] [systemverilog-uart16550/] [trunk/] [bench/] [uart_top.sv] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 hiroshi
/* *****************************************************************************
2
   * title:         uart_16550_rll module                                      *
3
   * description:   RS232 Protocol 16550D uart (mostly supported)              *
4
   * languages:     systemVerilog                                              *
5
   *                                                                           *
6
   * Copyright (C) 2010 miyagi.hiroshi                                         *
7
   *                                                                           *
8
   * This library is free software; you can redistribute it and/or             *
9
   * modify it under the terms of the GNU Lesser General Public                *
10
   * License as published by the Free Software Foundation; either              *
11
   * version 2.1 of the License, or (at your option) any later version.        *
12
   *                                                                           *
13
   * This library is distributed in the hope that it will be useful,           *
14
   * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
15
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
16
   * Lesser General Public License for more details.                           *
17
   *                                                                           *
18
   * You should have received a copy of the GNU Lesser General Public          *
19
   * License along with this library; if not, write to the Free Software       *
20
   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111*1307  USA *
21
   *                                                                           *
22
   *         ***  GNU LESSER GENERAL PUBLIC LICENSE  ***                       *
23
   *           from http://www.gnu.org/licenses/lgpl.txt                       *
24
   *****************************************************************************
25
   *                            redleaflogic,ltd                               *
26
   *                    miyagi.hiroshi@redleaflogic.biz                        *
27
   *          $Id: uart_top.sv 108 2010-03-30 02:56:26Z hiroshi $         *
28
   ***************************************************************************** */
29
 
30
`ifdef SYN
31
/* empty */
32
`else
33
timeunit      1ps ;
34
timeprecision 1ps ;
35
`endif
36
// import uart_top_package:: * ;
37
module uart_top
38
  (
39
   input   wire         clk_i,   // clock
40
   input   wire         nrst_i,  // reset
41
   input   wire [15:0]  adr_i,   // address
42
   input   wire [31:0]  dat_i,   // data input
43
   output  wire [31:0]  dat_o,   // clk_rst_manager
44
   input   wire         we_i,    // write enable
45
   input   wire [3:0]   sel_i,   // select
46
   input   wire         stb_i,   //
47
   output  wire         ack_o,   // acknowledge accept
48
   input   wire         cyc_i,   // cycle assrted
49
   output  wire         intr_o,  //
50
 
51
   output wire          stx_o,
52
   output wire          rts_o,
53
   output wire          dtr_o,
54
   input  wire          srx_i,
55
   input  wire          cts_i,
56
   input  wire          dsr_i,
57
   input  wire          ri_i,
58
   input  wire          dcd_i
59
   ) ;
60
 
61
   uart_bus uart_bus() ;
62
   wb_bus   wb_bus() ;
63
 
64
   assign wb_bus.clk_i   = clk_i ;
65
   assign wb_bus.nrst_i  = nrst_i ;
66
   assign wb_bus.adr_i   = adr_i ;
67
   assign wb_bus.dat_i   = dat_i ;
68
   assign dat_o          = wb_bus.dat_o ;
69
   assign wb_bus.we_i    = we_i  ;
70
   assign wb_bus.sel_i   = sel_i ;
71
   assign wb_bus.stb_i   = stb_i ;
72
   assign ack_o          = wb_bus.ack_o ;
73
   assign wb_bus.cyc_i   = cyc_i ;
74
   assign intr_o         = wb_bus.intr_o ;
75
   assign stx_o          = uart_bus.stx_o ;
76
   assign rts_o          = uart_bus.rts_o ;
77
   assign dtr_o          = uart_bus.dtr_o ;
78
 
79
   assign uart_bus.srx_i = srx_i ;
80
   assign uart_bus.cts_i = cts_i ;
81
   assign uart_bus.dsr_i = dsr_i ;
82
   assign uart_bus.ri_i  = ri_i ;
83
   assign uart_bus.dcd_i = dcd_i ;
84
 
85
   uart_16550_rll um(.wb_bus(wb_bus.slave_mp), .uart_bus(uart_bus)) ;
86
 
87
endmodule

powered by: WebSVN 2.1.0

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