- 完成课本例题4.12,进行综合和仿真(包括功能仿真和时序仿真),查看仿真结果,将Verilog代码和仿真波形图整理入实验报告。
功能文件:
module shiyan1(out,reset,clk);
input reset,clk;
output reg[3:0] out;
always @(posedge clk)
begin
if(reset)
out<=0;
else
out<=out+1;
end
endmodule
测试文件
`timescale 1ns/1ns