module data_selector( input [3:0] in, input [1:0] sel, output reg out );

always @(*) case(sel) 2'b00: out = in[0]; 2'b01: out = in[1]; 2'b10: out = in[2]; 2'b11: out = in[3]; endcase

endmodule

用 case 语句描述 4 选 1 数据选择器组合电路只要一位输入信号 inO、inl、in2、in3 或选择信号 sell0中的任一个改变则输出改变写出完整 module 程序

原文地址: https://www.cveoy.top/t/topic/craH 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录