level 1
回复:如何用EDA设计一下28进制的计数器?? 嘿嘿,做出来了~~~ module count28(clk,clr,en,outh,outl); input clk,clr,en; output [3:0] outh,outl; reg [3:0] outh,outl; always @(posedge clk or posedge clr) begin if(clr) begin{outh,outl}<=8'h00; end else if (en) begin if(outh==2) begin if(outl==7) begin outh<=0; outl<=0;end else outl<=outl+1; end else if(outl==9) begin outl<=0;outh<=outh+1;end else outl<=outl+1; end end endmodule
2008年11月13日 06点11分