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

Subversion Repositories systemverilog-uart16550

[/] [systemverilog-uart16550/] [trunk/] [bench/] [uart_wrapper.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_wrapper.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_wrapper (interface wb_ext_bus, interface uart_bus) ;
38
 
39
   logic [31:0] dat_o ;
40
   logic        ack_o ;
41
   logic        intr_o ;
42
   logic        stx_o ;
43
   logic        rts_o ;
44
   logic        dtr_o ;
45
 
46
   wire        clk_i   = wb_ext_bus.clk_i ;
47
   wire        nrst_i  = wb_ext_bus.nrst_i ;
48
   wire [15:0] adr_i   = wb_ext_bus.adr_i ;
49
   wire [31:0] dat_i   = wb_ext_bus.dat_i ;
50
   wire        we_i    = wb_ext_bus.we_i  ;
51
   wire [3:0]  sel_i   = wb_ext_bus.sel_i ;
52
   wire        stb_i   = wb_ext_bus.stb_i ;
53
   wire        cyc_i   = wb_ext_bus.cyc_i ;
54
 
55
   assign wb_ext_bus.dat_o  = dat_o ;
56
   assign wb_ext_bus.ack_o  = ack_o ;
57
   assign wb_ext_bus.intr_o = intr_o ;
58
   assign uart_bus.stx_o = stx_o ;
59
   assign uart_bus.rts_o = rts_o ;
60
   assign uart_bus.dtr_o = dtr_o ;
61
 
62
   wire        srx_i   = uart_bus.srx_i ;
63
   wire        cts_i   = uart_bus.cts_i ;
64
   wire        dsr_i   = uart_bus.dsr_i ;
65
   wire        ri_i    = uart_bus.ri_i ;
66
   wire        dcd_i   = uart_bus.dcd_i ;
67
 
68
   uart_top ut(.*) ;
69
 
70
endmodule

powered by: WebSVN 2.1.0

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