simple wire
module top_module( input in, output out );
wire rhs;
assign rhs = in;
assign out = rhs;
endmodule
Four wires
module top_module(
input a,b,c,
output w,x,y,z );
wire aw;
wire bw;
wire cw;
assign aw = a;
assign w = aw;
assign bw = b;
assign x = bw;
assign y = bw;
assign cw = c;
assign z = cw;
endmodule
Inverter
module top_module( input in, output out );
wire rhs;
assign rhs = in;
assign out = ~rhs;
endmodule
AND gate
module top_module(
input a,
input b,
output out );
assign out=a&b;
endmodule
NOR gate
module top_module(
input a,
input b,
output out );
assign out = ~(a|b);
endmodule
XNOR gate
module top_module(
input a,
input b,
output out );
assign

文章详细展示了Verilog语言中设计基础逻辑门模块(如AND,NOR,XOR,XNOR)以及7458芯片的实例,涉及信号声明、连接和逻辑运算。
最低0.47元/天 解锁文章
1175

被折叠的 条评论
为什么被折叠?



