module lee(q,Dp,sel,k,z,clk);
output [6:0]q
output Dp;
output [2:0]sel;
input clk;
input [3:0]k,z;
integer i;
reg [3:0]a,b,c,out;
reg [6:0]q;
reg Dp;
reg [2:0]sel;
alway@(k,z)
begin
i=0;
begin i=k*z; end
end
always@(i)
begin
5:c=i/100;
6:b=(i-c*100)/10;
7:a=i-c*100-b*10;
end
alawys@(posedge clk)
begin
sel=sel+1;
case(sel)
0:out=10;
1:out=10;
2:out=10;
3:out=10;
4:out=10;
5:begin if(out<=9) out=a; else out=10; end
6:begin if(out<=9) out=b; else out=10; end
7:begin if(out<=9) out=c; else out=10; end
endcase
end
always@(out)
begin
case(out)
0:q=8'b00111111;
1:q=8'b00000110;
2:q=8'b01011011;
3:q=8'b01001111;
4:q=8'b01100110;
5:q=8'b00010001;
6:q=8'b01111101;
7:q=8'b00000111;
8:q=8'b01111111;
9:q=8'b01101111;
10:q=8'b00000000;
default:q=8'b00000000;
endcase
end
endmodule