Hardware Design: SIE
Sign in or create your account | Project List | Help
Hardware Design: SIE Git Source Tree
Root/
| 1 | `timescale 1ns / 1ps |
| 2 | ////////////////////////////////////////////////////////////////////////////////// |
| 3 | // Company: |
| 4 | // Engineer: |
| 5 | // |
| 6 | // Create Date: 12:22:40 10/07/2010 |
| 7 | // Design Name: |
| 8 | // Module Name: kb_ps2 |
| 9 | // Project Name: keyboard |
| 10 | // Target Devices: |
| 11 | // Tool versions: |
| 12 | // Description: controlador de teclado |
| 13 | // |
| 14 | // Dependencies: ps2_rx, ps2_tx |
| 15 | // |
| 16 | // Revision: |
| 17 | // Revision 0.01 - File Created |
| 18 | // Additional Comments: |
| 19 | // |
| 20 | ////////////////////////////////////////////////////////////////////////////////// |
| 21 | module kb_ps2( |
| 22 | input wire clk, reset, |
| 23 | input wire we_ps2, |
| 24 | inout wire ps2_data, ps2_clk, |
| 25 | input wire [7:0] din, |
| 26 | output wire rx_done, tx_done, |
| 27 | output wire [7:0] dout |
| 28 | ); |
| 29 | |
| 30 | // signal declaration |
| 31 | wire tx_idle; |
| 32 | |
| 33 | // instantiate ps2 receiver |
| 34 | ps2_rx ps2_rx_1 |
| 35 | (.clk(clk), .reset(reset), .rx_en(tx_idle), |
| 36 | .ps2_data(ps2_data), .ps2_clk(ps2_clk), |
| 37 | .rx_done(rx_done), .dout(dout)); |
| 38 | // instantiate ps2 transmitter |
| 39 | ps2_tx ps2_tx_1 |
| 40 | (.clk(clk), .reset(reset), .we_ps2(we_ps2), |
| 41 | .din(din), .ps2_data(ps2_data), .ps2_clk(ps2_clk), |
| 42 | .tx_idle(tx_idle), .tx_done(tx_done)); |
| 43 | |
| 44 | |
| 45 | endmodule |
| 46 |
Branches:
master
