【原创】The solutional manual of the Verilog HDL: A Guide to Digital Design and Synthesis (2nd)--ch05
Chapter 5. Gate-level Modeling
5.4 Exercises
1. Create your own 2-input Verilog gates called my_or, my_and and my_not from 2-input nand gates. Check the functionality of these gates with a stimulus module.
my answer:
2. A 2-input xor gate can be built from my_and, my_or and my_not gates. Construct an xor module in Verilog that realizes the logic function, z=xy’+x’y. Inputs are x and y, and z is the output. Write a stimulus module that exercises all four combinations of x and y inputs.
my answer:
3. The 1-bit full adder described in the chapter can be expressed in a sum of products form.
sum=a.b.c_in+a’.b.c_in’+a’.b’.c_in+a.b’c_in’
c_out=a.b+b.c_in+a.c_in
Assuming a,b,c_in are the inputs and sum and c_out are the outputs, design a logic circuit to implement the 1-bit full adder, using only and, not ,and or gates. Write the Verilog description for the circuit. You may use up to 4-input Verilog primitive and and or gates. Write the stimulus for the full adder and check the functionality for all input combinations.
my answer:
4. The logic diagram for an RS latch with delay is shown below.
Write the Verilog description for the RS latch. Include delays of 1 unit when instantiating the nor gates. Write the stimulus module for the RS latch, using the following table, and verify the outputs.
my answer:
5. Design a 2-to-1 multiplexer using bufif0 and bufif1 gates as shown below.
The delay specification for gates b1 and b2 are as follows:
Min |
Typ |
Max |
|
Rise |
1 |
2 |
3 |
Fall |
3 |
4 |
5 |
Turnoff |
5 |
6 |
7 |
Apply stimuls and test the output values.
my answer:
Reference
Smair Palnitkar, <Verilog HDL: A Guide to Digital Design and Synthesis (2nd) >
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· 百万级群聊的设计实践
· 永远不要相信用户的输入:从 SQL 注入攻防看输入验证的重要性
· 全网最简单!3分钟用满血DeepSeek R1开发一款AI智能客服,零代码轻松接入微信、公众号、小程
· .NET 10 首个预览版发布,跨平台开发与性能全面提升
· 《HelloGitHub》第 107 期
2010-03-13 (原创)如何在Quartus II里查看综合器生成的原理图(Quartus II)