[previous] [next] [contents]    Syntax rules

Test program development assumes a few basic syntax rules, which may be summarised as follows:
  • Any label ends in ":"
  • Every instruction must end with ";"
  • Any numerical values must be followed by either "d" (decimal) or "h" (hexadecimal)
  • The argument of the shift instructions (NSHF and NSHFCP) must be represented in hexadecimal form
  • Any line may be broken to improve readability (normally useful in relation to the NSHFCP instructions, where the sequence of digits (representing the new test vector, the expected values and the comparison mask) may exceed the length of one JTAGer window
  • A comment starts with "//" or "!", and extends to the end of the current line

It is always good practice to start your code with the proper SELTAP and SERFLG instructions (before any instructions assuming a specific TAP or error flag). Your code will therefore look similar to what is shown in figure 1 below:

Fig. 1: A test program segment.

Good common sense will greatly simplify your job: use indenting and case coherency as appropriate (JTAGer is not case sensitive, but it makes sense to keep the same case assumptions throughout your code), and do not forget to insert enough comments to explain the reasoning behind your code. 

The help file installed with JTAGer describes all instruction supported and includes small examples to illustrate their usage (see the "Recognised instructions" entry in the help file index). It is recommended to end every test program with the HALT instruction (there may however exist more than one HALT instruction in each test program).