电路计算机辅助设n计.pptVIP

  • 2
  • 0
  • 约3.41万字
  • 约 102页
  • 2016-11-30 发布于湖南
  • 举报
电路计算机辅助设n计

(4)异步清除十进制加法计数器的描述 异步清除是指复位信号有效时,计数器立即被清零,不考虑时钟。复位信号clr,高电平有效;时钟信号clk,上升沿触发;当clr=1,计数器清0。clr=0时,计数器正常计数。 module example_4_14 (clr, clk, cnt, out); //模块名称和端口名 input clr, clk; output[3:0] out; output cnt; reg[3:0] out; reg cnt; always @(posedge clk or posedge clr) begin if (clr) begin out=4’b0000; cnt=0; end else if (out==4’b1001) begin out=4’b0000; cnt=1; end else begin cnt=0; out=out+1; end end endmodule (5)BCD数加法器 module BCD_add

文档评论(0)

1亿VIP精品文档

相关文档