Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3) Write a VHDL entity and architecture that implements a comparator that finds out the maximum number and minimum number in 4 8-bit inputs. Your

image text in transcribed

image text in transcribed

3) Write a VHDL entity and architecture that implements a comparator that finds out the maximum number and minimum number in 4 8-bit inputs. Your comparator is required to output the values of the max and min PLUS their indexes. For example, for 4 inputs 34,51, 0, 255", (expressed as integers) your comparator determines that the fourth input is the max and its value is 255; the third input is the min and its value is 0. Your comparator should have the following ports: port(s) type meaning ino- in 3 8-bit std_logic_vector inputs 8-bit inputs to be compared max_index 2-bit std_logic_vector output Index (0-3) of input with max value min_index 2-bit std_logic_vector output Index (0-3) of input with min value max_value 8-bit std_logic_vector output Value of max input min_value 8-bit std_logic_vector output Value of min input For the example inputs 34, 51, 0, 255", i.e., (**0010_0010", "0011_0011, "0000_0000", "1111_1111"), your comparator should have the following outputs: max_index: 11; min_index: 10; max_value: 1111_1111; min_value: 0000_0000; 4) Write a test bench to test your code for a minimum of 10 test cases. The test cases should thoroughly exercise all of the special cases, for example: Multiple inputs having the same max value; Multiple inputs having the same min value; Multiple inputs having the same max and min value. 3) Write a VHDL entity and architecture that implements a comparator that finds out the maximum number and minimum number in 4 8-bit inputs. Your comparator is required to output the values of the max and min PLUS their indexes. For example, for 4 inputs 34,51, 0, 255", (expressed as integers) your comparator determines that the fourth input is the max and its value is 255; the third input is the min and its value is 0. Your comparator should have the following ports: port(s) type meaning ino- in 3 8-bit std_logic_vector inputs 8-bit inputs to be compared max_index 2-bit std_logic_vector output Index (0-3) of input with max value min_index 2-bit std_logic_vector output Index (0-3) of input with min value max_value 8-bit std_logic_vector output Value of max input min_value 8-bit std_logic_vector output Value of min input For the example inputs 34, 51, 0, 255", i.e., (**0010_0010", "0011_0011, "0000_0000", "1111_1111"), your comparator should have the following outputs: max_index: 11; min_index: 10; max_value: 1111_1111; min_value: 0000_0000; 4) Write a test bench to test your code for a minimum of 10 test cases. The test cases should thoroughly exercise all of the special cases, for example: Multiple inputs having the same max value; Multiple inputs having the same min value; Multiple inputs having the same max and min value

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

Step: 3

blur-text-image

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

Cost And Management Audit

Authors: Dr Veena Soni

1st Edition

6202551992, 978-6202551991

More Books

Students also viewed these Accounting questions

Question

b. What is the 6th percentile of the distribution?

Answered: 1 week ago

Question

Address an envelope properly.

Answered: 1 week ago

Question

Discuss guidelines for ethical business communication.

Answered: 1 week ago