mux4to1.v

来自「多个Verilog和vhdl程序例子」· Verilog 代码 · 共 22 行

V
22
字号
// Example where we create latches that are not wanted
// see the on-line help 
// under "Combinational Logic (Using Always Blocks)"

module mux4to1(out, a, b, c, d, sel);
output out;
input a, b, c, d;
input [1:0] sel;
reg out;

always @(sel or a or b or c or d)
begin
	case (sel)
	2'd0: out = a;
  	2'd1: out = b;
  	2'd3: out = d;
	endcase
end
endmodule


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?