Connection Test - Debug Mode
Running a connection test will thoroughly exercise the nets connected to JTAG devices, which can reveal missing elements of the XJEase project preamble. For example, the JTAG chain may stop working when a particular pin is toggled, or the current consumption may increase suddenly if a net ends up in contention.
To track down these types of problems, the connection test can be run in debug mode. This is controlled by setting up a NET_TEST in the CONNTEST section of the project preamble.
A NET_TEST steps through the following nets:
- Nets which can be driven from a JTAG device
- AND which are not directly connected to a power/ground net
- AND which are not held constant (in the CONSTANT PINS list, or in a DISABLE DEVICE section).
All of these nets are set in a specified initial state (driven high, driven low or undriven), and one by one driven high or low, as specified in the CONNTEST section. The order in which the nets are set can be configured.
Debug mode has an optional WAIT parameter, so that the user can press a key to advance to the next net each time.
At some point in this sequence, you may be able to recreate the broken JTAG chain or high current consumption, and pin down the net that caused the problem.
Say the circuit takes large currents whilst the system is doing a connection test. First, see if setting all the pins to zero recreates the problem:
CONNTEST TEST := NET_TEST; FORMAT := DISABLE TO LOW; END;
In the above example, the drivable JTAG pins on the nets will all initially be set to the high impedance state. The first net will then be set to zero and the values will be read back to check for conflicts. This process is then repeated for each other net until all nets output zeros. If a conflict is found, the system will disable all nets and return the JTAG devices to a BYPASS state.
If this shows up a problem, add the following parameter to the CONNTEST section and re-run the test. You will be prompted to press a key before each net is set, so that the precise net causing the problem can be identified.
WAIT := TRUE;
When checking for conflicts, the values are read back from the circuit just before the latest net is driven, so the conflict will usually be caused by the last-but-one net that was driven.
If no problem was found doing 'DISABLE TO LOW', repeat the test, this time switching from disable to high:
CONNTEST TEST := NET_TEST; FORMAT := DISABLE TO HIGH; END;
Again, if a problem is found, add the WAIT := TRUE; parameter and re-run the test to find the problem net.
Often the problem is with a combination of highs and lows that produce the error, so you can start with all nets set high, gradually setting each net low, or vice versa. You can also reverse the order in which the nets are set: this is useful if a conflict is only ever seen when a specific set of conditions occur:
CONNTEST TEST := NET_TEST; FORMAT := HIGH TO LOW; DIRECTION := BACKWARDS; END; END;
If nothing reproduces the error, execute a soak test using the random setting. This randomly chooses nets to set to a random value, and continues until you stop the test (by pressing the 'q' key).
CONNTEST TEST := NET_TEST; RANDOM := TRUE; END;
Finally, if nothing has been found after thoroughly testing the net values, there is one other possibility for the connection test failing:
Ground bounce is an effect on the power rails when many nets are switched in value at the same time. Obviously this is not a normal event; generally a whole set of devices on a single board would not change state all at the same time. However, when implementing the XJTAG connection test this is a common event - a large number of nets can be switched to the same value at the same time. This causes sudden drops in the power supply, which can often trigger other events (such as a brown out reset being activated).
To check for this problem, you can limit the number of nets that are changed in any one JTAG cycle, limiting the ground bounce.
CONNTEST TEST := CONNTEST; MAX_NETS := 100; END;
Setting 'TEST := CONNTEST' takes the connection test out of debug mode and back into normal operation.