User's Manual

PMAC Dual-Ported RAM User Manual
Dual-Ported RAM Communications 7
Note:
DPRAM only occupies the low 16 bits (0-15) of each 24-bit word in PMAC.
PMAC memory locations $D000 to $D1FF are reserved for fixed uses. The range of $D200 to $DFFF is
open for general-purpose use. From the PMAC side, locations in DPRAM are typically accessed using
M-variables. An M-variable is defined to each word to be used (such as M120->X:$D200,0,16,S),
then these M-variables are used in programs. They can either be written to (e.g. M120=P1+P5) or read
from (e.g., X(M120) or P1=M120).
To the host, DPRAM appears as 8K x 16-bit words of memory. Since most computers address by byte,
this requires 16K of address space, or 14 bits (2
14
= 16K) on the host bus. Consecutive 16-bit locations of
DPRAM are located at even addresses. That is, address bit A0 (the least significant bit of your DPRAM
address) should always be 0. Typically, these DPRAM locations are accessed through host word read and
word write commands.
When a location in DPRAM is accessed, either reading or writing, address bit A1 selects whether it is
reading or writing to PMAC’s Y or X memory. If address bit A1 = 0, you are selecting the equivalent of
PMAC’s Y memory. Conversely, if address bit A1 = 1, selecting PMAC’s X memory. The following
table shows the DPRAM addresses and the corresponding host address from our previous example: