0
\$\begingroup\$

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.

enter image description here

Can anyone give me a hint regarding this?

\$\endgroup\$
1
  • \$\begingroup\$ The diagram shows a maximum finding network, not a sorter \$\endgroup\$
    – shuckc
    Commented Feb 12, 2014 at 16:49

1 Answer 1

3
\$\begingroup\$

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.

\$\endgroup\$
1
  • \$\begingroup\$ thans for giving me point ... my final objective is to do verilog code of median filter \$\endgroup\$
    – SW.
    Commented Feb 8, 2014 at 8:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.