Test Reset Sequence Tab

Some hardware requires a test reset sequence to be applied in order to switch it into a mode where boundary scans will work. Clicking Test Reset Sequence allows you to define a custom test reset sequence for the hardware, in terms of the output JTAG signals TCK, TMS and TDI and any nTRST or PIO pins defined in the pin mapping, as shown below. A test reset sequence may also contain calls to GLOBAL XJEase functions (see Function Scopes), sleep periods, or a TMS reset operation.

Test Reset Sequence section

Choosing a Test Reset Sequence

Built-in Sequences

XJTAG will automatically generate reset sequences suitable for many types of hardware, which will be used by default if there are no custom sequences defined. There are three possible sequences that may be generated, depending on various aspects of the project.

Built-In
The standard built-in sequence is just a TMS Reset followed by a Validate step.
This sequence is available to all subchains whose TAP group does not have an nTRST pin assigned.
Built-In (nTRST)
This alternative sequence is made of a Pulse nTRST step, followed by the TMS Reset and Validate steps.
This sequence is available to any subchains whose TAP group has been assigned an nTRST pin.
Built-In (External)
This is an empty sequence, that will only appear in a project with External Hardware present, and there is a subchain which only includes the external hardware. It will only be available to that subchain.

N.B. In projects where no subchains are defined, only one of Built-In and Built-In (nTRST) will be generated, dependent on whether there are any nTRST pins defined in the pin mapping. The Validate steps mentioned above will be omitted.

Subchain Reset Sequences

When profiles are defined in a project, reset sequences will need to be assigned to the subchains. Then, when the chain is accessed for the first time or reset, subchains of the profile under test are individually reset one after another, using the sequences and the order defined in the Add/Edit Profile dialog.

Each subchain can support multiple reset sequences, only one of which will be run for a given profile. There will always be an appropriate built-in sequence available to select.

For a subchain to be able to use a reset sequence, it must be assigned to that subchain, which can be done when clicking Add... to create a new sequence, or by selecting an existing sequence and clicking Edit...:

N.B. When adding or editing a sequence in a project with subchains and profiles defined, there may be a prompt asking if the new sequence should be applied in all profiles using the subchain. This may affect whether a profile is still considered as automatically generated if Automatic Configuration is enabled.

Projects Without Subchains

For new projects without any profiles defined, an appropriate built-in sequence will run as your test reset sequence. This sequence cannot be edited or removed. Once you have created another sequence, this first new sequence will then run by default rather than the built-in one. You can change the test reset sequence that will run using the Test Reset Sequence dropdown menu at the bottom of the Sequences list.

Test Reset Sequence Representation

Test reset sequences are shown in a grid on the right hand side of the screen. Each column of the grid represents a step in the sequence, and each row represents a pin.

If a step sets the value of pins, it is referred to as a waveform step. The pins involved in the sequence can have 3 values:

  • Output High – shown as a line at the top of the row
  • Output Low – shown as a line at the bottom of the row
  • Input (Hi-Z) – shown as a line in the middle of the row

Other kinds of steps that do not set the value of pins are shown as text written in the appropriate column. Sleep steps display the period of the sleep operation in milliseconds. If the text is too long to fit in the column, you can view the full step description by hovering the mouse over the step.

Adding/Removing Sequences

To add a new test reset sequence, click Add... under the Sequences list, or to view an existing one, click on its name.

Clicking Remove deletes the selected sequence. This will be removed from the pin mapping file associated with the current project next time the project is saved.

Clicking Edit... allows you to rename the selected sequence, assign it to a different subchain (in Dynamic Chains) or change the pins associated with that sequence.

Editing Sequences

Adding/Editing Pins

When creating a sequence you first need to add the necessary pins. Pins can be selected from the dialog shown after clicking Add...:

For an existing sequence, you can add pins by hovering the mouse over the + icon in the left-hand column. A dropdown list appears that allows you to select a pin to add:

