使用Verilog写一段新手常写的无用的冗余代码并为其注释
//定义一个模块 module reduntant_code();
//定义一个输入端口
input a;
//定义一个输出端口
output b;
//定义一个中间变量
wire c;
//定义一个无用的always块
always @(a)
begin
//无用的if语句
if(a == 1)
begin
c <= 1;
end
else
begin
c <= 0;
end
end
//定义一个无用的assign语句
assign b = c;
endmodule
原文地址: https://www.cveoy.top/t/topic/fjYu 著作权归作者所有。请勿转载和采集!