Delta Tau GEO BRICK LV Benutzerhandbuch
Turbo PMAC User Manual
Writing a Host Communications Program
401
USB/Ethernet
When USB or Ethernet communications is used with DPRAM, the host computer does not actually have
direct access to the DPRAM IC on the Turbo-PMAC end of the wire link. However, the USB and
Ethernet implementations support the creation of a virtual shared memory interface so higher level
routines can work as if there were direct access.
direct access to the DPRAM IC on the Turbo-PMAC end of the wire link. However, the USB and
Ethernet implementations support the creation of a virtual shared memory interface so higher level
routines can work as if there were direct access.
Mapping of Memory Addresses
The mapping of memory addresses between the host computer on one side, and Turbo PMAC on the
other side, is quite simple. Using this memory is a matter of matching the addresses on both sides. To
Turbo PMAC, the DPRAM appears as extra memory in the fixed address range $060000 to $060FFF
($063FFF for the large DPRAM). Since Turbo PMAC has two (X and Y) registers per numerical
address, the small DPRAM appears to the Turbo PMAC as a 4k x 32 block of memory; the large DPRAM
appears as a 16k x 32 block of memory. When the PMAC hexadecimal addresses of the DPRAM are
specified, the assembly-language convention of a ‘$’ prefix is used to denote the use of hex numbers.
other side, is quite simple. Using this memory is a matter of matching the addresses on both sides. To
Turbo PMAC, the DPRAM appears as extra memory in the fixed address range $060000 to $060FFF
($063FFF for the large DPRAM). Since Turbo PMAC has two (X and Y) registers per numerical
address, the small DPRAM appears to the Turbo PMAC as a 4k x 32 block of memory; the large DPRAM
appears as a 16k x 32 block of memory. When the PMAC hexadecimal addresses of the DPRAM are
specified, the assembly-language convention of a ‘$’ prefix is used to denote the use of hex numbers.
Probably the host computer will use byte addressing. Therefore, the small DPRAM appears to the host
computer as a 16k x 8 block of memory. The large DPRAM appears as a 64k x 8 block of memory.
Since the address range of the DPRAM in the host computer will vary from application to application, we
can talk only of offsets from the base address when referring to individual registers. When the host
hexadecimal address offsets of the DPRAM are specified, the C-language convention of a ‘0x’ prefix is
used to denote the use of hex numbers.
computer as a 16k x 8 block of memory. The large DPRAM appears as a 64k x 8 block of memory.
Since the address range of the DPRAM in the host computer will vary from application to application, we
can talk only of offsets from the base address when referring to individual registers. When the host
hexadecimal address offsets of the DPRAM are specified, the C-language convention of a ‘0x’ prefix is
used to denote the use of hex numbers.
Because the Turbo PMAC uses 32-bit addressing, and the host computer uses 8-bit addressing, the host
uses 4 numerical addresses for each 1 numerical address in PMAC. The following table shows how this
address incrementing works for key addresses in the DPRAM.
uses 4 numerical addresses for each 1 numerical address in PMAC. The following table shows how this
address incrementing works for key addresses in the DPRAM.
Turbo PMAC
Address
Host Address
Offset
Example Host
Address
Y:$060000 0x0000 0x0D0000
X:$060000 0x0002 0x0D0002
Y:$060001 0x0004 0x0D0004
X:$060001 0x0006 0x0D0006
X:$060000 0x0002 0x0D0002
Y:$060001 0x0004 0x0D0004
X:$060001 0x0006 0x0D0006
… … …
Y:$060450 0x1140 0xD1140
… … …
Y:$060FFF 0x3FFC 0xD3FFC
X:$060FFF 0x3FFE 0xD3FFE
X:$060FFF 0x3FFE 0xD3FFE
… … …
Y:$063FFF 0xFFFC 0xDFFFC
X:$063FFF 0xFFFE 0xDFFFE
X:$063FFF 0xFFFE 0xDFFFE
The following two equations can be helpful for calculating matching DPRAM addresses:
PMAC_address = $060000 + 0.25*(Host_address – Host_base_address)
Host_address = Host_base_address + 4*(PMAC_address - $060000) + Offset
where:
Offset = 0 for accessing Y memory, or for X and Y together as 32 bits
Offset = 2 for accessing X memory alone
Offset = 0 for accessing Y memory, or for X and Y together as 32 bits
Offset = 2 for accessing X memory alone