我想得到一个脉冲:
module cs(rst,clk);
input clk;
input rst;
reg[27:0] cnt;
reg js;
always@(posedge clk or posedge rst)
begin
if(rst)
begin
cnt<=28'd0;
js<=0;
end
else
begin
if(cnt==28'd10)
begin
cnt<=28'd0;
js<=1;
end
else
begin
cnt<=cnt+1;
js<=0;
end
end
endmodule
仿真结果却是这样:C:Documents and SettingsAdministrator桌面,那里有错,谢谢
此帖出自
小平头技术问答
一周热门 更多>