Input Wire Input Wire Input Wire Input Wire Output Wire Output Wire Output Wire Wire Wire Assign
Input Wire Input Wire Input Wire Input Wire Output Wire Output Wire Output Wire Wire Wire Assign
2 //////////////////////////////////////////////////////////////////////////////////
3 // Company:
4 // Engineer:
5 //
6 // Create Date: 17:24:28 11/08/2011
7 // Design Name:
8 // Module Name: keyboard_top
9 // Project Name:
10 // Target Devices:
11 // Tool versions:
12 // Description:
13 //
14 // Dependencies:
15 //
16 // Revision:
17 // Revision 0.01 - File Created
18 // Additional Comments:
19 //
20 //////////////////////////////////////////////////////////////////////////////////
21 module keyboard_top(
22 input wire mclk ,
23 input wire PS2C ,
24 input wire PS2D ,
25 input wire [3:0] btn ,
26 output wire [6:0] a_to_g ,
27 output wire dp ,
28 output wire [3:0] an
29 );
30
31 wire pclk, clk25, clk190, clr;
32 wire [15:0] xkey;
33 assign clr = btn[3];
34 clkdiv U1 (.mclk(mclk), .clr(clr), .clk190(clk190), .clk25(clk25));
35
36 keyboard U2 (.clk25(clk25 ), .clr(clr), .PS2C(PS2C), .PS2D(PS2D), .xkey(xkey));
37 x7segb U3 (.x(xkey), .cclk(clk190), .clr(clr), .a_to_g(a_to_g), .an(an), .dp(dp));
38 endmodule
39