Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Modelsim - forcing signals to 'Z'

Reply
Thread Tools

Modelsim - forcing signals to 'Z'

 
 
DonQ
Guest
Posts: n/a
 
      02-27-2004
Hi,

I've got a simple problem with Modelsim.
The relevant connections of my system look like that:


------------ ------------
| | | |
| | | |
| A-----+----B |
| | | | |
| Module1 | | | Module2 |
| | | | |
------------ | ------------
|
input to Module3


A and B are declared as inout in Module1 and Module2 (it's a GPIO
pin).

Both Module1 and Module2 can drive the pin.
I can't change the code of Module2 and I can't tell it to stop driving
the pin (it drives it to '0').
But I want the pin to be driven only by Module1, so Module3 can see
the value driven by Module1.

What I tried is forcing (-freeze) signal B to 'Z', but it seems not to
work.
Any ideas why?
Can I do something else?

Thanks,
DonQ
 
Reply With Quote
 
 
 
 
Chuck Gales
Guest
Posts: n/a
 
      02-28-2004
On Fri, 27 Feb 2004 12:45:30 -0800, DonQ wrote:

> Hi,
>
> I've got a simple problem with Modelsim. The relevant connections of my
> system look like that:
>
>
> ------------ ------------
> | | | |
> | | | |
> | A-----+----B |
> | | | | |
> | Module1 | | | Module2 |
> | | | | |
> ------------ | ------------
> |
> input to Module3
>
>
> A and B are declared as inout in Module1 and Module2 (it's a GPIO pin).
>
> Both Module1 and Module2 can drive the pin. I can't change the code of
> Module2 and I can't tell it to stop driving the pin (it drives it to '0').
> But I want the pin to be driven only by Module1, so Module3 can see the
> value driven by Module1.
>
> What I tried is forcing (-freeze) signal B to 'Z', but it seems not to
> work.
> Any ideas why?
> Can I do something else?
>
> Thanks,
> DonQ

Why don't you OR the signals from Module1 and Module2 to the input of
Module3?? If Module2 is always 0, then Module3 will see only the value of
the signal from Module1??

Chuck
 
Reply With Quote
 
 
 
 
Amontec Team, Laurent Gauch
Guest
Posts: n/a
 
      02-28-2004
DonQ wrote:
> Hi,
>
> I've got a simple problem with Modelsim.
> The relevant connections of my system look like that:
>
>
> ------------ ------------
> | | | |
> | | | |
> | A-----+----B |
> | | | | |
> | Module1 | | | Module2 |
> | | | | |
> ------------ | ------------
> |
> input to Module3
>
>
> A and B are declared as inout in Module1 and Module2 (it's a GPIO
> pin).
>
> Both Module1 and Module2 can drive the pin.
> I can't change the code of Module2 and I can't tell it to stop driving
> the pin (it drives it to '0').
> But I want the pin to be driven only by Module1, so Module3 can see
> the value driven by Module1.
>
> What I tried is forcing (-freeze) signal B to 'Z', but it seems not to
> work.
> Any ideas why?
> Can I do something else?
>
> Thanks,
> DonQ


This is your JOB to fix A or B to 'Z, not Modelsim JOB.
But your modules need to know when there are output or tristate. You
have to do a control with an 'output enable' or other control
signal(chip select + read signal), like

-- example: A and B are 8-bit vector
A <= "00110011" WHEN (A_OE = '1') ELSE (OTHERS => 'Z');
B <= "11001100" WHEN (B_OE = '1') ELSE (OTHERS => 'Z');
-- works if B_OE <= not(A_OE);

Just try.

Laurent
www.amontec.com

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
forcing external signals in VHDL 2008 MiguelM VHDL 0 02-05-2011 02:14 AM
Virtual Signals in Modelsim a1_nocrap_exh@hotmail.com VHDL 3 08-08-2006 06:50 PM
[modelsim] displaying signals from inside components Nikola Skoric VHDL 3 06-23-2006 05:05 PM
Internal Signals and other questions with ModelSim XE/II Starter 5.7g VHDL Testbench Martin Maurer VHDL 2 05-21-2004 03:45 AM
Adding internal signals in Modelsim ALuPin VHDL 5 01-08-2004 07:35 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57