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

Subversion Repositories ps2

[/] [ps2/] [tags/] [rel_2/] [bench/] [verilog/] [ps2_sim_top.v] - Blame information for rev 15

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

powered by: WebSVN 2.1.0

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