📄 mux2.v
字号:
// Multiplexor example 2
module mux2(out, a, b, sel);
output out;
input a, b, sel;
reg out;
/* changes on a, b, and sel trigger the
always block to execute */
always @(a or b or sel)
begin
/* check the value of the sel input.
If sel is true, set out to a, otherwise
set out to b. */
case (sel)
1'b1: out = a;
1'b0: out = b;
default: out = 'bx;
endcase
end
endmodule
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -