module leddot(clock,ldoa,ldob); input clock; output[7:0] ldoa; output [7:0] ldob; reg[7:0] ldoa; reg[7:0] ldob; reg[32:0]count; always@(posedge clock) begin count=count+1; ldob=0; end always@(count[25:23]) begin case(count[25:23]) 4'h0:ldoa=8'hfe; 4'h1:ldoa=8'hfd; 4'h2:ldoa=8'hfb; 4'h3:ldoa=8'hf7; 4'h4:ldoa=8'hef; 4'h5:ldoa=8'hdf; 4'h6:ldoa=8'hbf; 4'h7:ldoa=8'h7f; 4'h8:ldoa=8'hff; 4'h9:ldoa=8'hff; 4'ha:ldoa=8'h00; 4'hb:ldoa=8'h00; default:ldoa=8'hff; endcase end endmodule 此例中count[32:0]什么意思,COUNT[25:23]中25,23 个代表什么意思! |