31
SµMMIT RTE
3.0 CIRCULAR BUFFERS and PING-PONG
OPERATIONS
3.1 Data Management
The SµMMIT RTE circular buffer simplifies the software ser-
vice of remote terminals implementing bulk or periodic data
transfers. The Enhanced SµMMIT architecture allows the user
to select one of two circular buffer modes. The user selects the
preferred mode, at start-up, by writing to Control Register bits
7 and 8. The Control Register bits allow for the decode of
three unique modes. Table 5 reviews mode selections.
3.1.1 Mode Number 0
Remote Terminal Index or Ping-Pong Operation, non-
Enhanced SµMMIT, the user programs bits 7 and 8 to logical
zero. Operation is per sections 2.2 and 2.3 (default state).
3.1.2 Mode Number 1
Remote Terminal Buffer 1, the user programs bit 7 to a logical
0 and bit 8 to a logical 1. The SµMMIT RTE merges transmit
and receive data into a circular buffer along with message
information. For each valid receive message, the SµMMIT
RTE enters a message information word, time-tag word, and
data word(s) into a unique receive circular buffer. For each
valid transmit message, the SµMMIT RTE enters a message
information word and time-tag word into reserved memory
locations within the transmit circular buffer. The SµMMIT
RTE automatically controls the wrap around of circular buff-
ers.
Two pointers define circular buffer length: top of buffer and
bottom of buffer. The lower case user specifies the top of
buffer (i.e., top address (TA16)) by writing a value into the sec-
ond word of a unique mode code or subaddress descriptor
block. The user defines the bottom of the buffer (i.e., bottom
address (BA16)) by writing to the fourth word of that unique
descriptor block. Both the TA16 and BA16 remain static during
message processing. The third word in the descriptor block
identifies the current address (i.e., last accessed address plus
one). The circular buffer wraps to the top address after com-
pleting a message that results in CA16 being greater than or
equal to BA16. If CA16 increments past BA16 during intra-
message processing, the SµMMIT RTE will access memory
(read or write) address locations past BA16. Delimit all circu-
lar buffer boundaries with at least 34 address locations.
Each subaddress and mode code, both transmit and receive,
has a unique circular buffer assignment. The SµMMIT RTE
decodes the command word T/R bit, subaddress/mode field,
and word count/mode code field to select a unique descriptor
block which contains TA16, CA16, and BA16.
For receive messages, the SµMMIT RTE stores the message
information word into address location CA16, the time-tag
word into CA16+ 116, and the data into the next “N16” loca-
tions starting at address CA16+216. For each transmit com-
mand, the SµMMIT RTE stores the message information word
into address location CA16 and time-tag word into location
CA16+ 116. Retrieval of data for transmission starts at address
location CA16 + 216. When entering multiple transmit com-
mand data packets into the circular buffer, delimit each data
packet with two reserved memory locations. The SµMMIT
RTE enters the message information word and time-tag word
into the delimiting memory locations.
3.1.3 Mode Number 2
Circular Buffer 2, the user programs Control Register bit 7 to a
logical 1 and bit 8 to a logical 1. The SµMMIT RTE separates
message data and message information into unique circular
buffers. The separation of data from message information sim-
plifies the software that loads and unloads data from the buff-
ers. Each subaddress and mode code, both transmit and
receive, has a unique pair of circular buffers. The SµMMIT
RTE decodes the command word T/R bit, subaddress/mode
field, and word count/mode code field to select a unique
descriptor block which contains TA16, CA16, and Message
Information Buffer (MIB).
Control the wrap-around of both the data and message buffers
by specifying the number of messages before wrap-around
occurs in bits 15 to 8 of the Control Word. The second word
entered into the descriptor block determines the top of the data
buffer (TA16). The third word in the descriptor block identifies
the current position (CA16) in the buffer (i.e., last accessed
address plus one). The fourth word in the descriptor block
identifies the MIB’s starting location and current position. The
MIB contains Time-Tag and Message Information words for
each message transacted on the bus. The data buffer and Mes-
sage Information Buffer wrap around after processing a pre-
determined number of messages. Each subaddress and mode
code, both transmit and receive, have a unique data buffer and
MIB assignment.
Table 1: Table 5. Enhanced Mode of Operation
Mode
Number Bit 7 Bit 8
0 0 0
101
X1 0
211