2011年10月25日

[笔记] 数码管显示(十一)

摘要: 一、Codemodule seg7(// inputinput clk_50,input rst_n, //outputoutput[6:0] HEX7,HEX6,HEX5,HEX4,HEX3,HEX2,HEX1,HEX0);reg[24:0] cnt; //2的25次方,约640msalways@(posedge clk_50 or negedge rst_n) if(!rst_n) cnt <= 25'd0; else cnt <= cnt+1'b1; reg[3:0] num;always@(posedge clk_50 or negedge rst_n) i 阅读全文

posted @ 2011-10-25 22:57 LiangXuan 阅读(544) 评论(0) 推荐(0)

[笔记] Johnson计数器(十)

摘要: 一、Codemodule johnson(// inputinput clk_50,input rst_n,input key3,key2,key1,// outputoutput[17:0] ledr);//parameter ledr_dir = 1'b0; //1'b1--right,1'b0--left//parameter ledr_on = 1'b1; //1'b1--on,1'b0--offreg ledr_dir; //1'b1--right,1'b0--leftreg ledr_on; //1'b1--o 阅读全文

posted @ 2011-10-25 22:56 LiangXuan 阅读(417) 评论(0) 推荐(0)

导航