Alternatively, you can use the Add Pin menu on the bottom toolbar, which also allows you to add pins from external hardware, if that is relevant to your project.

To change a pin, hover over that pin's name in the left-hand column and select a different pin from the dropdown list that appears. If that pin is already in the sequence, the waveform of the two pins will be swapped.

To remove a pin, select Remove from the dropdown list.

Adding/Editing Steps

Once pins have been added, you can add waveform steps by clicking the + icon in the rightmost column. You can click in the top, middle or bottom of a cell in this column to choose where the waveform should go for a particular pin:

Existing steps can be edited in a similar fashion:

To insert a step into the sequence somewhere other than the end, hover the mouse in between two existing steps and click the + icon that appears in the header row:

To remove a step, right-click anywhere in the step and select Remove Step from the menu. Alternatively, click the step number in the header row to select the step and then either press the Delete key or click Remove Step on the bottom toolbar.

Other kinds of steps can be added by right-clicking instead of left-clicking the + icons for adding or inserting a step. A dropdown menu will appear from which you can select the type of step to add or insert (see Step Types below for a list of possible steps).

To edit an existing non-waveform step (e.g. to change the sleep length or select a different XJEase function), either double-click the step, click the step and select Edit Step on the bottom toolbar, or right-click the step and select Edit Step from the dropdown menu.

To replace an existing step with a different kind of step, right-click the step and select Replace Step With....

Step Types

Function Call
Call an XJEase function. The function must have no input parameters and no return parameters, and must be defined with GLOBAL scope (see Function Scopes).
Pulse nTRST
This step will drive any nTRST pins low for one clock cycle, then set them high and cycle the clock signal again. Whilst this is happening, any TMS pins will also be held high. The exact set of pins used by this step is calculated when the step executes.

N.B. This step can only be used if the TAP group of the subchain using the sequence has any nTRST pins, or, if your project does not use subchains, if there are any nTRST pins in the pin mapping.

Safe
Scan the Safe Bitstream into the active JTAG subchain.

N.B. This step is not available if there are no subchains in the project.

Select Subchain
Switch the chain to the specified subchain, and call the specified reset sequence of that subchain. Used when the current subchain requires a different subchain to be set up first. On completion of this step the chain will switch back to the current subchain.

N.B. This step is not available if there are no subchains in the project.

Sequence
Include and carry out another test reset sequence at this point in the sequence. This allows you to split up your sequence into multiple named parts, to make it clearer to subsequent users what each part does.
Set Waveform
Set the value of one or more pins.
Sleep
Specify a time to wait without toggling any pins. The sleep is performed after all outstanding hardware accesses have completed.
TMS Reset
Perform a TMS reset. Most test reset sequences (but not all) require a TMS Reset as the last operation, in order to reset the JTAG TAP controller circuitry prior to beginning tests.
Validate
Validate the subchain: perform a Check Chain on the subchain linked to this sequence and set the target frequency. This function should only be called once all the subchain's expected devices are ready in the chain. The devices must be in the TAP state RESET or IDLE, and in JTAG state IDCODE (if supported) or BYPASS. The normal way to achieve this state will be to call TMS Reset first. Most subchain reset sequences that include JTAG devices will require a Validate step.

N.B. This step is not available if there are no subchains in the project.

A typical subchain reset sequence for a subchain that has JTAG devices will consist of:

  • Pre-chain complete operations (e.g. power up board, set up scanbridge, call another subchain reset sequence)
  • TMS Reset
  • Validate
  • Post-setup operations (e.g. program flash)

in that order.

A subchain reset sequence for a subchain that only contains external hardware does not require a TMS reset or Validate step.

If the final JTAG device to TDO pin combination has not been seen before, the chain will run at 100KHz until Validate is called. On completion of the Validate step the frequency will change to the target frequency. Any subsequent resets that match the same final device and TDO pin combination will run their entire reset sequence at the target frequency.