Intel® Quartus® Prime Standard Edition User Guide: Debug Tools

ID 683552
Date 9/24/2018
Document Table of Contents

2.8.8. Bytestream Service

The bytestream service provides access to modules that produce or consume a stream of bytes. Use the bytestream service to communicate directly to the IP core that provides bytestream interfaces, such as the Altera JTAG UART or the Avalon® -ST JTAG interface.

Bytestream Service

The following code finds the bytestream service for your interface and opens it.

set bytestream_index 0
set bytestream [lindex [get_service_paths bytestream] $bytestream_index]
set claimed_bytestream [claim_service bytestream $bytestream mylib]

To specify the outgoing data as a list of bytes and send it through the opened service:

set payload [list 1 2 3 4 5 6 7 8]
bytestream_send $claimed_bytestream $payload

Incoming data also comes as a list of bytes.

set incoming_data [list]
while {[llength $incoming_data] ==0} {
    set incoming_data [bytestream_receive $claimed_bytestream 8]

Close the service when done.

close_service bytestream $claimed_bytestream