Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

backups: always in season, never out of style.


devel / comp.lang.vhdl / Re: Getting Rank of Elements in an Array using VHDL

SubjectAuthor
* Getting Rank of Elements in an Array using VHDLMd Multan Biswas
`* Getting Rank of Elements in an Array using VHDLgnuarm.del...@gmail.com
 `- Getting Rank of Elements in an Array using VHDLAnssi Saari

1
Getting Rank of Elements in an Array using VHDL

<68597ac5-1809-46a7-b61e-c1850cf45902n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=160&group=comp.lang.vhdl#160

  copy link   Newsgroups: comp.lang.vhdl
X-Received: by 2002:a05:600c:1d12:b0:39c:4307:8b10 with SMTP id l18-20020a05600c1d1200b0039c43078b10mr41072452wms.103.1655823161067;
Tue, 21 Jun 2022 07:52:41 -0700 (PDT)
X-Received: by 2002:a25:da44:0:b0:668:c9d7:d921 with SMTP id
n65-20020a25da44000000b00668c9d7d921mr22372460ybf.514.1655823160573; Tue, 21
Jun 2022 07:52:40 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!feeder1.cambriumusenet.nl!feed.tweak.nl!209.85.128.87.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.vhdl
Date: Tue, 21 Jun 2022 07:52:40 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=129.252.22.24; posting-account=xwVASgoAAACztTGqDXJh_wgNfAJSyqWd
NNTP-Posting-Host: 129.252.22.24
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <68597ac5-1809-46a7-b61e-c1850cf45902n@googlegroups.com>
Subject: Getting Rank of Elements in an Array using VHDL
From: multan.ieee@gmail.com (Md Multan Biswas)
Injection-Date: Tue, 21 Jun 2022 14:52:41 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Md Multan Biswas - Tue, 21 Jun 2022 14:52 UTC

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 :)

Re: Getting Rank of Elements in an Array using VHDL

<03296913-aa89-40b7-870b-ef58d75da8b0n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=161&group=comp.lang.vhdl#161

  copy link   Newsgroups: comp.lang.vhdl
X-Received: by 2002:a05:6214:1c8c:b0:473:408f:ddd6 with SMTP id ib12-20020a0562141c8c00b00473408fddd6mr31539875qvb.74.1658344693804;
Wed, 20 Jul 2022 12:18:13 -0700 (PDT)
X-Received: by 2002:a25:31c1:0:b0:670:97ab:3262 with SMTP id
x184-20020a2531c1000000b0067097ab3262mr4034029ybx.232.1658344693450; Wed, 20
Jul 2022 12:18:13 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.vhdl
Date: Wed, 20 Jul 2022 12:18:13 -0700 (PDT)
In-Reply-To: <68597ac5-1809-46a7-b61e-c1850cf45902n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=65.207.89.54; posting-account=I-_H_woAAAA9zzro6crtEpUAyIvzd19b
NNTP-Posting-Host: 65.207.89.54
References: <68597ac5-1809-46a7-b61e-c1850cf45902n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <03296913-aa89-40b7-870b-ef58d75da8b0n@googlegroups.com>
Subject: Re: Getting Rank of Elements in an Array using VHDL
From: gnuarm.deletethisbit@gmail.com (gnuarm.del...@gmail.com)
Injection-Date: Wed, 20 Jul 2022 19:18:13 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2449
 by: gnuarm.del...@gmail. - Wed, 20 Jul 2022 19:18 UTC

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.

--

Rick C.

- Get 1,000 miles of free Supercharging
- Tesla referral code - https://ts.la/richard11209

Re: Getting Rank of Elements in an Array using VHDL

<sm0pmhxfk9e.fsf@lakka.kapsi.fi>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=162&group=comp.lang.vhdl#162

  copy link   Newsgroups: comp.lang.vhdl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: as@sci.fi (Anssi Saari)
Newsgroups: comp.lang.vhdl
Subject: Re: Getting Rank of Elements in an Array using VHDL
Date: Fri, 22 Jul 2022 14:40:29 +0300
Organization: An impatient and LOUD arachnid
Lines: 38
Message-ID: <sm0pmhxfk9e.fsf@lakka.kapsi.fi>
References: <68597ac5-1809-46a7-b61e-c1850cf45902n@googlegroups.com>
<03296913-aa89-40b7-870b-ef58d75da8b0n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="beaf2d0a5e2cdb5132c6ea629096139c";
logging-data="3261074"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+eHb06ImglguzgJkDt08F3"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
Cancel-Lock: sha1:em8fd6UIzHV1f7mEBeRFdgUXEfo=
sha1:rS3HGHU48GKZ4bKtHbYlA7cPdDw=
 by: Anssi Saari - Fri, 22 Jul 2022 11:40 UTC

"gnuarm.del...@gmail.com" <gnuarm.deletethisbit@gmail.com> writes:

> 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.

I'm not sure what his problem was since the question was more than a
little vague to me. Using his notation without the semicolons he had

Voltage = [20 40 10 30]
Index = [2 0 3 1]
Rank = [1 3 0 2]

Since the Index array seems to be reversed (or right indexed), he can
get his desired Rank array simply by reversing it. Maybe he realized
that? Or maybe I misunderstood.

As for sorting data in hardware, it's the same as everything
else. Whatever works within the requirements, i.e. power, performance,
area.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor