summaryrefslogtreecommitdiffstats
path: root/hexled.v
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2003-09-06 03:42:19 +0000
committerH. Peter Anvin <hpa@zytor.com>2003-09-06 03:42:19 +0000
commite6922d76fbcec783fc0080b6b93f0669c906a42d (patch)
treeb35b09b12635b110b79d76dcec004c5ee6ae095a /hexled.v
downloadkeyboard-e6922d76fbcec783fc0080b6b93f0669c906a42d.tar.gz
keyboard-e6922d76fbcec783fc0080b6b93f0669c906a42d.tar.xz
keyboard-e6922d76fbcec783fc0080b6b93f0669c906a42d.zip
Snapshot of keyboard controller project.
Diffstat (limited to 'hexled.v')
-rw-r--r--hexled.v31
1 files changed, 31 insertions, 0 deletions
diff --git a/hexled.v b/hexled.v
new file mode 100644
index 0000000..64a6081
--- /dev/null
+++ b/hexled.v
@@ -0,0 +1,31 @@
+module hexled (
+ value,
+ s7
+ );
+
+ input [3:0] value;
+ output [7: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;
+ endcase
+ end
+endmodule // hexled
+