aggregate assignments

E

ed.agunos

we can do stuff like this:

signal some_signal : std_logic_vector(15 downto 0);

some_signal <= (15 downto 12 => '1', others => '0');

BUT.... is there someway we can do something like this:

some_signal <= (15 downto 12 => "1010", others => '0');

Thanks in advance :)
 
D

Dave

we can do stuff like this:

    signal some_signal : std_logic_vector(15 downto 0);

    some_signal <= (15 downto 12 => '1', others => '0');

BUT.... is there someway we can do something like this:

    some_signal <= (15 downto 12 => "1010", others => '0');

Thanks in advance :)

How about:

some_signal <= (others => '0');
some_signal(15 downto 12) <= "1010";

Dave
 
Joined
Jan 10, 2009
Messages
1
Reaction score
0
Hi,

I'm not a VHDL Pro, but the first thing that comes to my mind is something like:

constant zeroes : std_logic_vector(11 downto 0) := "00000000000";
some_signal <= "1010" & zeroes;

Regards,
Andreas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top