COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### VHDL Design for running sorter

• Email
• Follow

```Hi.

I am working on inmplementation of order statistics CFAR, where
sorting of a continuous stream of data is required.

Exactly problem is as under:
I am getting a continuous stream of 16-bit data. In every clock cyle I
have to sort 32-size array. When I have sorted the array in ascending
order, I want to choose 24th number only. In the next clock cycle, I
get a new no added to my array while the first number gets out of the
array. The new array that I get is to be sorted again and he 24th
position number is to be taken out.
So, in every clock cycle, I get a new data (in an array of 32 16-bit
numbers) (with the oldest data getting deleted from this array) and in
the same clock cycle, I need to have the 24th-position data available
to me for further processing.

Can anybody help me in this? Plus if someone can direct me to any
useful link on VHDL designs of sorting, since I am new to FPGA and
VHDL.

```
 0

See related articles to this posting

```Your problem may be simpler than you imagine.  If you need a result at
*every* clock and start from an empty array, you can insert the new values
one at a time until you have the 32-bit population, then begin the removal
and replacement.  If you have 31 comparators for the new value (you can
ignore the 24th), your results will look like a thermometer when comparing
the new value to the pre-ordered array.  The elements 1-23 can shift up 0 or
1 depending on the local comparison bit.  The elements 25 to 32 can shift
down by 0 or 1 based on the same results.  The one caveat is that the
initial values before bringing in the first set of 32 numbers need to shift
completely off one end with an out-of-range number rather than shifting out
position 24.

If you want a full sort of 32 unsorted values, I can give you a technique -
the bitonic sort - to perform the sort in 15 clock cycles; it's one of the
fastest ways to do a full sort but requires time and resources.  The
one-at-a-time method I outlined above would give you better results.

"Kumar Vijay Mishra" <vizziee@yahoo.com> wrote in message
> Hi.
>
> I am working on inmplementation of order statistics CFAR, where
> sorting of a continuous stream of data is required.
>
> Exactly problem is as under:
> I am getting a continuous stream of 16-bit data. In every clock cyle I
> have to sort 32-size array. When I have sorted the array in ascending
> order, I want to choose 24th number only. In the next clock cycle, I
> get a new no added to my array while the first number gets out of the
> array. The new array that I get is to be sorted again and he 24th
> position number is to be taken out.
> So, in every clock cycle, I get a new data (in an array of 32 16-bit
> numbers) (with the oldest data getting deleted from this array) and in
> the same clock cycle, I need to have the 24th-position data available
> to me for further processing.
>
> Can anybody help me in this? Plus if someone can direct me to any
> useful link on VHDL designs of sorting, since I am new to FPGA and
> VHDL.
>

```
 0

```Kumar Vijay Mishra wrote:

> I am getting a continuous stream of 16-bit data. In every clock cyle I
> have to sort 32-size array. When I have sorted the array in ascending
> order, I want to choose 24th number only. In the next clock cycle, I
> get a new no added to my array while the first number gets out of the
> array. The new array that I get is to be sorted again and he 24th
> position number is to be taken out.
> So, in every clock cycle, I get a new data (in an array of 32 16-bit
> numbers) (with the oldest data getting deleted from this array) and in
> the same clock cycle, I need to have the 24th-position data available
> to me for further processing.

If it really works that way there is just about only one way
to do it, because you must do everything in one clock cycle.

You need to compare the number coming in against all the others
in the list, except the one going out, and arrange the new data
ready to clock in on the next cycle.  Startup is a little
complicated, as you must make sure that it fills up the right
way.  32 16 bit registers, appropriate comparators and such
should fit easily in a medium sized FPGA.

-- glen

```
 0

```Say, your clock cycles aren't something very slow like 4MHz, is it?
Your speed needs would help drive an "ideal" solution since you could
perform all the compares with one comparator over 32 cycles.

"Kumar Vijay Mishra" <vizziee@yahoo.com> wrote in message
> Hi.
>
> I am working on inmplementation of order statistics CFAR, where
> sorting of a continuous stream of data is required.
>
> Exactly problem is as under:
> I am getting a continuous stream of 16-bit data. In every clock cyle I
> have to sort 32-size array. When I have sorted the array in ascending
> order, I want to choose 24th number only. In the next clock cycle, I
> get a new no added to my array while the first number gets out of the
> array. The new array that I get is to be sorted again and he 24th
> position number is to be taken out.
> So, in every clock cycle, I get a new data (in an array of 32 16-bit
> numbers) (with the oldest data getting deleted from this array) and in
> the same clock cycle, I need to have the 24th-position data available
> to me for further processing.
>
> Can anybody help me in this? Plus if someone can direct me to any
> useful link on VHDL designs of sorting, since I am new to FPGA and
> VHDL.
>

```
 0

```Hi,

You can use an odd-even transposition sort.  This is
a parallel version of the bubble sort that works well
in hardware.  I have a version of it written in Verilog
on my site, http://www.engr.sjsu.edu/crabill in Lecture
remove the pipeline registers if you want to trade
frequency of operation for lower latency.

Eric

glen herrmannsfeldt wrote:
>
> If it really works that way there is just about only one way
> to do it, because you must do everything in one clock cycle.
>
> You need to compare the number coming in against all the others
> in the list, except the one going out, and arrange the new data
> ready to clock in on the next cycle.
```
 0

4 Replies
301 Views

Similar Articles

12/4/2013 2:40:38 PM
page loaded in 47247 ms. (0)

Similar Artilces:

running as root
Hi , i have an app which runs as root(C app). Inorder to get some data, it forks a child which does a su <userid> and runs a script. However, in the parent, i loose root privelage i.e the app cannot access data which is read by root only. is there a way to retain root access in the parent? regards -sarab On Tue, 18 May 2004, sarab wrote: > Hi , > i have an app which runs as root(C app). Inorder to get some data, it > forks a child which does a su <userid> and runs a script. > However, in the parent, i loose root privelage i.e the app cannot access > dat

Running NetRexx
After studying the NetRexx Users Manual carefully, including the troubleshooting pages, I am having a problem in running the NetRexxC.sh script. I can generate the hello.class by running <java COM.ibm.netrexx.process.NetRexxC hello>, but I cannot do this using the NetRexxC.sh script, even from its own directory: :~/bin/javaapps/NetRexx/bin> dir total 72 -rw-r--r-- 1 stan users 61 1996-02-29 16:57 hello.nrx -rwxr-x--x 1 stan users 1556 2008-04-05 13:34 NetRexxC.sh -rwxr-x--x 1 stan users 312 2008-04-05 13:34 nrc :~/bin/javaapps/NetRexx/bin> nrc hello bash: nrc: command... is present on the system. -- yusakhar On 5 abr, 13:28, yusakhar <some.u...@some.domain> wrote: > After studying the NetRexx Users Manual carefully, including the > troubleshooting pages, I am having a problem in running the NetRexxC.sh > script. > > I can generate the hello.class by running <java > COM.ibm.netrexx.process.NetRexxC hello>, but I cannot do this using the > NetRexxC.sh script, even from its own directory: > > :~/bin/javaapps/NetRexx/bin> dir > total 72 > -rw-r--r-- 1 stan users 61 1996-02-29 16:57 hello.nrx > -rwxr-x--x 1 stan

Running JRuby
Im trying to set up java and jruby on Windows, great work with the recent developments. In some of the recent examples of irb running on jruby it is ran like: C:\rails>jruby C:\ruby\bin\irb If I run this I get: c:\ruby\bin\irb:10:in 'require': No such file to load -- irb (LoadError) from c:\ruby\bin\irb:10" I have set both JAVA_HOME and JRUBY_HOME. Many thanks, Pete. PS. When setting JRUBY_HOME enviroment var it appears it cant have any spaces in the path, this is on Windows. And is most likly something to do this 'DOS'. -- Posted via http://www.ruby... interpreter out-of-the-box...but that's a discussion for another day. JRuby also has a user mailing list on sf.net/jruby, the jruby-user list. Please join us and let us know if you have any more problems. Thank you for trying JRuby! On 3/3/06, Peter Piper <pp@nosuchemail.com> wrote: > Im trying to set up java and jruby on Windows, great work with the > recent developments. > > In some of the recent examples of irb running on jruby it is ran like: > > C:\rails>jruby C:\ruby\bin\irb > > If I run this I get: > > c:\ruby\bin\irb:10:in 'require'

running tkinter
, configure, make, install tcl and tk packages to get tkinter running? Thanks for any suggestions in advance. Jim Anderson On Tuesday 31 May 2005 01:44 pm, Jim Anderson wrote: > Are tcl/tk still supposed to be an intergrated part of the > python release? > > Do I have to download, configure, make, install tcl and tk > packages to get tkinter running? I had to do this. Don't forget blt. -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ I'm having the same problem (latest gentoo 2005.0) and I've...; > Are tcl/tk still supposed to be an intergrated part of the > python release? > > Do I have to download, configure, make, install tcl and tk > packages to get tkinter running? > > Thanks for any suggestions in advance. > > Jim Anderson On fedora tkinter is a separate package. just do this (as root) and all will be well:- yum install tkinter Cheers, Martin.

Running Simulation
Hi there, I have made a trial of a simulation model of reluctance motor. However before I run my simulation I have to open a demo file and run it first before mine would work. Do I have to set anything in my model? For your info, my model includes a discrete integrator and Look up tables. It is similar to the SRM demo, but the thing is I could not run it on its own. Thank you in advance for your help.

Running AIX
Hi. I'm running Linux since over 2 years. I want to try AIX just for fun. I love Unix operating-systems and I want try something new. I have only two x86 boxes... So i'm not able to try AIX. Is there any (free) shells running AIX on the net ? I have found nothing except free HP-UX shells at compaq.com. Thank You in advance ! -- +-----------+ | Penguin_X | | 2005(C) | +-----------+ I'm not saying I know of any "AIX shells" that exist, but if they did I think you'd be missing out on my favorite part of AIX (FYI, I'm an old Sun guy), which is AIX's device handling and it's Logical Volume Manager. Search ebay for an old IBM 43P. They're not the fastest machines, but great toys to learn AIX on. Daryl Penguin_X wrote: > Hi. > > I'm running Linux since over 2 years. I want to try AIX just for fun. I > love Unix operating-systems and I want try something new. I have only > two x86 boxes... So i'm not able to try AIX. Is there any (free) shells > running AIX on the net ? I have found nothing except free HP-UX shells > at compaq.com. > > Thank You in advance ! Penguin_X wrote: > I'm running

running program
is ther a way i can cause a c++ program to start another program (msg in my case) Dan Irwin wrote: > is ther a way i can cause a c++ program to start another program (msg in my case) #include <cstdlib> // ... std::system ("msg"); -- Regards, Buster. Dan Irwin wrote: > is ther a way i can cause a c++ program to start another program (msg in my case) Your platform may provide a non-portable function to do that. It may be known as spawning or forking. Ask in a newsgroup dedicated to your platform or compiler. -- Thomas Matthews C++ newsgroup welcome message:

Running ping
Hello. I have a problem. I need to make a client-server application using sockets (easy). After they communicate server store information about client (IP, and some data). Later on i need to check if the client is connected (ive got his IP and need to ping him). I dont need to write whole ping function - just need a return value :). Ive googled but didnt find anything :(. Could someone help - how can i run ping program/function from c? Maybe there are other methods to find out is client connected :). Help plz! TKowalcz@gmail.com wrote: ....snip... Could someone help - how can i > run p

Running in the background
-party provider of info to a client for whom I was doing code to scrape > data from a screen gave me continuing employment with "richer user > experiences" once or twice a week until I finally convinced the client to > ask the third-party to give them a download option (after all, they were the > third-party's largest customer for that data). > > Larry Linson > Microsoft Office Access MVP Hi Larry, Do you have any advice on my question about running in the background? Cheers, Franc.

running a file
ok, i'm writing a ruby program that interprets some text and does stuff with it, but thats not what i'm here to ask about. What I want to know is how would I make it so the user can right-click and open a file with my program. Just like how if you right click a .rb file you can run it with the ruby MRI. All I need is to get the text in the file into a variable in the program when the user opens it. Any suggestions? Thanks John -- Posted via http://www.ruby-forum.com/. Is it quine? You can get info at http://www.nyx.net/~gthompso/quine.htm -- Posted via http://www.ruby-forum.com/.