Quartus® Prime Pro Edition User Guide: Platform Designer

ID 683609
Date 7/08/2024
Public
Document Table of Contents

5.15.10.3. Returning the Credits

Avalon® Streaming Credit protocol supports a return_credit signal. This is used by source to return the credits back to sink. Every cycle this signal is asserted, it indicates source is giving back 1 credit. If source wants to return multiple credits, this signal needs to be asserted for multiple cycles. For example, if source wants to return 10 outstanding credits, it asserts return_credit signal for 10 cycles. Sink should account for returned credits in its internal credit maintenance counters. Credits can be returned by source at any point in time as long as it has credits greater than 0.

The below figure exemplifies source returning credits. As shown in the figure, outstanding_credit is an internal counter for the source. When source returns credits, this counter is decremented.

Figure 244. Source Returning Credits
Note: Although the diagram above shows the returning of credits when valid is deasserted, return_credit can also be asserted while valid is asserted. In this case, source effectively spends 2 credits: one for valid, and one for return_credit.