三种方法用Verilog实现多人表决器

module biaojue( a,b,c,d,e,f); input a,b,c,d,e; output f; reg f; reg[2:0] count1; initial count1=0; always@(a,b,c,d,e) begin count1=a+b+c+d+e; f=count1<3?0:1;//当人数在三人如下是输出1 end endmodule module biaojue
相关文章
相关标签/搜索