Modeling switches without bi-directional buffers

Guest
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
 
easwarsr@gmail.com wrote:

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
 
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


Paul Uiterlinden wrote:
easwarsr@gmail.com wrote:

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
 

Welcome to EDABoard.com

Sponsor

Back
Top