📄 performance.v
字号:
module performance(InfoSeq,result,BER,clk,rst); /*清算误码个数*/
input InfoSeq,result,clk,rst;
output [7:0]BER;
reg [7:0]BER;
reg [3:0]count,i; /*设定两个计数器,一个用来记循环次数,一个记误码个数*/
always@(posedge clk or posedge rst)
if(rst)
begin
count<=0;
i<=0;
end
else
begin
if(i==12)
begin
i<=1;
if(InfoSeq!=result)count<=1;
else count<=0;
BER<=count;
end
else
begin
if(InfoSeq!=result)count<=count+1;
i<=i+1;
end
end
endmodule
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -