《verilogHDL约翰逊计数器(免费).doc》由会员分享,可在线阅读,更多相关《verilogHDL约翰逊计数器(免费).doc(3页珍藏版)》请在金锄头文库上搜索。
一、 实验课题:8位约翰逊计数器二、Verilog程序:2.1 主程序module count(reset,clk,out); input reset,clk; output out; reg 7:0 out; always (posedge clk) begin if(reset) out=8b0; else begin out0=out7; out7:1=out6:0; end endendmodule2.2 激励module sti; reg clk,reset; wire 7:0 out; count test(reset,clk,out); initial clk=8b0; always #10 clk=clk; initial begin reset=1; #50 reset=0; endendmodule三、 实验波形截图:四、波形分析及实验心得:4.1 波形分析如图所示:波形实验结果与理论相符4.2 实验心得本次实验教上次有了充分的准备,所以做起来比较容易,没有出现大的问题。总体来讲实验比较顺利。- 3 -