Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A priority encoder is a device that takes a 2^n-bit input and encodes it to produce an n-bit result. If exactly one input bit is

image text in transcribed

A priority encoder is a device that takes a 2^n-bit input and encodes it to produce an n-bit result. If exactly one input bit is set, the output will be the bit position of that input bit. If more than one input bit is set, the encoder will prioritize the set input bits to determine the correct output. The following code is a dataflow model of a 4-to-2 bit priority encoder using conditional signal assignment in which priority is given to the lowest numbered input. Enter this code into the simulator and test it with all possible input combinations. Make sure that your test-bench tests the cases when multiple inputs are set and also the case when none of the inputs are set. Show your test-bench code and the graphical simulation results (cut & paste screenshot of waveform outputs into your homework solution). library IEEE; use IEEE.std_logic_l 164.all; entity pr_cncoder is port(SO, SI, S2, S3: in std_logic; Z:out std_logic_vector (1 downto 0)); end entity pr_cncoder; architecture dataflow of pr_cncoder is begin Z "00" after 5 ns when S0='1'else "01" after 5 ns when S1 = '1' else "10" after 5 ns when S2= '1' else "11" after 5 ns when S3= '1' else "(XT after 5 ns; end architecture dataflow; Rewrite the model using if-then-else statements within a process. Change the priority order to 2, 3, 0, and 1 with 2 being the highest priority input. Re-run the simulation. Show your code and the graphical simulation results. Delete (or comment out) the "default else clause" (that covers the case when none of the inputs are set). How does this change the result? Why

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

Oracle Solaris 11.2 System Administration (oracle Press)

Authors: Harry Foxwell

1st Edition

007184421X, 9780071844215

More Books

Students also viewed these Databases questions

Question

=+2. Is the hard sell approach unethical? Why or why not? [LO-2]

Answered: 1 week ago