Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Howto check for 'Z' value of a signal?

Status
Not open for further replies.

ripperx2

Newbie level 3
Joined
Nov 18, 2009
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
germany
Activity points
1,309
Hello,
I have a state machine that should switch on an external input signal. My problem is that the input signal maybe not driven by any device, so it's value is 'Z'. How can I avoid that my state machine switches to an undefined/unintended state? It is possible to check for 'Z' values in a synthesizeable code?
In RTL simulation that is not a problem but for gatelevel simulation and in the FPGA this problem could crash my design.
Thanks for your help!
 

With a pull-up or pull-down resistor you can set the input to the "inactive" state when it isn't driven.

If you want to see the difference between "driven inactive" and "unconnected inactive" you need a more complex solution.
 
Yes, a pull-up would help me, but the circuit board design is already done and my CPLD can not integrate a pull-up resistor in the IO buffer. Please can you point me to a solution to detect the "unconnected inactive" state?
 

To detect "unconnected" in a good way you need a hardware change, but in this case it would be better to add the pull-up instead.

I think the best solution depends on the project. How many boards do you build? Is it for a commercial product that you will sell?

If the number of boards is small, maybe you can add a pull-up as a hardware fix?

If you really need to solve it without a hardware change, you could try to activate the output driver on the pin with short pulses of the "inactive" level. Because of capacitance etc the level will change slowly if the pin is not driven. This means that you can sample the input a certain time after a pulse. If it isn't driven, you will see the inactive level.

If the input is driven active, you will have contention during the pulses. Use the weakest possible driver for the pulses. This is an "ugly" solution which can't be used for all projects.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top