【原创】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:

clip_image002

clip_image004

clip_image006

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:

clip_image008

clip_image010

clip_image012

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:

clip_image014

clip_image016

clip_image018

4. The logic diagram for an RS latch with delay is shown below.

clip_image020

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.

clip_image022

my answer:

clip_image024

clip_image026

clip_image028

5. Design a 2-to-1 multiplexer using bufif0 and bufif1 gates as shown below.

clip_image030

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:

clip_image032

clip_image034

clip_image036

Reference

Smair Palnitkar, <Verilog HDL: A Guide to Digital Design and Synthesis (2nd) >

posted on   yf.x  阅读(20677)  评论(0编辑  收藏  举报

编辑推荐:
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
阅读排行:
· 百万级群聊的设计实践
· 永远不要相信用户的输入:从 SQL 注入攻防看输入验证的重要性
· 全网最简单!3分钟用满血DeepSeek R1开发一款AI智能客服,零代码轻松接入微信、公众号、小程
· .NET 10 首个预览版发布,跨平台开发与性能全面提升
· 《HelloGitHub》第 107 期
历史上的今天:
2010-03-13 (原创)如何在Quartus II里查看综合器生成的原理图(Quartus II)
< 2011年3月 >
27 28 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31 1 2
3 4 5 6 7 8 9

导航

统计

点击右上角即可分享
微信分享提示