Message from discussion
SLV reverse bit order
Received: by 10.224.193.72 with SMTP id dt8mr3666859qab.7.1350451585368;
Tue, 16 Oct 2012 22:26:25 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.52.93.229 with SMTP id cx5mr2650859vdb.19.1350451585328; Tue,
16 Oct 2012 22:26:25 -0700 (PDT)
Path: r17ni36921179qap.0!nntp.google.com!l8no2666668qao.0!postnews.google.com!p11g2000vbi.googlegroups.com!not-for-mail
Newsgroups: comp.lang.vhdl
Date: Tue, 16 Oct 2012 22:26:25 -0700 (PDT)
Complaints-To: groups-abuse@google.com
Injection-Info: p11g2000vbi.googlegroups.com; posting-host=89.18.130.241; posting-account=n7aJ0QoAAAAM9S9cFo4hml0ohYBnwXyL
NNTP-Posting-Host: 89.18.130.241
References: <k5ktnr$v2m$1@speranza.aioe.org>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.16pre)
Gecko/20110324 ALTLinux/Sisyphus/3.6.15-alt0.20110308.M50P.1 Firefox/3.6.15,gzip(gfe)
Message-ID: <8143c11d-334d-45bc-aab6-f850b1cc05db@p11g2000vbi.googlegroups.com>
Subject: Re: SLV reverse bit order
From: andrew_b <andrew.boro...@gmail.com>
Injection-Date: Wed, 17 Oct 2012 05:26:25 +0000
Content-Type: text/plain; charset=KOI8-R
Content-Transfer-Encoding: quoted-printable
On 17 =CF=CB=D4, 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" =9Aor 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) :=3D alx (alx'left - i);
end loop;
return y;
end;