Create a module that implements an AND gate.
创建一个实现AND门的模块。
AND gate 就是与门
输入输出关系
输入a | 输入b | 输出out |
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
在verilog也不需要这么麻烦直接用运算符&就可以实现与门了
module top_module(
input a,
input b,
output out );
assign out = a&b;
endmodule
Create a module that implements an AND gate.
创建一个实现AND门的模块。
AND gate 就是与门
输入输出关系
输入a | 输入b | 输出out |
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
在verilog也不需要这么麻烦直接用运算符&就可以实现与门了
module top_module(
input a,
input b,
output out );
assign out = a&b;
endmodule