FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > VHDL

VHDL comp.lang.vhdl newsgroup / Usenet

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-27-2004, 08:45 PM
DonQ
Guest
 
Posts: n/a
Default Modelsim - forcing signals to 'Z'

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
  #2 (permalink)  
Old 02-28-2004, 02:48 AM
Chuck Gales
Guest
 
Posts: n/a
Default Re: Modelsim - forcing signals to 'Z'

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
  #3 (permalink)  
Old 02-28-2004, 11:33 AM
Amontec Team, Laurent Gauch
Guest
 
Posts: n/a
Default Re: Modelsim - forcing signals to 'Z'

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

Bookmarks


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 On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Viewing internal signals with ModelSim Joseph FPGA 3 03-27-2008 08:38 PM
signals in modelsim Benjamin Menküc FPGA 10 05-11-2005 07:54 PM
Re: Unused signals in Modelsim Jon Beniston FPGA 0 06-22-2004 05:46 PM
Re: Unused signals in Modelsim jtw FPGA 0 06-22-2004 02:21 PM
Forcing a value into multi-dimensional array (ModelSim) Jean-Christophe Rat Verilog 0 08-25-2003 02:13 PM


All times are GMT +1. The time now is 12:05 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved