This preview shows pages 1–3. Sign up to view the full content.
 1 
1.
(30 points) Design for a circuit that maintains a set of (key, value) pairs and always makes
the (key, value) pair with the median key value available as an output. So for example, if the
pairs currently stored by your circuit are (2,25), (5,37), (6,44), then the pair (5,37) is the
median pair and should be available as an output from your circuit. If the circuit holds an
even number of pairs, it should return the middle pair with the smaller key. Your circuit
should implement an
insert
operation and a
deleteMedian
operation. Use two of the priority
queue circuits described in the notes as the basis for your design. You will need to modify
one of the circuits to return the pair with the largest key as its output, instead of the pair
with the smallest key. Your solution should include the following components.
•
Illustrate the operation of the circuit by showing what happens during a
deleteMedian
operation and what happens during an
insert
operation.
•
Give a block diagram of the circuit, showing all major components and how they are
connected to each other and to the overall inputs and outputs of the median circuit.
•
Explain how you would modify the original priority queue VHDL so that it makes the
pair with the largest key available as an output. Describe any other modifications that
may be needed to the priority queue.
•
Write a complete text description of the steps required to implement the
deleteMedian
operation. You need not provide VHDL, but make sure you cover all the different cases
that must be handled.
•
Write a complete text description of the steps required to implement the
insert
operation.
You need not provide VHDL, but make sure you cover all the different cases that must
be handled.
CSE 260 – Digital Computers: Organization and Logical Design
Homework 8c Solutions
Jon Turner
Due 3/25/2008
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document  2 
The median circuit uses two copies of the priority queue circuit to store the (key,value) pairs, one of
which is modified to make the pair with the largest key available as an output, instead of the pair with
the smallest key. The (key,value) pairs with the largest keys will be stored in a priority queue called
bigKeys. The (key,value) pairs with the smallest keys will be stored in a modified priority queue called
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 11/12/2010 for the course KTMT KTMT04 taught by Professor Son during the Spring '10 term at Dallas Colleges.
 Spring '10
 Son

Click to edit the document details