18
status, buffer = mreadfifo (module, width, offset, length)
Description:
Read a single M-Module register repeatedly from a specified M-Module position.
The function will read
length
words from the specified offset without
incrementing the address between each read
Parameters:
module
Integer indicating the M-Module position to read. (0 – 7)
width
Integer specifying the access width in bytes.
2 = 16-bit
4 = reserved for future use
offset
Integer specifying the register offset to read. This value must be
bounded by the width parameter. For example, if width = 2 then this
value must be a multiple of 2 (0, 2, 4…). If width = 4 then this value
must be a multiple of 4 (0, 4, 8…). Valid values are 0 - 0xFF.
length
Integer indicating the number of words of size
width
to read.
Return:
status
Integer status of the FIFO read (0=Success)
buffer
Buffer of data from the FIFO read
status, value = mreadid (module, word)
Description:
Reads one 16-bit word of the specified M-Module’s ID PROM
Parameters:
module
Integer indicating the M-Module position to read. (0 – 7)
word
Integer specifying the 16-bit word of the ID PROM to read (0 for
first 16-bit word, 1 for second 16-bit word and so forth)
Return:
status
Integer status of the ID read (0 = success)
value
Integer value read from the M-Module ID PROM
status = mwrite (module, width, offset, value)
Description:
Writes an M-Module register to a specified M-Module position.
Parameters:
module
Integer indicating the M-Module position to write. (0 – 7)
width
Integer specifying the access width in bytes
2 = 16-bit
4 = reserved for future use
offset
Integer specifying the register offset to write. This value must be
bounded by the width parameter. For example, if width = 2 then this
value must be a multiple of 2 (0, 2, 4…). If width = 4 then this value
must be a multiple of 4 (0, 4, 8…). Valid values are 0 - 0xFF.
value
Integer value to write to the M-Module register
Return:
status
Integer status of the M-Module read (0 = success)