Interlaken 协议 是一个(相对于PCIE来讲) 轻量级的跨chip 互联协议,部分内容是在SPI4.2协议基础上来的,由Cortina 和Cisco公司在2006年提出,目前最新的是 v1.2版本 (2008年)。官方文档有两份,名字和链接分别为:Interlaken Protocol Definition - A Joint Specification of Cortina Systems and Cisco Systems 和Interlaken Retransmit Extension Protocol Definition,其中,后者主要关系retry transmit。

http://interlakenalliance.com/wp-content/uploads/2019/12/Interlaken_Protocol_Definition_v1.2_CHANGE_BARS.pdf

http://interlakenalliance.com/wp-content/uploads/2019/12/Interlaken_Retransmit_Extension_v1.2.pdf

一篇介绍文章:

Interlaken IP - AnySilicon Semipedia.

一篇对 spec 的翻译文章,但只有一部分的翻译  Interlaken协议(上) - 简书

Interlaken 协议中的SerDes (PHY,可以包含多条lanes)也是双向传输的串行总线,每条lane都独立进行64/67b的编码,下图中的B0 … B7 是 byte的意思。也就是说 Interlaken 协议中的数据的传输基本单位就是64bit 有效数据 加 3bit辅助数据,每一个64/67bit数据会在相同的一条lane上传输。一个64/67bit 数据 (我们姑且称之为 一个interlaken word),可以分为三种类型:Burst/Idle Control word 、Burst data word、Framing Control word,三种类型通过 bit[65:63] 来区分。其中Burst/Idle Control word 、Burst data word属于protocol layer;Framing Control word属于framing layer,Framing Control word还会进一步细分为Synchronization, Scrambler State, Skip, and Diagnostic words这四类。

bit[65:63]

 

101

Burst/Idle Control word

01x

Burst data word

100

Framing Control word

 Spec中的5.3.2 burst structure,提到的burst概念,可以理解为 一个 Interlaken protocol包;一次burst 传输包含一个burst control word和 若干个burst data word,如果burst data word的个数少于BurstShort的要求,需要增加 若干个 Idle control word。BurstMax和BurstShort是用户可进行配置的参数,且必须是8byte的倍数,因为前面有提到过,所有lane上的传输都是64/67bit 为单位的。BurstMax和BurstShort的byte数是不包括那一个burst control word的,也不包含每一个word的64/67bit encode中的那辅助的3bit的。

(i) BurstMax: The maximum size of a data burst (a multiple of 64 bytes)

(ii) BurstShort: The minimum size of a data burst (a minimum of 32 bytes, with 8-byte increments)

对于 Figure 6 BurstShort Guarantee Illustration,我们需要从左往右看,图中的每一个竖条 就表示一个64/67bit的interlaken word。Burst data word是我们真正需要传输的有效数据,可以称之为 我们传输的payload数据。burst control word可以理解为 interlaken 协议规定的传输的 head数据,每一个burst需要对应1个control word。Idle control word完全是为了满足BurstShort的要求,插入的“无用”的word (其实,idle control中是可以携带 credit的flow control信息的)。

 为了减少idle control word,在5.3.2.1.1 Optional Scheduling Enhancement 节提出了BurstMin的概念,BurstMin: Defined to be a multiple of 32 bytes, subject to the constraints that BurstMin <= BurstMax/2 and BurstMin >= BurstShort;

Spec中举了一个例子来说明BurstMin的作用。Packet length是513 byte,BurstMax = 256 bytes,BurstShort = 64byte。如果不考虑BurstMin,那么packet 的payload切分burst为:

Burst 1 = BurstMax = 256 byte

Burst 2 = BurstMax = 256 byte

Burst 3 = packet remainder = 1 byte

由于Burst 3不足BurstShort,故需要插入Idle Control word,具体需要7个Idle Control word。那么整个packet 传输完毕,需要的总的word 数为 3个burst Control word + burst1的32个word Control + burst1的32个word Control + burst 3的一个word Control + burst3的7个Idle Control word。

如果考虑BurstMin = 64byte,使用spec中的算法,则burst 1 2 3 都不需要插入idle Control word

Burst 1 = BurstMax = 256 bytes

Burst 2 = BurstMax - BurstMin = 256 - 64 = 192 bytes

Burst 3 = packet_remainder = 65 bytes

此时,整个packet 传输完毕,需要的总的word 数为 3个burst Control word + burst1的32个word Control + burst1的24个word Control + burst 3的9个word Control 。

BurstMin只有在你的packet length大于BurstMax的情况下才有用,对于length小于BurstMax的packet,是没有用的。

Table 1 Idle/Burst Control Word Format 给出了control word的64/67bit每一个filed的含义。

Interlaken协议提供两种flow control形式,一种是 Out of band flow control,采用新增chip间信号线(需要实际的电路引脚)的方式实现。另外一种是 in band flow control,这种方式不需要新增chip间信号线,credit信息在 Burst/Idle 在control word中传递给对方chip。

Meta Frame是SerDes上传输的所有类型word的集合,Synchronization, Scrambler State, Skip, and Diagnostic words, along with the payload data (burst data and control information)。MetaFrameLength是一个可配置参数,其数值代表的是有多少个 64/67bit,也就是多少个spec示意图中的一个“竖条”。在MetaFrameLength个word中,必须包含一个Synchronization, 一个Scrambler State、一个Diagnostic words和若干个skip。

The size of the Meta Frame is a single programmable parameter, MetaFrameLength, that applies to all lanes of the bundle. It represents the sum of the data payload and one set of Synchronization, Scrambler State, Skip, and Diagnostic words. The Meta Frame structure is orthogonal to the data transmissions; these Meta Frame control words may occur at any point within a data burst.

 

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