User manual

50 www.xilinx.com SPI-4.2 v8.5 Getting Started Guide
UG154 March 24, 2008
Appendix B: Verilog Details
R
The send_user_data procedure is used to transmit a burst of data. The presence of a
SOP control word (before the burst of data) and an EOP control word (following the data
burst), can be specified. The EOPS (bits 14:13 of the control word following the burst) are
automatically calculated from the number of bytes sent. ERR has a higher priority than
EOP; if EOP and ERR are both ‘1’, the EOPs for the burst is an EOP abort = ‘01.’
The send_idles procedure is used to send idle control words.
The send_training procedure is used to send training patterns.
The sop_spacing procedure is used to send erred data by sending two SOPs in less than
eight cycles. This function limits the number of cycles between the two SOPs to less than
seven. This ensures that a SOP spacing error occurs.
Table B - 2 : send_user_data (SOP, EOP, Err, Addr, bytes) Inputs
Name Range Description
SOP 0 or 1 Defines if the packet should begin with an SOP.
EOP 0 or 1 Defines if the packet should be terminated with
an EOP.
ERR 0 or 1 Defines if the packet should be terminated with
an EOP abort.
ADDR 0 to 255 Channel on which the packet should be sent.
BYTES 1 to 255 Number of bytes to send on the selected channel.
Table B - 3 : send_idles (cycles) Inputs
Name Range Description
CYCLES 0 to 511 Number of idle control words to send on RDat.
Table B - 4 : send_training (patterns) Inputs
Name Range Description
PATTERNS 0 to 255 Number of training patterns to send.
Table B - 5 : sop_spacing (Bytes1, Err1, Addr1, EOP2, Err2, Addr2, Bytes2,
num_cycles) Inputs
Name Range Description
BYTES1 0 to 10 The number of bytes to send in the first burst. This
is limited to 10 bytes to ensure SOP spacing is
violated.
ERR1 0 or 1 Defines if the first packet should be terminated with
an EOP abort. If set to 0 the EOPs will be calculated
from BYTES1.
ADDR1 0 to 255 Channel on which the first packet should be sent.
EOP2 0 or 1 Defines if the second packet should be terminated
with an EOP.