FPGA减法计数器器 用Verilog实现的 越简单越好 谢谢了

如题所述

module(clk,rst,counter);
input wire clk,rst;
output reg[7:0] counter;
always@(posedge clk or negedge rst)
begin
if(!rst)counter<=255;
else begin
if(counter==0)counter<=255;
else counter<=couter-1;
end
end
endmodule
温馨提示:答案为网友推荐,仅供参考
相似回答