--Configuration for MU T-rack (first rack) with no switched links installed
--P.C.Capon 12/3/92

VAL K IS 1024 :
VAL M IS K * K:
VAL rack.transputers IS 64:
VAL rack2M.transputers IS 20: --20 rack transputers with 2 Mbytes
NODE tadpole,control:
[64] NODE rack:
ARC Hostlink:

NETWORK transputer.rack
  DO
    SET tadpole (type,memsize := "T414",1*M)
    SET control (type,memsize := "T414",1*M)
    DO i = 0 FOR rack2M.transputers
      SET rack[i] (type, memsize := "T800",2*M)
    DO i = rack2M.transputers FOR rack.transputers - rack2M.transputers
      SET rack[i] (type, memsize := "T800",1*M)
    CONNECT tadpole[link][0] TO HOST WITH Hostlink
    CONNECT tadpole[link][1] TO control[link][0]
    CONNECT tadpole[link][3] TO rack[0][link][0]
    CONNECT tadpole[link][2] TO rack[63][link][1]
    DO i = 0 FOR rack.transputers - 1
      CONNECT rack[i][link][1] TO rack[i+1][link][0]

    --add hardware description of switched link connections here

:
--Number of sorter processes is not equal to number of transputers
--so this software mapping is used.
--rest of this file is similar to that provided by Inmos.
--{{{  problem size
VAL string.length IS 80:

--}}}  
--{{{  Mapping for sorter
--{{{  HIGH, LOW
VAL HIGH IS 0:
VAL LOW IS 1:
--}}}  
--{{{  constants of this mapping of the sorter program
VAL number.of.transputers IS 65:
VAL number.of.elements IS string.length:
VAL elements.per.transputer IS number.of.elements/number.of.transputers:
VAL remaining.elements IS number.of.elements\number.of.transputers:
VAL elements.on.root IS elements.per.transputer + remaining.elements:
--}}}  
NODE inout.p:
[number.of.elements]NODE pipe.element.p:
MAPPING
  DO
    MAP inout.p ONTO tadpole PRI HIGH
    DO i = 0 FOR elements.on.root-1
      MAP pipe.element.p[i] ONTO tadpole PRI LOW
    MAP pipe.element.p[elements.on.root-1] ONTO tadpole PRI HIGH
    DO j = 0 FOR number.of.transputers - 1
      VAL first.element.here IS elements.on.root +(j*elements.per.transputer):
      VAL last.element.here IS first.element.here +(elements.per.transputer-1):
      DO
        MAP pipe.element.p[first.element.here] ONTO rack[j] PRI HIGH
        --omit next two lines when elements.per.transputer < 2 because iconf
        --cannot cope. 
        --DO i = first.element.here + 1 FOR elements.per.transputer - 2
        --  MAP pipe.element.p[i] ONTO rack[j] PRI LOW
        IF
          (elements.per.transputer > 1)
            MAP pipe.element.p[last.element.here] ONTO rack[j] PRI HIGH
          TRUE
            SKIP
:
--}}}  
--}}}  
--{{{  Code
#INCLUDE "hostio.inc" --
#INCLUDE "sorthdr.inc" --
#USE "inout.cah"
#USE "element.cah"
--}}}
#INCLUDE "sortsoft.inc" --
