How to copy single std_logic to a std_logic_vector? i.e copy 1 bit to multiple bits

Status
Not open for further replies.

matrixofdynamism

Advanced Member level 2
Joined
Apr 17, 2011
Messages
593
Helped
24
Reputation
48
Reaction score
23
Trophy points
1,298
Visit site
Activity points
7,681
I want to copy a single bit to an std_logic_vector so I have;

din : std_logic_vector(31 downto 0);
dx : std_logic;

Now writing din (31 downto 16) <= dx will not work since they do not have same size. What is the proper way to do this? I am using a loop right now, but is there a more concise way? Does Dout (31 downto 16) <= (13 downto 16 => Din(15)); work?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…