Modeling switches without bi-directional buffers

E

easwarsr

Hi,

I am trying to model a switch by connecting two ports based on a select
signal. For example, if I have 2 ports A and B, I should connect A and
B if the select signal is high(the select signal acts like a switch). I
do not know which port is the driver before simulation. So a statement
like A<=B; will not work. I am assuming that A and B are inout ports.
Does anyone know how I can go about modeling this?

Thanks.
Easwar
 
P

Paul Uiterlinden

Hi,

I am trying to model a switch by connecting two ports based on a
select signal. For example, if I have 2 ports A and B, I should
connect A and B if the select signal is high(the select signal acts
like a switch). I do not know which port is the driver before
simulation. So a statement like A<=B; will not work. I am assuming
that A and B are inout ports. Does anyone know how I can go about
modeling this?

http://members.aol.com/vhdlcohen/vhdl/Models.html
 
E

easwarsr

Thanks.
I don't understand what the effect of the following statements is.

wait on A(I)'transaction, B(I)'transaction, Cab(I)'transaction
until ThenTime_v /= now;
-- Break
ThenTime_v := now;
A(I) <= 'Z';
B(I) <= 'Z';
wait for 0 ns;

I do not understand how the variable ThenTime_v is used.
If A(I),B(I) and Cab(I) are in the sensitivity list of the process and
all the wait statments are removed, will it make a difference?

Thanks.
Easwar
 

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,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top