WIENER, Plein & Baus GmbH
26
www.wiener-d.com
The function must pass a pointer to an array of unsigned integer stack data, in which the
first word is left empty to serve as a placeholder.
The function is intended for executing long stacks, up to 4 MBytes long, both "write" and
"read" oriented, such as using multi-block transfer operations.
Structure upon call
:
DataBuffer(0) = 0(don't care place holder)
DataBuffer(1) = (unsigned short)StackLength bits 0-15
DataBuffer(2) = (unsigned short)StackLength bits 16-20
DataBuffer(3 - Stack2) (unsigned short) stack data
StackLength represents the number of words following DataBuffer(1) word, thus the total
number of words is Stac2
Structure upon return
:
DataBuffer(0 - (ReturnValue/2-1)) - (unsigned short)array of returned data when
ReturnValue>0
Structure of OUT packets
When the use of the libxxusb dynamic link library is not desired one may pack the stack data
into (OUT) packets and bulk-transfer (bulk write) these to the USB port for the subsequent
interpretation by the processing FPGA. Since VM-DBA is always expected to return some
data in response to an OUT packet, one must subsequently read (via bulk read) an IN packet
from the USB interface.
The OUT packet is to be structured in half-words as follows:
1. First half-word is to be always a 0x***C word (16-bit) (* stands for “don’t care”),
indicating to the processing FPGA an interactive stack execution type operation, consistent
with such for the VM-USB controllers.
2 – N. Command stack half-words
Structure of IN packets
IN packets contain the returned data. For WRITE operations, the returned data = 1. For
READ operations, the returned data represent the content of the addressed registers or FIFOs.