weibode01 发表于 2010-11-5 14:46:10

基于初学Verilog者。。数据选择器参考程序

数据选择器参考程序:
module example4(z,a,b,c,d,s1,s2,);
inputs1,s2;
inputa,b,c,d;
outputz;
reg z;
always   @(s1 or s2)
begin
    case({s1,s2})
      2'b00: z=a;
      2'b01: z=b;
      2'b10: z=c;
      2'b11: z=d;
endcase
end
endmodule
页: [1]
查看完整版本: 基于初学Verilog者。。数据选择器参考程序