multiple individual bidirectional signal concatenated into 1bidirectional bus

  • Thread starter Amish Rughoonundon
  • Start date
A

Amish Rughoonundon

Hi,
I was wondering how to concatenate multiple individual bidirectional
signals into 1 bidirectional bus
Code:
signal a : std_logic;
signal b : std_logic;
signal c : std_logic;
signal d : std_logic_vector;

test1 : test1
port map(
a => a,
b => b,
c => c
);

d <= a & b & c;
a <= d(2);
b <= d(1);
a <= d(0);

test2 : test2
port map(
d => d
);

Would something like this work?
Wouldn't the simulator throw X's on the signal a,b,c because driven
from two places.
Thanks for the help,
Amish
 
P

Paul Uiterlinden

Amish said:
Hi,
I was wondering how to concatenate multiple individual bidirectional
signals into 1 bidirectional bus
Code:
signal a : std_logic;
signal b : std_logic;
signal c : std_logic;
signal d : std_logic_vector;

test1 : test1
port map(
a => a,
b => b,
c => c
);

d <= a & b & c;
a <= d(2);
b <= d(1);
a <= d(0);

test2 : test2
port map(
d => d
);

Would something like this work?
No.

Wouldn't the simulator throw X's on the signal a,b,c because driven
from two places.

Yes. So only combine signals that go in the same direction.
 

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,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top