Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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
Advanced Member level 2
Joined
Apr 17, 2011
Messages
593
Helped
24
Reputation
48
Reaction score
23
Trophy points
1,298
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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top