Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 3: Using Behavioral Verilog You now repeat Problem 2 using behavioral Verilog. Simulate and verify your comparator using the same inputs as in Problem

Problem 3: Using Behavioral Verilog

You now repeat Problem 2 using behavioral Verilog. Simulate and verify your comparator using the same inputs as in Problem 2. Write about your experiences in designing circuits using structural and behavioral Verilog.

Problem 2: Design of a 4-bit Magnitude Comparator

Design, simulate and verify a 4-bit magnitude comparator in Verilog. Use a variety of inputs to test your design and include the results in your report. You may approach this problem in a hierarchical fashion. If you do so, first design a single-bit comparator and then wire four copies of the same comparator appropriately to produce a 4-bit comparator. A single bit comparator circuit has two data inputs, three control inputs and three compare outputs. The three control inputs provide a mechanism for generation of multi-bit comparators by cascading several 1-bit comparators. This is how the single bit comparator logic works. The A>B output is 1 if "the A input is greater than the B input (AB is 10)" or if "A is equal to B and the > input is 1." The A=B output is 1 if "A is equal to B and the = input is 1." The A < B output is the opposite of the A>B output. This line becomes 1 if "A input is less than B output (AB is 01)" or if "A is equal to B and the < input is 1." Based on this functional description of the 1-bit comparator, Karnaugh maps for its three outputs can be extracted easily. Since the logic is simple, you really don't need to refer to any literature other than the Verilog manual for its implementation. However, if you need any help, you could look at any elementary books on Logic Design. If you have any difficulty in understanding this problem, you may first consider a few simple numbers and make comparisons starting at the lsb moving toward the msb. If you like to take a "flat design" approach instead of the hierarchical design paradigm (that is, consider the 4-bit comparator as a single module), such a solution is also acceptable. But in practice, you generally follow a modular/hierarchical design approach.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database In Depth Relational Theory For Practitioners

Authors: C.J. Date

1st Edition

0596100124, 978-0596100124

More Books

Students also viewed these Databases questions

Question

What are some of the limitations of the traditional HR metrics?

Answered: 1 week ago

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago