module seg7(A,Y); input[3:0] A;//input 4 output[6:0] Y; // output 7 reg [6:0] Y;//register always @(A) begin case (A) 4'b0000 : Y<=7'b1111110; //0 4'b0001 : Y<=7'b0110000; //1 4'b0010 : Y<=7'b1101101; //2 4'b0011 : Y<=7'b1111001; //3 4'b0100 : Y<=7'b0110011; //4 4'b0101 : Y<=7'b1011011; //5 4'b0110 : Y<=7'b1011111; //6 4'b0111 : Y<=7'b1110000; //7 4'b1000 : Y<=7'b1111111; //8 4'b1001 : Y<=7'b1111011; //9 default : Y<=7'b0000000; endcase endendmodule