The project, made in the Verilog language, implements the necessary code for interfacing with a standard PS2 keyboard.
Explore the project »
Report Bug
·
Request Feature
Table of Contents
The project, made in the Verilog language, implements the code for interfacing with a standard PS2 keyboard.
The code was tested by synthesizing it on a Cyclone III FPGA board. After the synthesis:
- when a key is pressed on the connected keyboard, the four seven-segment displays will show the last two bytes of the generated make code as long as the key is pressed,
- if the pressed key is released, the four seven-segment displays will show the last two bytes of the generated break code.
To get a local copy up and running follow these simple steps.
To set up the project, you will need to:
-
install QuestaSim version 10.4c,
-
install Visual Studio Code,
-
install Icarus Verilog compiler,
-
get the Verilog-HDL/SystemVerilog/Bluespec SystemVerilog VS Code extension,
-
in the extension's settings set:
-
Linter to
iverilog
, -
Iverilog Arguments to
-c ./tooling/config/list-icarus-verilog.lst
.
-
Setup & execution:
-
Clone the repo:
git clone https://github.com/jovan-vukic/ps2-keyboard-interface
-
Open the terminal in VS Code and type the following:
C:/"Program Files"/altera/13.0sp1/quartus/bin/cygwin/bin/bash
-
Change the current folder to the
tooling
folder:cd tooling
-
Type the following to start the
testbench_verification_uvm.sv
test:./xpack/bin/make simul_run
-
Type the following to synthesize the
ps2.v
module on the connected Cyclone III FPGA board:./xpack/bin/make synth_pgm
-
To get the additional make tool options type into the terminal in VS Code:
./xpack/bin/make help
The PS2 keyboard specifications include three Scan Code Sets.
- Scan Code Set 1 is the old XT mode rarely available on keyboards.
- Scan Code Set 2 is the default Scan Code Set guaranteed to work.
- Scan Code Set 3 is even rarer to find.
It should be noted that this implementation only supports PS2 Scan Code Set 2.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.md
for more information.
Jovan - @jovan-vukic
Project Link: https://github.com/jovan-vukic/ps2-keyboard-interface
Used resources: