code cleanup and font fix
This commit is contained in:
parent
044d846313
commit
e679a3ce68
10 changed files with 443 additions and 102 deletions
15
keyboard.sv
Normal file
15
keyboard.sv
Normal file
|
@ -0,0 +1,15 @@
|
|||
module keyboard (
|
||||
input wire clk_in,
|
||||
output bit keyboard [15:0]
|
||||
);
|
||||
|
||||
import "DPI-C" function bit [7:0] get_key();
|
||||
|
||||
always_ff @(posedge clk_in) begin
|
||||
bit[7:0] keyval = get_key();
|
||||
if (&keyval != 1) begin
|
||||
keyboard[keyval[3:0]] = keyval[7];
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
Loading…
Add table
Add a link
Reference in a new issue