Verilog练习:HDLBits笔记7

三、Circuits

Combinational logic-Basic Gates

1、Wire

Problem Statement:

mplement the following circuit:

Exams m2014q4h.png

module top_module (
    input  in,
    output out
);
    assign out = in;

endmodule

 2、GND

Problem Statement:

Implement the following circuit:

Exams m2014q4i.png

module top_module (
    output out
);
    assign out = 1'b0;

endmodule

 3、NOR

Problem Statement:

Implement the following circuit:

Exams m2014q4e.png

module top_module (
    input  in1,
    input  in2,
    output out
);
    assign out = ~(in1 | in2);

endmodule

 4、Another gate

Problem Statement:

Implement the following circuit:

Exams m2014q4f.png

module top_module (
    input in1,
    input in2,
    output out
);
    assign out = ~in2 & in1;

endmodule

 5、Two gates

Problem Statement:

mplement the following circuit:

Exams m2014q4g.png

module top_module (
    input in1,
    input in2,
    input in3,
    output out
);
    wire out1;
    
    assign out1 = ~(in1 ^ in2);
    assign out = out1 ^ in3;

endmodule

  6、More logic gates

Problem Statement:

Build a combinational circuit with two inputs, a and b.

There are 7 outputs, each with a logic gate

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值