summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2003-09-09 07:34:29 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2003-09-09 07:34:29 (GMT)
commit2d7483b97fc6d4542fda957f24c7f4cb0d849ba7 (patch)
treea30a00406749010e05cc10b116806e7ba6adc5f1
parenta579b98814f0bd4eb7cc11915d3f48d8e67f36c3 (diff)
downloadkeyboard-2d7483b97fc6d4542fda957f24c7f4cb0d849ba7.zip
keyboard-2d7483b97fc6d4542fda957f24c7f4cb0d849ba7.tar.gz
keyboard-2d7483b97fc6d4542fda957f24c7f4cb0d849ba7.tar.bz2
keyboard-2d7483b97fc6d4542fda957f24c7f4cb0d849ba7.tar.xz
Fungerar i stort sett; tabeller kan behöva justeras
-rw-r--r--hexled.v34
-rw-r--r--keyboard.v14
2 files changed, 25 insertions, 23 deletions
diff --git a/hexled.v b/hexled.v
index 64a6081..f7e32ef 100644
--- a/hexled.v
+++ b/hexled.v
@@ -4,27 +4,27 @@ module hexled (
);
input [3:0] value;
- output [7:0] s7;
+ output [6:0] s7;
always @( value )
begin
case ( value )
- 4'h0: s7 = ~8'b00111111;
- 4'h1: s7 = ~8'b00000110;
- 4'h2: s7 = ~8'b01011011;
- 4'h3: s7 = ~8'b01001111;
- 4'h4: s7 = ~8'b01100110;
- 4'h5: s7 = ~8'b01101101;
- 4'h6: s7 = ~8'b01111101;
- 4'h7: s7 = ~8'b00000111;
- 4'h8: s7 = ~8'b01111111;
- 4'h9: s7 = ~8'b01101111;
- 4'hA: s7 = ~8'b01110111;
- 4'hB: s7 = ~8'b01111100;
- 4'hC: s7 = ~8'b00111001;
- 4'hD: s7 = ~8'b01011110;
- 4'hE: s7 = ~8'b01111001;
- 4'hF: s7 = ~8'b01110001;
+ 4'h0: s7 = ~7'b0111111;
+ 4'h1: s7 = ~7'b0000110;
+ 4'h2: s7 = ~7'b1011011;
+ 4'h3: s7 = ~7'b1001111;
+ 4'h4: s7 = ~7'b1100110;
+ 4'h5: s7 = ~7'b1101101;
+ 4'h6: s7 = ~7'b1111101;
+ 4'h7: s7 = ~7'b0000111;
+ 4'h8: s7 = ~7'b1111111;
+ 4'h9: s7 = ~7'b1101111;
+ 4'hA: s7 = ~7'b1110111;
+ 4'hB: s7 = ~7'b1111100;
+ 4'hC: s7 = ~7'b0111001;
+ 4'hD: s7 = ~7'b1011110;
+ 4'hE: s7 = ~7'b1111001;
+ 4'hF: s7 = ~7'b1110001;
endcase
end
endmodule // hexled
diff --git a/keyboard.v b/keyboard.v
index a6b29e1..054780d 100644
--- a/keyboard.v
+++ b/keyboard.v
@@ -50,15 +50,17 @@ module keyboard (
assign ttya_txd = tty_out[0];
hexled hexled0 (
- .value ( tty_chars[3:0] ),
- .s7 ( s7_0 )
+ .value ( outdata[3:0] ),
+ .s7 ( s7_0[6:0] )
);
hexled hexled1 (
- .value ( tty_chars[7:4] ),
- .s7 ( s7_1 )
+ .value ( outdata[7:4] ),
+ .s7 ( s7_1[6:0] )
);
- assign led = outstat;
-
+ assign led = outstat;
+ assign s7_1[7] = ~1'b0;
+ assign s7_0[7] = ~1'b0;
+
// Output control
reg ps2_sel_q;
reg ps2_kclk_q;