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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [orp/] [orp_soc/] [rtl/] [verilog/] [ps2.old/] [ps2_top.v] - Blame information for rev 746

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 746 lampret
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  ps2_top.v                                                   ////
4
////                                                              ////
5
////  This file is part of the "ps2" project                      ////
6
////  http://www.opencores.org/cores/ps2/                         ////
7
////                                                              ////
8
////  Author(s):                                                  ////
9
////      - mihad@opencores.org                                   ////
10
////      - Miha Dolenc                                           ////
11
////                                                              ////
12
////  All additional information is avaliable in the README.txt   ////
13
////  file.                                                       ////
14
////                                                              ////
15
////                                                              ////
16
//////////////////////////////////////////////////////////////////////
17
////                                                              ////
18
//// Copyright (C) 2000 Miha Dolenc, mihad@opencores.org          ////
19
////                                                              ////
20
//// This source file may be used and distributed without         ////
21
//// restriction provided that this copyright statement is not    ////
22
//// removed from the file and that any derivative work contains  ////
23
//// the original copyright notice and the associated disclaimer. ////
24
////                                                              ////
25
//// This source file is free software; you can redistribute it   ////
26
//// and/or modify it under the terms of the GNU Lesser General   ////
27
//// Public License as published by the Free Software Foundation; ////
28
//// either version 2.1 of the License, or (at your option) any   ////
29
//// later version.                                               ////
30
////                                                              ////
31
//// This source is distributed in the hope that it will be       ////
32
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
33
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
34
//// PURPOSE.  See the GNU Lesser General Public License for more ////
35
//// details.                                                     ////
36
////                                                              ////
37
//// You should have received a copy of the GNU Lesser General    ////
38
//// Public License along with this source; if not, download it   ////
39
//// from http://www.opencores.org/lgpl.shtml                     ////
40
////                                                              ////
41
//////////////////////////////////////////////////////////////////////
42
//
43
// CVS Revision History
44
//
45
// $Log: not supported by cvs2svn $
46
// Revision 1.1.1.1  2002/02/18 16:16:56  mihad
47
// Initial project import - working
48
//
49
//
50
 
51
`include "ps2_defines.v"
52
// synopsys translate_off
53
`include "timescale.v"
54
// synopsys translate_on
55
 
56
module ps2_top
57
(
58
    wb_clk_i,
59
    wb_rst_i,
60
    wb_cyc_i,
61
    wb_stb_i,
62
    wb_we_i,
63
    wb_sel_i,
64
    wb_adr_i,
65
    wb_dat_i,
66
    wb_dat_o,
67
    wb_ack_o,
68
 
69
    wb_int_o,
70
 
71
    ps2_kbd_clk_pad_i,
72
    ps2_kbd_data_pad_i,
73
    ps2_kbd_clk_pad_o,
74
    ps2_kbd_data_pad_o,
75
    ps2_kbd_clk_pad_oe_o,
76
    ps2_kbd_data_pad_oe_o
77
) ;
78
 
79
input wb_clk_i,
80
      wb_rst_i,
81
      wb_cyc_i,
82
      wb_stb_i,
83
      wb_we_i ;
84
 
85
input [3:0] wb_sel_i ;
86
 
87
input [31:0]wb_adr_i,
88
            wb_dat_i ;
89
 
90
output [31:0] wb_dat_o ;
91
 
92
output wb_ack_o ;
93
 
94
output wb_int_o ;
95
 
96
input ps2_kbd_clk_pad_i,
97
      ps2_kbd_data_pad_i ;
98
 
99
output ps2_kbd_clk_pad_o,
100
       ps2_kbd_data_pad_o,
101
       ps2_kbd_clk_pad_oe_o,
102
       ps2_kbd_data_pad_oe_o ;
103
 
104
wire rx_extended,
105
     rx_released,
106
     rx_shift_key_on,
107
     rx_data_ready,
108
     rx_translated_data_ready,
109
     rx_read_wb,
110
     rx_read_tt,
111
     tx_write,
112
     tx_write_ack,
113
     tx_error_no_keyboard_ack,
114
     ps2_ctrl_kbd_data_en_,
115
     ps2_ctrl_kbd_clk_en_,
116
     ps2_ctrl_kbd_clk,
117
     inhibit_kbd_if ;
118
 
119
wire [7:0] rx_scan_code,
120
           rx_translated_scan_code,
121
           rx_ascii,
122
           tx_data ;
123
 
124
assign ps2_kbd_clk_pad_o  = 1'b0 ;
125
assign ps2_kbd_data_pad_o = 1'b0 ;
126
 
127
ps2_io_ctrl i_ps2_io_ctrl
128
(
129
    .clk_i                   (wb_clk_i),
130
    .rst_i                   (wb_rst_i),
131
    .ps2_ctrl_kbd_clk_en_i_  (ps2_ctrl_kbd_clk_en_),
132
    .ps2_ctrl_kbd_data_en_i_ (ps2_ctrl_kbd_data_en_),
133
    .ps2_kbd_clk_pad_i       (ps2_kbd_clk_pad_i),
134
    .ps2_kbd_clk_pad_oe_o    (ps2_kbd_clk_pad_oe_o),
135
    .ps2_kbd_data_pad_oe_o   (ps2_kbd_data_pad_oe_o),
136
    .inhibit_kbd_if_i        (inhibit_kbd_if),
137
    .ps2_ctrl_kbd_clk_o      (ps2_ctrl_kbd_clk)
138
);
139
 
140
ps2_keyboard #(`PS2_TIMER_60USEC_VALUE_PP, `PS2_TIMER_60USEC_BITS_PP, `PS2_TIMER_5USEC_VALUE_PP, `PS2_TIMER_5USEC_BITS_PP, 0)
141
i_ps2_keyboard
142
(
143
    .clk                         (wb_clk_i),
144
    .reset                       (wb_rst_i),
145
    .ps2_clk_en_o_               (ps2_ctrl_kbd_clk_en_),
146
    .ps2_data_en_o_              (ps2_ctrl_kbd_data_en_),
147
    .ps2_clk_i                   (ps2_ctrl_kbd_clk),
148
    .ps2_data_i                  (ps2_kbd_data_pad_i),
149
    .rx_extended                 (rx_extended),
150
    .rx_released                 (rx_released),
151
    .rx_shift_key_on             (rx_shift_key_on),
152
    .rx_scan_code                (rx_scan_code),
153
    .rx_ascii                    (rx_ascii),
154
    .rx_data_ready               (rx_data_ready),
155
    .rx_read                     (rx_read_tt),
156
    .tx_data                     (tx_data),
157
    .tx_write                    (tx_write),
158
    .tx_write_ack_o              (tx_write_ack),
159
    .tx_error_no_keyboard_ack    (tx_error_no_keyboard_ack),
160
    .translate                   (translate)
161
);
162
 
163
ps2_wb_if i_ps2_wb_if
164
(
165
    .wb_clk_i                      (wb_clk_i),
166
    .wb_rst_i                      (wb_rst_i),
167
    .wb_cyc_i                      (wb_cyc_i),
168
    .wb_stb_i                      (wb_stb_i),
169
    .wb_we_i                       (wb_we_i),
170
    .wb_sel_i                      (wb_sel_i),
171
    .wb_adr_i                      (wb_adr_i),
172
    .wb_dat_i                      (wb_dat_i),
173
    .wb_dat_o                      (wb_dat_o),
174
    .wb_ack_o                      (wb_ack_o),
175
 
176
    .wb_int_o                      (wb_int_o),
177
 
178
    .rx_scancode_i                 (rx_translated_scan_code),
179
    .rx_data_ready_i               (rx_translated_data_ready),
180
    .rx_read_o                     (rx_read_wb),
181
    .tx_data_o                     (tx_data),
182
    .tx_write_o                    (tx_write),
183
    .tx_write_ack_i                (tx_write_ack),
184
    .translate_o                   (translate),
185
    .ps2_clk_i                     (ps2_kbd_clk_pad_i),
186
    .inhibit_kbd_if_o              (inhibit_kbd_if)
187
) ;
188
 
189
ps2_translation_table i_ps2_translation_table
190
(
191
    .reset_i                    (wb_rst_i),
192
    .clock_i                    (wb_clk_i),
193
    .translate_i                (translate),
194
    .code_i                     (rx_scan_code),
195
    .code_o                     (rx_translated_scan_code),
196
    .address_i                  (8'h00),
197
    .data_i                     (8'h00),
198
    .we_i                       (1'b0),
199
    .re_i                       (1'b0),
200
    .data_o                     (),
201
    .rx_data_ready_i            (rx_data_ready),
202
    .rx_translated_data_ready_o (rx_translated_data_ready),
203
    .rx_read_i                  (rx_read_wb),
204
    .rx_read_o                  (rx_read_tt),
205
    .rx_released_i              (rx_released),
206
    .rx_extended_i              (rx_extended)
207
) ;
208
 
209
endmodule // ps2_top

powered by: WebSVN 2.1.0

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