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

Subversion Repositories ps2_host_controller

[/] [ps2_host_controller/] [trunk/] [hdl/] [ps2_host.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 tesla
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  ps2_host.v                                                  ////
4
////                                                              ////
5
////  Description                                                 ////
6
////  Top file, gluing all parts together                         ////
7
////                                                              ////
8
////  Author:                                                     ////
9
////      - Piotr Foltyn, piotr.foltyn@gmail.com                  ////
10
////                                                              ////
11
//////////////////////////////////////////////////////////////////////
12
////                                                              ////
13
//// Copyright (C) 2011 Author                                    ////
14
////                                                              ////
15
//// This source file may be used and distributed without         ////
16
//// restriction provided that this copyright statement is not    ////
17
//// removed from the file and that any derivative work contains  ////
18
//// the original copyright notice and the associated disclaimer. ////
19
////                                                              ////
20
//// This source file is free software; you can redistribute it   ////
21
//// and/or modify it under the terms of the GNU Lesser General   ////
22
//// Public License as published by the Free Software Foundation; ////
23
//// either version 2.1 of the License, or (at your option) any   ////
24
//// later version.                                               ////
25
////                                                              ////
26
//// This source is distributed in the hope that it will be       ////
27
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
28
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
29
//// PURPOSE.  See the GNU Lesser General Public License for more ////
30
//// details.                                                     ////
31
////                                                              ////
32
//// You should have received a copy of the GNU Lesser General    ////
33
//// Public License along with this source; if not, download it   ////
34
//// from http://www.opencores.org/lgpl.shtml                     ////
35
////                                                              ////
36
//////////////////////////////////////////////////////////////////////
37
 
38
// synopsys translate_off
39
`include "timescale.v"
40
// synopsys translate_on
41
`include "ps2_host_clk_ctrl.v"
42
`include "ps2_host_watchdog.v"
43
`include "ps2_host_rx.v"
44
`include "ps2_host_tx.v"
45
 
46
module ps2_host(
47
  input wire sys_clk,
48
  input wire sys_rst,
49
  inout wire ps2_clk,
50
  inout wire ps2_data,
51
 
52
  input  wire [7:0] tx_data,
53
  input  wire send_req,
54
  output wire busy,
55
 
56
  output wire [7:0] rx_data,
57
  output wire ready,
58
  output wire error
59
);
60
 
61
ps2_host_clk_ctrl ps2_host_clk_ctrl (
62
  .sys_clk(sys_clk),
63
  .sys_rst(sys_rst),
64
  .send_req(send_req),
65
  .ps2_clk(ps2_clk),
66
  .ps2_clk_posedge(ps2_clk_posedge),
67
  .ps2_clk_negedge(ps2_clk_negedge)
68
);
69
 
70
ps2_host_watchdog ps2_host_watchdog(
71
  .sys_clk(sys_clk),
72
  .sys_rst(sys_rst),
73
  .ps2_clk_posedge(ps2_clk_posedge),
74
  .ps2_clk_negedge(ps2_clk_negedge),
75
  .watchdog_rst(watchdog_rst)
76
);
77
 
78
ps2_host_rx ps2_host_rx(
79
  .sys_clk(sys_clk),
80
  .sys_rst(sys_rst | busy | watchdog_rst),
81
  .ps2_clk_negedge(ps2_clk_negedge),
82
  .ps2_data(ps2_data),
83
  .rx_data(rx_data),
84
  .ready(ready),
85
  .error(error)
86
);
87
 
88
ps2_host_tx ps2_host_tx(
89
  .sys_clk(sys_clk),
90
  .sys_rst(sys_rst | watchdog_rst),
91
  .ps2_clk_posedge(ps2_clk_posedge),
92
  .ps2_data(ps2_data),
93
  .tx_data(tx_data),
94
  .send_req(send_req),
95
  .busy(busy)
96
);
97
 
98
endmodule

powered by: WebSVN 2.1.0

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