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

Subversion Repositories ps2

[/] [ps2/] [tags/] [rel_13/] [bench/] [verilog/] [ps2_sim_top.v] - Blame information for rev 42

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

Line No. Rev Author Line
1 2 mihad
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  ps2_sim_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 24 primozs
// Revision 1.4  2003/07/01 12:33:45  mihad
47
// Added an option to use constant values instead of RAM
48
// in the translation table.
49
//
50 23 mihad
// Revision 1.3  2003/05/28 16:26:51  simons
51
// Change the address width.
52
//
53 15 simons
// Revision 1.2  2002/04/09 13:16:04  mihad
54
// Mouse interface added
55
//
56 11 mihad
// Revision 1.1.1.1  2002/02/18 16:16:55  mihad
57
// Initial project import - working
58 2 mihad
//
59 11 mihad
//
60 2 mihad
 
61 11 mihad
`include "ps2_defines.v"
62 2 mihad
module ps2_sim_top
63
(
64
    wb_clk_i,
65
    wb_rst_i,
66
    wb_cyc_i,
67
    wb_stb_i,
68
    wb_we_i,
69
    wb_sel_i,
70
    wb_adr_i,
71
    wb_dat_i,
72
    wb_dat_o,
73
    wb_ack_o,
74 11 mihad
 
75 2 mihad
    wb_int_o,
76 11 mihad
 
77 2 mihad
    ps2_kbd_clk_io,
78
    ps2_kbd_data_io
79 11 mihad
 
80
    `ifdef PS2_AUX
81
    ,
82
    wb_intb_o,
83
 
84
    ps2_aux_clk_io,
85
    ps2_aux_data_io
86
    `endif
87 2 mihad
) ;
88
 
89
input wb_clk_i,
90
      wb_rst_i,
91
      wb_cyc_i,
92
      wb_stb_i,
93
      wb_we_i ;
94
 
95
input [3:0] wb_sel_i ;
96
 
97 24 primozs
input [3:0]  wb_adr_i ;
98 23 mihad
input [31:0] wb_dat_i ;
99 2 mihad
 
100
output [31:0] wb_dat_o ;
101
 
102
output wb_ack_o,
103
       wb_int_o ;
104 11 mihad
 
105 2 mihad
inout  ps2_kbd_clk_io,
106
       ps2_kbd_data_io ;
107 11 mihad
`ifdef PS2_AUX
108
output wb_intb_o ;
109
inout  ps2_aux_clk_io ;
110
inout  ps2_aux_data_io ;
111
`endif
112 2 mihad
 
113
wire ps2_kbd_clk_pad_i  = ps2_kbd_clk_io ;
114
wire ps2_kbd_data_pad_i = ps2_kbd_data_io ;
115
 
116
wire ps2_kbd_clk_pad_o,
117
     ps2_kbd_data_pad_o,
118
     ps2_kbd_clk_pad_oe_o,
119
     ps2_kbd_data_pad_oe_o ;
120
 
121
ps2_top i_ps2_top
122
(
123
    .wb_clk_i              (wb_clk_i),
124
    .wb_rst_i              (wb_rst_i),
125
    .wb_cyc_i              (wb_cyc_i),
126
    .wb_stb_i              (wb_stb_i),
127
    .wb_we_i               (wb_we_i),
128
    .wb_sel_i              (wb_sel_i),
129
    .wb_adr_i              (wb_adr_i),
130
    .wb_dat_i              (wb_dat_i),
131
    .wb_dat_o              (wb_dat_o),
132
    .wb_ack_o              (wb_ack_o),
133 11 mihad
 
134 2 mihad
    .wb_int_o              (wb_int_o),
135 11 mihad
 
136 2 mihad
    .ps2_kbd_clk_pad_i     (ps2_kbd_clk_pad_i),
137
    .ps2_kbd_data_pad_i    (ps2_kbd_data_pad_i),
138
    .ps2_kbd_clk_pad_o     (ps2_kbd_clk_pad_o),
139
    .ps2_kbd_data_pad_o    (ps2_kbd_data_pad_o),
140
    .ps2_kbd_clk_pad_oe_o  (ps2_kbd_clk_pad_oe_o),
141
    .ps2_kbd_data_pad_oe_o (ps2_kbd_data_pad_oe_o)
142 11 mihad
 
143
    `ifdef PS2_AUX
144
    ,
145
    .wb_intb_o (wb_intb_o),
146
 
147
    .ps2_aux_clk_pad_i (ps2_aux_clk_io),
148
    .ps2_aux_data_pad_i (ps2_aux_data_io),
149
    .ps2_aux_clk_pad_o (ps2_aux_clk_pad_o),
150
    .ps2_aux_data_pad_o (ps2_aux_data_pad_o),
151
    .ps2_aux_clk_pad_oe_o (ps2_aux_clk_pad_oe_o),
152
    .ps2_aux_data_pad_oe_o (ps2_aux_data_pad_oe_o)
153
    `endif
154 2 mihad
) ;
155
 
156
assign ps2_kbd_clk_io  = ps2_kbd_clk_pad_oe_o  ? ps2_kbd_clk_pad_o  : 1'bz ;
157
assign ps2_kbd_data_io = ps2_kbd_data_pad_oe_o ? ps2_kbd_data_pad_o : 1'bz ;
158 11 mihad
 
159
`ifdef PS2_AUX
160
assign ps2_aux_clk_io  = ps2_aux_clk_pad_oe_o  ? ps2_aux_clk_pad_o  : 1'bz ;
161
assign ps2_aux_data_io = ps2_aux_data_pad_oe_o ? ps2_aux_data_pad_o : 1'bz ;
162
`endif
163 2 mihad
endmodule

powered by: WebSVN 2.1.0

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