0% found this document useful (0 votes)
44 views1 page

Input Wire Input Wire Input Wire Input Wire Output Wire Output Wire Output Wire Wire Wire Assign

This document contains a module declaration for a keyboard_top module that interfaces with a PS/2 keyboard and drives 7-segment displays. It takes in a master clock, PS/2 data and clock lines, and four buttons. It contains internal logic to generate different clock frequencies and interfaces with a keyboard and 7-segment decoder module. The keyboard_top module outputs the 7-segment display digits and controls.

Uploaded by

marceliny
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views1 page

Input Wire Input Wire Input Wire Input Wire Output Wire Output Wire Output Wire Wire Wire Assign

This document contains a module declaration for a keyboard_top module that interfaces with a PS/2 keyboard and drives 7-segment displays. It takes in a master clock, PS/2 data and clock lines, and four buttons. It contains internal logic to generate different clock frequencies and interfaces with a keyboard and 7-segment decoder module. The keyboard_top module outputs the 7-segment display digits and controls.

Uploaded by

marceliny
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

1 `timescale 1ns / 1ps

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

You might also like