P-Credit Management Mechanism
Function Description
According to the description of Retry in CHI protocol 2.3.2, P-Credit management follows the following rules: 1. When the RXRSP channel receives a PCrdGrant, a CAM records the PCrdType and SrcID of this operation. 2. If there is an MSHR in a certain Slice waiting for a PCredit of the same type {PCrdType, SrcID}, this PCredit is allocated to this Slice. - If multiple Slices hit simultaneously, the PCredit is allocated according to RoundRobin, and the record of this PCredit in the CAM is deleted. - If no Slice hits, the CAM saves the PCrdType and SrcID for subsequent use (the protocol allows PCrdGrant to be sent before RetryAck). 4. For a hitting Slice, if multiple MSHRs hit {PCrdType, SrcID}, it is allocated to one MSHR according to RoundRobin. 5. For each MSHR: - If a RetryAck is received, PType and SrcID are saved, and the pValid signal indicating waiting for a PCredit is asserted to notify the CAM. - If a matching PCredit is found in the CAM, the MSHR completes the operation, deasserts pValid, and deletes the matching entry in the CAM. - If no matching PCredit is found in the CAM, pValid remains asserted until the corresponding PCredit is received.