Forum Discussion
Altera_Forum
Honored Contributor
12 years agosorter in vhdl
hi every one i want avhdl code to sort integer input ascending if i have an array such as 1,8,9,7,2 the out put will be such as 1,2,7,8,9 i search a lot but didn't find any code that he...
Altera_Forum
Honored Contributor
12 years ago --- Quote Start --- no kaz, you didn't under stand me well every address (duration) has its unique code put all i want to separate the content of the ram ordered i.e i want to get the code ordered in a separate output from addressees ordered because i will use the ordered codes only --- Quote End --- that is easier then. imagine your addresses are coming at random: 201, 300,,13,1012 (for associated data: 20,30,40,50) you write to addresses 201(20), 300(30), 13(40), 1012(50) Now you get data ready to be read out starting from address 0 to 1023 and discard any zero data so you will get: addr data 13 => 40 201 => 20 300 => 30 1012 => 50 so your output stream will be: 40,20,30,50 in ascending order of duration(address) Is that what you want?