Testing bulk transfers, Data – Comtrol eCos User Manual
Page 723

Testing
interrupt_in_endpoints
and
interrupt_in()
These variables provide the same information as
bulk_in_endpoints
and
bulk_in
, but for endpoints that
support interrupt IN transfers.
interrupt_out_endpoints
and
interrupt_out()
These variables provide the same information as
bulk_out_endpoints
and
bulk_out
, but for endpoints
that support interrupt OUT transfers.
Testing Bulk Transfers
The main function for initiating a bulk test is
usbtest::bulktest
. This takes three compulsory arguments, and
can be given a number of additional arguments to control the exact behaviour. The compulsory arguments are:
endpoint
This
specifies
the
endpoint
to
use.
It
should
correspond
to
one
of
the
entries
in
usbtest::bulk_in_endpoints
or
usbtest::bulk_out_endpoints
, depending on the transfer direction.
direction
This should be either
in
or
out
.
number of transfers
This specifies the number of transfers that should take place. The testing software does not currently support
the concept of performing transfers for a given period of time because synchronising this on both the host
and a wide range of targets is difficult. However it is relatively easy to work out the approximate time a
number of bulk transfers should take place, based on a typical bandwidth of 1MB/second and assuming say
a 1ms overhead per transfer. Alternatively a test script could perform a small initial run to determine what
performance can actually be expected from a given target, and then use this information to run a much longer
test.
Additional arguments can be used to control the exact transfer. For example a
txdelay+
argument can be used
to slowly increase the delay between transfers. All such arguments involve a value which can be passed either as
part of the argument itself, for example
txdelay+=5
, or as a subsequent argument,
txdelay+ 5
. The possible
arguments fall into a number of categories: data, I/O mechanism, transmit size, receive size, transmit delay, and
receive delay.
Data
An obvious parameter to control is the actual data that gets sent. This can be controlled by the argument
data
which can take one of five values:
none
,
bytefill
,
intfill
,
byteseq
and
wordseq
. The default value is
none
.
none
The transmit code will not attempt to fill the buffer in any way, and the receive code will not check it. The
actual data that gets transferred will be whatever happened to be in the buffer before the transfer started.
bytefill
The entire buffer will be filled with a single byte, as per
memset
.
619