next up previous contents
Next: Read-Modify-Write cycles / Block Up: VME Interface Previous: D16 cycles

D8 cycles

In all address ranges mapped to VME, 8-bits transputer write cycles are mapped to VME D8 write cycles.

In the address ranges $C000 0000 - $FFFF FFFF and $8000 0000 - $BFFF FFFF 32-bits transputer read/write cycles are mapped onto a single VME D8 cycle if the lock flag in Statusregister 2 is set (see section 4 on the Statusregisters), where the byte within the longword read or written is selected by address bit A29 and A28.

  table269
Table 3: Byte selection by address bits A28 and A29. The transputer must have set its lock flag.

It should be noted that when the lock flag is set, the VME address does NOT change until the lock flag has been reset. Each access to a particular address must be preceded by a lock flag set and followed by a lock flag reset. Pay attention to the note on the use of the lock flag in section 3.7 on RMW-cycles/Block Transfer.

Example: if a byte value is to be read from VME-address $A000 1001 by
an A32 D8 VME-cycle in OCCAM it can be done as follows :

  [4]INT  statusregister :
  PLACE   statusregister AT ((#82000000 >< MOSTNEG INT) >> 2) :
  [4]BYTE bytes :
  -- To access byte 1 in VME access byte 2 on the transputer
  -- so place 'bytes' at byte 2 memory segment in A32 area
  PLACE   bytes AT ((#E0001000 >< MOSTNEG INT) >> 2) :
  byte.address.1001 IS bytes[2] :
  BYTE    value :
  SEQ
    statusregister[2] := #0F               -- Reset A31 to A28
    statusregister[3] := #0A               -- Set A31 to A28 to hex 'A'
    statusregister[3] := #80               -- Set 'lock' flag
    value             := byte.address.1001 -- Read the byte
    statusregister[2] := #80               -- Reset 'lock' flag

or as follows if a longword value is to be read by an A32 D8 VME-cycle:

  [4]INT statusregister :
  PLACE  statusregister AT ((#82000000 >< MOSTNEG INT) >> 2) :
  INT    longword :
  -- To access byte 1 in VME access byte 2 on the transputer
  -- so place 'longword' at byte 2 memory segment in A32 area
  PLACE  longword AT ((#E0001000 >< MOSTNEG INT) >> 2) :
  INT    value :
  SEQ
    statusregister[2] := #0F               -- Reset A31 to A28
    statusregister[3] := #0A               -- Set A31 to A28 to hex 'A'
    statusregister[3] := #80               -- Set 'lock' flag
    -- Read the byte and shift it to the low byte
    value             := (longword /\ #00FF0000) >> 16
    statusregister[2] := #80               -- Reset 'lock' flag



Henk Boterenbrood
Thu Jun 20 12:48:07 MET DST 1996