[comp.sys.transputer] check network diagnostic tool

andyr@inmos.com (Andy Rabagliati) (03/05/91)

Dear Transputer netters,

 There follows a decription of a network diagnostic tool called check.
 Soon it will be shipped with our board level products, under the name
 ispy.
 
 Full source and executables for PC, SUN3, SUN4, SUN386i, and IRIS are 
 available from our archive server, archive-server@inmos-c.inmos.COM.
 Send a single  line "help" to find out how to use it. It is (hopefully)
 easily ported to other hosts and boards.
 
 To whet your appetite, I shall also send a UUencoded version on the
 PC executable check.
 
Cheers,  Andy.
 

                          THE CHECK PROGRAMS
                          ------------------

                        
  This is a suite of programs for finding and testing
transputer networks.  It consists of a network mapper (CHECK), a
memory tester (MTEST), a functional test (FTEST) and a general
purpose loader (LOAD).  

  The output of CHECK is designed to be fed into the other
programs via a pipe or redirection.  The programs can be chained
together to do a complete test of your hardware. A file piped
into CHECK will be used to impose that numbering scheme on the
Transputers, and carries C004 programming information.

  The programs are all written in ANSI C and will run on any
host that has an ANSI C Compiler and an INMOS standard link
module to drive the transputer hardware (see the file link.c).


CHECK - a transputer network mapper.

Determines Transputer types, versions, and topology of a
network. Also determines the speed of the boot link, and does a
basic 5s and As test of the first 2K of internal RAM of each
Transputer it comes across. It does this test down all links it
finds, so each link has about 4K bytes of traffic in each
direction at minimum. CHECK runs completely in internal RAM.

CHECK leaves an ISERVER compatible vestigial router at each
node, that is capable of:

  1) setting a default ISERVER-transparent path from the host to
     any Transputer in the network,

  2) Resetting a Transputer to a state similar to that just after
     reset, so it may be subsequently booted by any bootable code file.

This means, for instance, that the Occam compiler may be loaded
and run on any Transputer in the network (see LOAD).

Refer to the file protocol.doc for more information.

The /v option in Version 3.0 leaves the network in the virgin state,
as if it were just reset. This is useful if you do not wish to reset
the system again - if, for instance, you have committed the henious
crime of connecting the C004 reset to the Transputer reset.

With a little hackery, it may be possible to port this to a Parsytec
board system, to reset the network, and then use other tools like
INMOS/SGS-Thomson or Logical Systems. Any takers ?

CHECK will number processors as a width-first search from the
root processor, starting at 0. This may not be the most
convenient numbering. For instance, with a mesh connection you
may wish to number them by rows and columns. CHECK will do this
by piping in a file.

CHECK takes a template input in one of two forms, 
  a) A previous CHECK run
  b) An INMOS toolset map file.
  
CHECK will report missing link connections, (useful for
debugging hardware) and additional connections, and will
indicate extra transputers found. It returns an error code of 1
if any transputers or link connections are missing.

C004 connections are reported in one of two ways.

<linkx> - <linky>	says that linkx input connects to linky
			output, and linky input connects to
			linkx output.
			
<linkx> > <linky>	says that linkx input connects to linky
			output.

An example C004 report line follows. All whitespace is
an arbitrary number of spaces, tabs, carriage returns.

   2 C004b (1-5 7>8 23>30 26-28 )
   2 C004b   [ -5---1-8 -------- -------U --S-Q--- ]
   
   Both lines report the same configuration.  However, line 1
can be very verbose with big configurations, but is easy to
program. It is reported by CHECK /CL.
   
   Line 2 is of fixed length, and references links as 0-9, A-V.
It is position-dependent - the position determines the output
link, the letter the input link. It is reported as CHECK /C4.

Thus you can write your own.

If you are using the INMOS MMS software, you can configure it
once with the MMS, take a snapshot using CHECK, pipe the output
to a file, and use that file subsequently.

     CHECK /h      gives information on the program.

This suite of tools enables users to examine and configure networks 
of transputers. The toolset consists of:
     
     check  Network tester.
     mtest  Memory tester.
     ftest  Function test suite.
     load  Network loader.

We shall now examine the use of each of these tools.

 check 
 -----
The check tool provides a means of examining a network of transputers. To use 
it simply type:
  
  check | mtest -c

   NOTE  The c option is used to give us results for the T2 processor.

This will produce the following results:


check 2.2 | mtest 2.01
     Part rate Mb Bt [  Link0  Link1  Link2  Link3 ] RAM,cycle
   0 T800d-25 0.13 0 [   HOST    1:1    ...    ... ] 4K,1+28K,3+2016K,5+4K,3;
   1 T2   -17 0.56 1 [   C004    0:1    ...   C004 ] 2K,1.


In detail,

   Processor 0  has the following memory

     4K,1  4K bytes of 1 cycle memory (internal RAM) plus,
     28K,3  28K bytes of three cycle RAM plus,
     2016K,5  2016K bytes of five cycle RAM plus,
     4K,3  4K bytes of three cycle RAM.

   Processor 1  has the following memory

     2K,1  2K bytes of one cycle memory ( internal RAM ).

 ftest 
 -----
The ftest tool performs a functional test on all of the transputers in
the network. The answer should always be OK! To use ftest we type:
  
  check | load /2 myprogram.b8h

This will run a program called myprogram.b8h, on processor two.

 Configuring An IMS B008 
 
 Introduction 

This section will describe how to configure the IMS B008 
development motherboard using the checkout tools. For
further details of the checkout tools the reader is referred to
"Using The Checkout Tools".
 
 The IMS C004 

The IMS C004 is a 32 way link switch. It can be programmed
to enable any combination of links to be connected in any
manner. All of the spare links on the IMS B008 are brought to
the IMS C004. It is the job of the IMS T222 processor, on the
IMS B008 board,to configure the IMS C004 to set up the links.
  
The user can either write an explicit program for the IMS T222,
use the SGS-Thomson MMS tools, or can use the checkout 
tools.  We shall concentrate on the latter approach.
 
 Configuring Using check 
 
Our aim is to connect the IMS B008 so that the processor in slot
2 of the board is connected to the host processor. We can do
this in one of two ways
 
  Connect a physical link from PipeTail to a spare link.
  Connect a link from the last processor to the first via the IMS C004.
 
To configure the IMS B008 we use the following steps:
  
  check /CL > config.b8 
  check /CS < config.b8
 
In detail,
 
     check /CR  to clear the IMS C004.
     check /CL > config.b8  Store the current configuration.
     edit config.b8  Edit the configuration file.
     check /CS < config.b8  Reconfigure the IMS C004.
 
The file produced from Step 2 will look as follows:
 
     Part rate Mb Bt [  Link0  Link1  Link2  Link3 ]
   0 T800d-25 0.13 0 [   HOST    1:1    3:1   ...  ]
   1 T2   -17 0.55 1 [    ...    0:1    ...   2:C  ]
   2 C004b ()
   3 T800c-17 0.13 1 [    ...    0:2    4:1   ...  ]
   4 T800c-17 0.13 1 [    ...    3:2    ...   ...  ]
 
This reads the current transputer configuration, including the
contents of any C004s it finds (the /CL  option).

Next, we must edit the config.b8 file to put in the desired
C004 connections as follows:
 
     Part rate Mb Bt [  Link0  Link1  Link2  Link3 ]
   0 T800d-25 0.13 0 [   HOST    1:1    3:1   ...  ]
   1 T2   -17 0.55 1 [    ...    0:1    ...   2:C  ]
   2 C004b (2-10)
   3 T800c-17 0.13 1 [    ...    0:2    4:1   ...  ]
   4 T800c-17 0.13 1 [    ...    3:2    ...   ...  ]
 
This tells the IMS C004 to internally connect its Link2 
to its Link10.  On the IMS B008 board this
connects TRAM slot 2 Link0 to slot 0 Link3 .
 
The final stage is to pump this configuration file down to the
IMS C004. The output from this stage is as follows:-
 
     Part rate Mb Bt [  Link0  Link1  Link2  Link3 ]  CHANGES
   0 T800d-25 0.13 0 [   HOST    1:1    3:1   4:0  ]       4+
   1 T2   -17 0.55 1 [    ...    0:1    ...   2:C  ]
   2 C004b (2-10 )
   3 T800c-17 0.13 1 [    ...    0:2    4:1   ...  ]
   4 T800c-17 0.13 1 [    0:3    3:2    ...   ...  ] 0+
 
This has an extra field that describes the changes from the
configuration pumped in to that actually found. On more complex
networks it would mark extra transputers as such, with all the
extra connections. If you wish, you may edit the file in step 2
above to include these proposed extra connections - then check 
would automatically match these to the connections found after
configuring the B008. If you wish to use a different numbering
scheme, check will follow that; e.g. processors in slot 1 and
above are numbered from 100.
 
It is possible on some SGS-Thomson/INMOS boards that check will
not find the C004s in the network. This is because a latch on
the configuration T2 has powered up such that the C004 is held
in a permanently reset state. The solution to this is to do the
following :-
 
     check | mtest /c /t2

Run the Memory test program
mtest on all T2x2s in the system, regardless of whether a C004
is found on the links. mtest ensures that the last thing it
writes to external memory of T2s is 0.

     check

  This should now find all C004s.

 Configuring An IMS B014 Using check 

To configure a fully connected IMS B014 VME card we must use the following
configuration script:


   check 2.2 
     Part rate Mb Bt [  Link0  Link1  Link2  Link3 ]
   0 T800d-25 0.13 0 [   HOST    1:1    4:1    4:0 ]
   1 T2   -17 0.55 1 [    2:C    0:1    ...    3:C ] 
   2 C004b (1-2 3-6 7-8 9-10 11-12 ) 
   3 C004b (1-2 3-6 7-8 9-10 11-12 ) 
   4 T800d-20 0.76 1 [    0:3    0:2    5:1    5:0 ]
   5 T800d-20 0.77 1 [    4:3    4:2    6:1    6:0 ]
   6 T800d-20 0.77 1 [    5:3    5:2    7:1    7:0 ]
   7 T425a-25 0.77 1 [    6:3    6:2    8:1    8:0 ]
   8 T2   -20 0.80 1 [    7:3    7:2    ...    ... ]