Last active
October 17, 2018 02:39
-
-
Save koyamalmsteen/a2384370dee9a7f9dc6576664177f30b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module DataConv(clk,data,hled0,hled1,hled2,hled3); | |
input clk; | |
input [9:0] data; | |
output [7:0] hled0; | |
output [7:0] hled1; | |
output [7:0] hled2; | |
output [7:0] hled3; | |
wire [15:0] romdat; | |
wire [7:0] ihled3; | |
wire [7:0] ihled1; | |
rom u1(data,clk,romdat); | |
HexSegDec h0(romdat[3:0],hled0); | |
HexSegDec h1(romdat[7:4],ihled1); | |
HexSegDec h2(romdat[11:8],hled2); | |
HexSegDec h3(romdat[15:12],ihled3); | |
assign hled1={1'b0,ihled1[6:0]}; | |
assign hled3=(romdat[15]==1'b1) ? 8'b10111111 : ihled3; | |
endmodule |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment