Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
SLV reverse bit order
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  10 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Luis Cupido  
View profile  
 More options Oct 16 2012, 8:22 pm
Newsgroups: comp.lang.vhdl
From: Luis Cupido <cup...@ua.pt>
Date: Wed, 17 Oct 2012 01:22:20 +0100
Local: Tues, Oct 16 2012 8:22 pm
Subject: SLV reverse bit order
Hello,

Is it really true that there is no simple way to reverse the bit order
of a SLV ?
so I need to code a " for ... loop"  or make a function with all that ???

I want:

a_rev(ASIZE-1 downto 0) <= a(0 to ASIZE-1);
--this would work if VHDL compilers were not so nose up ;-)
--but seems we were born to suffer :-(

Any ideas ?

Thanks
Luis C.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
rickman  
View profile  
 More options Oct 16 2012, 8:45 pm
Newsgroups: comp.lang.vhdl
From: rickman <gnu...@gmail.com>
Date: Tue, 16 Oct 2012 20:45:46 -0400
Local: Tues, Oct 16 2012 8:45 pm
Subject: Re: SLV reverse bit order
On 10/16/2012 8:22 PM, Luis Cupido wrote:

What happens when you try the code above?  I would expect this to work.

Rick


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Luis Cupido  
View profile  
 More options Oct 16 2012, 10:38 pm
Newsgroups: comp.lang.vhdl
From: Luis Cupido <cup...@ua.pt>
Date: Wed, 17 Oct 2012 03:37:59 +0100
Local: Tues, Oct 16 2012 10:37 pm
Subject: Re: SLV reverse bit order
On 10/17/2012 1:45 AM, rickman wrote:

Unfortunately I get this:

Error (10484): VHDL error at f_address.vhd(198): range direction of
object slice must be same as range direction of object

so this is because I have "signal a: std_logic_vector(ASIZE-1 downto 0);"
if i put it  " 0 to ASIZE-1" I keep the compiler happy
but bits will not be reversed !!!!

lc.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
andrew_b  
View profile  
 More options Oct 17 2012, 1:26 am
Newsgroups: comp.lang.vhdl
From: andrew_b <andrew.boro...@gmail.com>
Date: Tue, 16 Oct 2012 22:26:25 -0700 (PDT)
Local: Wed, Oct 17 2012 1:26 am
Subject: Re: SLV reverse bit order
On 17 ΟΛΤ, 04:22, Luis Cupido <cup...@ua.pt> wrote:

> Is it really true that there is no simple way to reverse the bit order
> of a SLV ?
> so I need to code a " for ... loop" šor make a function with all that ???

Here is my function I use very long time:

function Reverse (x : std_logic_vector) return std_logic_vector is
alias alx  : std_logic_vector (x'length - 1 downto 0) is x;
variable y : std_logic_vector (alx'range);
begin
     for i in alx'range loop
         y(i) := alx (alx'left - i);
     end loop;

     return y;
end;


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Luis Cupido  
View profile  
 More options Oct 17 2012, 6:31 am
Newsgroups: comp.lang.vhdl
From: Luis Cupido <cup...@ua.pt>
Date: Wed, 17 Oct 2012 11:30:58 +0100
Local: Wed, Oct 17 2012 6:30 am
Subject: Re: SLV reverse bit order
On 10/17/2012 6:26 AM, andrew_b wrote:

Andrew,
Excellent. Thanks.

I see there is no easy/built-in way
but the function you just gave fits just perfect.

lc


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alan Fitch  
View profile  
 More options Oct 18 2012, 7:30 pm
Newsgroups: comp.lang.vhdl
From: Alan Fitch <a...@invalid.invalid>
Date: Fri, 19 Oct 2012 00:30:14 +0100
Local: Thurs, Oct 18 2012 7:30 pm
Subject: Re: SLV reverse bit order
On 17/10/12 11:30, Luis Cupido wrote:

Or just use an alias

alias arev : std_logic_vector (a'reverse_range) is a;

regards
Alan

P.S. Just noticed that there's an alias in that function anyway - Doh!

--
Alan Fitch


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jim Lewis  
View profile  
 More options Oct 31 2012, 5:17 pm
Newsgroups: comp.lang.vhdl
From: Jim Lewis <j...@synthworks.com>
Date: Wed, 31 Oct 2012 14:17:48 -0700 (PDT)
Local: Wed, Oct 31 2012 5:17 pm
Subject: Re: SLV reverse bit order
Currently the language does not have a reverse operator because no one has bothered to submit a use case for one.   If you have something that this is useful for, you should submit it to the working group.

Best Regards,
Jim Lewis


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Luis Cupido  
View profile  
 More options Nov 1 2012, 4:07 pm
Newsgroups: comp.lang.vhdl
From: Luis Cupido <cup...@ua.pt>
Date: Thu, 01 Nov 2012 20:07:27 +0000
Local: Thurs, Nov 1 2012 4:07 pm
Subject: Re: SLV reverse bit order
On 10/31/2012 9:17 PM, Jim Lewis wrote:
> Currently the language does not have a reverse operator because no one has bothered to submit a use case for one.

 > If you have something that this is useful for, you should submit it
to the working group.

> Best Regards,
> Jim Lewis

Oh Yes... All output addresses of FFT are bit reversed and some other
FFT like
variations on filters and other DSP stuff.
But this might be so specific that probably does not make a strong enough
case for adding it.

lc.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andy  
View profile  
 More options Nov 2 2012, 10:46 am
Newsgroups: comp.lang.vhdl
From: Andy <jonesa...@comcast.net>
Date: Fri, 2 Nov 2012 07:46:15 -0700 (PDT)
Local: Fri, Nov 2 2012 10:46 am
Subject: Re: SLV reverse bit order

On Wednesday, October 31, 2012 4:17:49 PM UTC-5, Jim Lewis wrote:
> Currently the language does not have a reverse operator because no one has bothered to submit a use case for one. If you have something that this is useful for, you should submit it to the working group. Best Regards, Jim Lewis

Rather than adding a new operator to VHDL that adds bloat and impacts tool vendors, it would be better to add reverse() functions to the ieee packages for the standard vector types? Note that these packages are governed by the same working group. Until that time, you can write and use your own functions, with the tools you already have.

VHDL already allows extension through code to cover the need. For a taste of what can be done through "extend VHDL through code", take a look at the fixed- and floating-point packages (now part of the standard), or better yet the new Open Source VHDL Verification Methodology (OSVVM) library. These were all accomplished without changing the language itself.

Andy


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
HT-Lab  
View profile  
 More options Nov 2 2012, 12:05 pm
Newsgroups: comp.lang.vhdl
From: HT-Lab <han...@htminuslab.com>
Date: Fri, 02 Nov 2012 16:05:35 +0000
Local: Fri, Nov 2 2012 12:05 pm
Subject: Re: SLV reverse bit order
On 02/11/2012 14:46, Andy wrote:

> On Wednesday, October 31, 2012 4:17:49 PM UTC-5, Jim Lewis wrote:
>> Currently the language does not have a reverse operator because no one has bothered to submit a use case for one. If you have something that this is useful for, you should submit it to the working group. Best Regards, Jim Lewis

> Rather than adding a new operator to VHDL that adds bloat and impacts tool vendors, it would be better to add reverse() functions to the ieee packages for the standard vector types? Note that these packages are governed by the same working group. Until that time, you can write and use your own functions, with the tools you already have.

> VHDL already allows extension through code to cover the need. For a taste of what can be done through "extend VHDL through code", take a look at the fixed- and floating-point packages (now part of the standard), or better yet the new Open Source VHDL Verification Methodology (OSVVM) library. These were all accomplished without changing the language itself.

> Andy

You just beat me too it, I was planning to write exactly the same point
(something I have also mentioned on the steering group), if it can be
implemented in a package then that should be the preferred way as
updating the language itself is a real struggle (there is very little
money to be made in enhancing VHDL hence Vendors are reluctant to go
that way, this is not my point of view).

Jim's OS-VVM is a great example of a successful package and the
osvvm.org website could be a good place (even though it is owned by
Aldec) to put all those great functions people write. I would not go for
IEEE as the adoption process will be slow and apparently it creates lots
of issues with maintenance.

Hans
www.ht-lab.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »