声明:此文章为原创,转载请注明 转自https://blog.csdn.net/weixin_48180416/article/details/117396469
ACK Latency Timer
计算公式如下:
Max_Paylaod_size:最大的Payload Size;
TLPOverhead:包含TLP Prefix, header, LCRC, Sequence Number, STP, END,共28B;
AF如下表,(其他速率下的AF见Spec Table H-4 Table H-5)
LinkWidth:链路宽度;
Internal Delay: 19 Symbol Times for 2.5 GT/s mode operation, 70 Symbol Times for 5.0 GT/s mode operation, and 115 Symbol Times for 8.0 GT/s and 16.0 GT/s modes of operation.
计算后得到的ACK Latency Timer如下表:(其他速率见Table 3-7 Table 3-8)
REPLAY_TIMER
PCIe 3.1中规定的计算公式如下,实际上为ACK Latency Timer的三倍:
Base Spec 5.0提到Simplified REPLAY_TIMER Limit:
16GT/s及以上的速率时,必须用Simplified REPLAY_TIMER。只支持16GT/s以下速率时,强烈建议采用Simplified REPLAY_TIMER,也可以采用上述PCIe 3.1规定的方法。
Replay Buffer Depth(以Synopsys IP为例)
Buffer深度和以下因素有关
1. 先收到一个TLP包,AckNak_LATENCY_TIMER开始计数;
2. AckNak_LATENCY_TIMER expire;
3. remote device发送一个TLP,local device处理TLP,local device随后发送ACK DLLP,remote device处理DLLP,还有retimer的latency。
Buffer深度计算公式:
data_size{1}: receiver需要先接收一个TLP再开始启动AckNak_LATENCY_TIMER,至少需要一个TLP大小,payload+header(28B);
ack_lat_limit{2}: timer开始计时到超时,需要存多少包;
5.b+5.c: 是spec规定的19 Symbol Times for 2.5 GT/s mode operation, 70 Symbol Times for 5.0 GT/s mode operation, and
115 Symbol Times for 8.0 GT/s and 16.0 GT/s modes of operation;
5.a+5.d: the sum of the controller and PHY delays (Tx and Rx) of the local device, 由实现决定实际的延时;
cx_nb:为PIPE接口处理Symbol的数目,比如32bit PIPE, cx_nb为4 symbol for GEN2;
l0s_adj:退出L0s需要4 symbols的FTS序列。