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

Subversion Repositories ps2

[/] [ps2/] [tags/] [rel_7/] [bench/] [verilog/] [ps2_sim_top.v] - Blame information for rev 11

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

powered by: WebSVN 2.1.0

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