I do not know how to start working on this problem. Should I first design the digital circuit of sorting? I am poor on both topic. Suppose I have four numbers R0, R1, R2, R3... What is the digital circuit for arranging these numbers in ascending order? I found a sorter circuit on the internet, but I'm not able to relate it to my problem.
Can anyone give me a hint regarding this?
Answer
The basic hardware sorting element is a module that has two inputs and two outputs. It contains a comparator and two multiplexers, and presents the smaller of the two inputs at one of its output ports, and the larger at the other output port.
There are many ways to use such a module to sort a list of items, with a wide range of space-vs.-time tradeoffs. At one extreme, you can build a completely combinatorial sorting network (with optional pipeline registers to increase throughput), but the resources required grows O(N2). I have implemented such a network to create a real-time median filter for high-definition video.
No comments:
Post a Comment