【原创】The solutional manual of the Verilog HDL: A Guide to Digital Design and Synthesis (2nd)--ch05
2011-03-13 18:45
2451 查看
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:
![](http://images.cnblogs.com/cnblogs_com/halflife/201103/201103131844432683.jpg)
![](http://images.cnblogs.com/cnblogs_com/halflife/201103/201103131844444602.jpg)
![](http://images.cnblogs.com/cnblogs_com/halflife/201103/201103131844447077.jpg)
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:
![](http://images.cnblogs.com/cnblogs_com/halflife/201103/20110313184444632.jpg)
![](http://images.cnblogs.com/cnblogs_com/halflife/201103/201103131844457011.jpg)
![](http://images.cnblogs.com/cnblogs_com/halflife/201103/201103131844457534.jpg)
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:
![](http://images.cnblogs.com/cnblogs_com/halflife/201103/201103131844459453.jpg)
![](http://images.cnblogs.com/cnblogs_com/halflife/201103/201103131844464960.jpg)
![](http://images.cnblogs.com/cnblogs_com/halflife/201103/201103131844469387.jpg)
4. The logic diagram for an RS latch with delay is shown below.
![](http://images.cnblogs.com/cnblogs_com/halflife/201103/201103131844461862.jpg)
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.
![](http://images.cnblogs.com/cnblogs_com/halflife/201103/20110313184446434.jpg)
my answer:
![](http://images.cnblogs.com/cnblogs_com/halflife/201103/201103131844476813.jpg)
![](http://images.cnblogs.com/cnblogs_com/halflife/201103/201103131844476780.jpg)
![](http://images.cnblogs.com/cnblogs_com/halflife/201103/201103131844479255.jpg)
5. Design a 2-to-1 multiplexer using bufif0 and bufif1 gates as shown below.
![](http://images.cnblogs.com/cnblogs_com/halflife/201103/201103131844479778.jpg)
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 |
my answer:
![](http://images.cnblogs.com/cnblogs_com/halflife/201103/201103131844489745.jpg)
![](http://images.cnblogs.com/cnblogs_com/halflife/201103/201103131844486124.jpg)
![](http://images.cnblogs.com/cnblogs_com/halflife/201103/201103131844487727.jpg)
Reference
Smair Palnitkar, <Verilog HDL: A Guide to Digital Design and Synthesis (2nd) >相关文章推荐
- 【原创】The solutional manual of the Verilog HDL: A Guide to Digital Design and Synthesis (2nd)—ch07-I
- 【原创】The solutional manual of the Verilog HDL: A Guide to Digital Design and Synthesis (2nd)—ch07-II
- 【原创】The solutional manual of the Verilog HDL: A Guide to Digital Design and Synthesis (2nd)--ch03
- 【原创】The solutional manual of the Verilog HDL: A Guide to Digital Design and Synthesis (2nd)--ch06
- 【原创】The solutional manual of the Verilog HDL: A Guide to Digital Design and Synthesis (2nd)--ch12
- 【原创】The solutional manual of the Verilog HDL: A Guide to Digital Design and Synthesis (2nd)--ch10
- 【原创】The solutional manual of the Verilog HDL: A Guide to Digital Design and Synthesis (2nd)--ch04
- 【原创】The solutional manual of the Verilog HDL: A Guide to Digital Design and Synthesis (2nd)--ch08
- 【原创】The solutional manual of the Verilog HDL: A Guide to Digital Design and Synthesis (2nd)--ch02
- 【原创】The solutional manual of the Verilog HDL: A Guide to Digital Design and Synthesis (2nd)—ch07-III
- 【原创】The solutional manual of the Verilog HDL: A Guide to Digital Design and Synthesis (2nd)--ch09
- Guide to Television and Video Technology, Fourth Edition: The Guide for the Digital Age - from HDTV,
- The Scientist and Engineer's Guide to Digital Signal Processing一书的阅读总结
- The Semantic Web : A Guide to the Future of XML, Web Services, and Knowledge Management
- The Essential Guide to User Interface Design: An Introduction to GUI Design Principles and Technique
- Design and Usability of Digital Libraries: Case Studies in the Asia Pacific
- The Essential Guide to CSS and HTML Web Design
- A step-by-step guide to the use of the Intel OpenCV library and the Microsoft DirectShow technology
- A Guide to Blocks & Grand Central Dispatch (and the Cocoa API's making use of them)
- 《The Scientist and Engineer's Guide to Digital Signal Processing 》Study Noting