xipn wrote:
> Hi all,
> Is it any tricky way how to extend std_logic_vector by means of
> aggregate?
>
> Example:
> A : STD_LOGIC_VECTOR(3 DOWNTO 0);
> B : STD_LOGIC_VECTOR(6 DOWNTO 0);
>
> Something like (see code below)
> B <= (5 downto 2 => A, others => '0');
>
> Of course there are a lot of ways how to code it (consequent
> assignments, loop,... ) but aggregate would be nice.
With one assignment, using concatenation:
B <= '0' & A & "00";
With two assignments:
B <= (others => '0');
B(5 downto 2) <= A;
--
Paul.
www.aimcom.nl
email address: switch x and s