Dear VHDL Coders,
I am trying to get the rank of elements from an array of data. For example, I have an array, Voltage = [20 40 10 30] ;
The position of the elements in the voltage array is ranged from 0 to 3.
Using a bubble sorting algorithm, I obtained the position index of the elements in the array as follows:
Index (0)= 2 ; Index (1)= 0 ; Index (2)= 3 ; Index (3)= 1 ;
However, basically I just the rank of the elements in the voltage array. I expect to get:
Rank (0) = 1 ; Rank (1) = 3 ; Rank (2) = 0 ; Rank (3) = 2 ;
I would appreciate any of your help and suggestion to get the desired outcome using the VHDL code. Thanks, a bunch in advance :)
On Tuesday, June 21, 2022 at 10:52:44 AM UTC-4, Md Multan Biswas wrote:
Dear VHDL Coders,
I am trying to get the rank of elements from an array of data. For
example, I have an array, Voltage = [20 40 10 30] ;
The position of the elements in the voltage array is ranged from 0 to 3.
Using a bubble sorting algorithm, I obtained the position index of the elements in the array as follows:
Index (0)= 2 ; Index (1)= 0 ; Index (2)= 3 ; Index (3)= 1 ;
However, basically I just the rank of the elements in the voltage array. I expect to get:
Rank (0) = 1 ; Rank (1) = 3 ; Rank (2) = 0 ; Rank (3) = 2 ;
I would appreciate any of your help and suggestion to get the
desired outcome using the VHDL code. Thanks, a bunch in advance :)
I'm curious, how did you end up solving this? I would think sorting
would be a very hardware intensive task unless you created a state
machine to process the data like a CPU would. I think a bubble sort
could be implemented with very few resources if you have the time.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (3 / 13) |
Uptime: | 71:48:47 |
Calls: | 6,657 |
Calls today: | 3 |
Files: | 12,203 |
Messages: | 5,332,233 |
Posted today: | 1 |