module seg7(in,out); input [3:0] in; output [7:0] out; reg [6:0] t; always @(in) begin case (in) //abcdefg 'b0000: t = 'b1111110; 'b0001: t = 'b0110000; 'b0010: t = 'b1101101; 'b0011: t = 'b1111001; 'b0100: t = 'b0110011; 'b0101: t = 'b1011011; 'b0110: t = 'b1011111; 'b0111: t = 'b1110000; 'b1000: t = 'b1111111; 'b1001: t = 'b1110011; 'b1010: t = 'b1110111; 'b1011: t = 'b0011111; 'b1100: t = 'b1001110; 'b1101: t = 'b0111101; 'b1110: t = 'b1001111; default: t= 'b1000111; endcase end assign out={1'b1,~t}; endmodule