×
嵌入式 > 技术百科 > 详情

如何实现DS34S132与其它TDMoP器件的互操作

发布时间:2020-06-17 发布时间:
|

互操作性是一个系统经过很少甚至无需系统操作员介入而实现与其它系统协同工作的能力。系统的互操作性使其有可能为其它系统提供服务或接受其它系统的服务,使得不同厂商的系统能够协同工作。本应用笔记介绍如何设置DS34S132 TDM-over-Packet (TDMoP) IC,使其与其它TDMoP器件实现互操作。

引言

毋庸讳言,当今的通信系统需要不同设备和设备之间的复杂交互。随着技术的进步,互操作性也变得更加重要。互操作性是一个系统经过很少甚至无需系统操作员介入而实现与其它系统协同工作的能力。系统的互操作性使其有可能为其它系统提供服务或接受其它系统的服务,从而使不同厂商的系统能够协同工作。

本应用笔记着重介绍Maxim TDM-over-Packet (TDMoP) IC,DS34S132。文章介绍了在DS34S132与其他厂商TDMoP器件之间实现互操作性的设置要求。

 

互操作性要求

Maxim的TDMoP器件产生的数据包与其他厂商的TDMoP器件的报头信息可能不同。为了使TDMoP器件实现互操作,用户需要了解器件的设置类型。Maxim器件的设置为以下之一:

  • IP/UDP/RTP/SAToP
  • IP/UDP/RTP/CESoPSN
  • MEF/RTP/CESoETH—非结构化(即MEF/SAToP)
  • MEF/RTP/CESoETH—结构化锁定(即MEF/CESoPSN)
  • MPLS/RTP/SAToP—非结构化(即MPLS/RTP/SAToP)
  • MPLS/RTP/CESoPSN—结构化锁定(即MPLS/RTP/CESoPSN)

每种TDMoP器件设置都有不同的报头。为了实现互操作性,必须将来自于Maxim TDMoP器件的报头格式化,使其与其它器件的报头相同。这意味着用户需要比较TDMoP器件的报头,并查找格式差异。本应用笔记介绍如何利用Maxim的应用程序修改DS34S132 TDMoP器件的报头。文章还介绍了如何修改Maxim绑定配置,以接受协议相同但报头信息不同的数据包。

 

TDMoP格式

本节介绍TDM-over-Packet模块的功能描述。为了通过分组交换网络传输TDM数据,TDMoP器件将TDM数据封装为以太网数据包,如图1所示。TDMoP报头不同数据块的说明请参见表1。


图1. 以太网数据包格式的TDMoP封装。

表1. 以太网数据包结构

Field Description
Preamble A sequence of 56 bits (alternating 1 and 0 values) used for synchronization. Gives components in the network time to detect the presence of a signal.
Start frame delimiter A sequence of 8 bits (10101011) that indicates the start of the packet.
Destination and Source Addresses The Destination Address field identifies the station or stations that are to receive the packet. The Source Address identifies the station that originated the packet. A Destination Address can specify either an "individual address" destined for a single station, or a "multicast address" destined for a group of stations. A Destination Address of all 1 bits refers to all stations on the LAN and is called a "broadcast address."
Type Ether type
Data and padding This field contains the data transferred from the source station to the destination station or stations. The maximum size of this field is 1500 bytes. A minimum size Ethernet packet is 64 bytes from the Destination Address field through the Frame Check Sequence. If the packet size of this field is less than 46 bytes, padding is used to bring the packet size up to the minimum length.
Frame check sequence This field contains a 4-byte cyclical redundancy check (CRC) value used for error checking. When a source station assembles a packet, it performs a CRC calculation on all the bits in the packet from the Destination Address through the pad fields (that is, all fields except the preamble, start frame delimiter, and Frame Check Sequence). The source station stores the value in this field and transmits it as part of the packet. When the destination station receives the packet, it performs an identical check. If the calculated value does not match the value in this field, the destination station assumes that an error has occurred during transmission and discards the packet.

为了实现互操作性,用户需要注意TDMoP报头的两个部分:

UDP/IPv4报头互操作性

图2 所示为UDP/IPv4报头结构。表2和3详细说明了IPv4和UDP报头结构的不同域。


图2. UDP/IPv4报头。

表2. IPv4报头结构

Field Description
IPVER IP version number; IPv4 IPVER = 4
IHL Length in 32-bit words of the IP Header, IHL = 5
IP TOS IP type of service
Total length Length in octets of IP Header and data
Identification IP fragmentation identification
Flags IP control flags; must be set to 010 to avoid fragmentation
Fragment offset Indicates where in the datagram the fragment belongs; not used for TDMoP
Time to live IP time-to-live field; datagrams with zero in this field are discarded
Protocol Must be set to 0x11 to signify UDP
IP Header checksum Checksum for the IP Header
Source IP address IP address of the source
Destination IP address IP address of the destination

表3. UDP报头结构

Field Description
Source port number, destination port number Either the source or the destination port number holds the bundle identifier. The unused field can be set to 0x85E (2142), which is the user's port number assigned to TDMoP by the Internet Assigned Numbers Authority (IANA). For UDP/IP-specific OAM packets, the bundle identifier is all 1s.
UDP length Length in octets of UDP Header and data
UDP checksum Checksum of UDP/IP Header and data. If not computed, it must be set to zero.

根据IANA规定,UDP报头的目标端口应设定为0x85E (2142),这是分配给TDMoP的用户端口号。Maxim TDMoP器件默认遵循该规范。

部分TDMoP厂商在UDP报中的目标端口号位置分配一个绑定标识号,而不是在源端口号位置。有些厂商还分配一个随机号作为用户端口号,而不是采用IANA分配的0x85E。使用DS34S132时,用户可采用两种方式解决这些问题。

  1. 在预配置菜单中,将全部绑定标识号赋予相应的位置。
  2. 向绑定引擎表明绑定标识号在接收数据包中的位置。




  • RTP报头互操作性

    RTP报头

    Field Description
    V RTP version; must be set to 2.
    P Padding bit; must be set to 0.
    X Extension bit; must be set to 0.
    CC CSRC count; must be set to 0.
    M Marker bit; must be set to 0.
    PT Payload type. One PT value MUST be allocated from the range of dynamic values for each direction of the bundle. The same PT value MAY be reused for both directions of the bundle, and is also reused between different bundles.
    SN The sequence number identical to the sequence number in the control word.
    TS Timestamp. The RTP Header can be used in conjunction with the following modes of timestamp generation:
    Absolute mode: the chip sets timestamps using the clock recovered from the incoming TDM circuit.
    Differential (common clock) mode: The two chips at bundle edges have access to the same high-quality clock source, and this clock source is used for timestamp generation.
    SSRC Identifies the synchronization source. This identifier should be chosen randomly, with the intent that no two synchronization sources within the same RTP session will have the same SSRC identifier.










    如何区分其他厂商TDMoP器件的报文内容

    总结





      1. 向绑定引擎表明绑定标识号在接收数据包中的位置。参考上文中的图4,选项1,Bundle Configuration Decides (BCDR4),将在目标端口号或源端口号位置分配一个绑定标识号,取决于图5中所示的绑定配置。
        图5. DS34S132的绑定配置菜单。

        在以上的绑定配置菜单中,用户在UDP源端口号位置插入绑定标识号。用户还表明报文分类模块应该在UDP源端口号位置查找绑定标识号。

        如果用户知道数据包的绑定标识号位于UDP目标端口号位置,那么则很容易通过将选项45, RX Bundle Number Location at UDP port,修改为Destination进行表示,如图6所示。
        图6. DS34S132的绑定配置菜单的选项45。
      图7所示为RTP报头结构,表4介绍了RTP报头结构的不同域。


      图7. RTP报头

      表4. RTP报头结构
      为了在绝对时钟恢复模式下产生时钟,端口接收配置寄存器4 (PRCR4)中的RTP发生器时标模式选择(TSGMS)位需设定为1,即PRCR4.TSGMS = 1。为了在差分时钟恢复模式产生时钟,PRCR4寄存器中的TSGMS位需设定为0,即PRCR4.TSGMS = 0。用户无需手动设置这些寄存器位。在绑定配置中将RTP使能时,这些位被设置。

      自适应模式下, Maxim的DS34S132 TDMoP器件中的时钟恢复算法根据数据包之间到达延迟恢复时钟。因此,自适应时钟恢复模式下,使能RTP是可选的。然而,差分模式下, Maxim的DS34S132 TDMoP器件中的时钟恢复算法通过分析RTP报头中的时标恢复时钟。所以,差分时钟恢复模式下,强制使能RTP。

      为了实现互操作,用户需要确定其它TDMoP厂商用以发生RTP报头中时标的模式。用户还需要了解其它系统处于自适应还是差分时钟恢复模式。在接口配置中,可更改每个端口的时钟恢复模式。图8所示为如何修改时钟恢复模式。默认为自适应模式端口。
      图8. 接口配置。

      现在,如果用户希望更改时钟恢复模式,那么就需要使用选项40,Adaptive or Differential mode,如图9所示。
      图9. 在接口配置中选择差分时钟恢复模式。

      与Maxim的TDMoP器件不同,有些TDMoP厂商在自适应或差分时钟恢复模式下根据RTP报头中的时标恢复时钟。因此,为了实现与这些厂商系统的互操作, Maxim TDMoP器件在自适应时钟恢复模式下使能RTP。DS34S132,以及其它TDMoP厂商的器件,能够以三种方式在RTP报头中产生时标:
      1. 位模式
      2. 字节模式
      3. 帧模式
      无论数据包为自适应时钟恢复模式还是差分时钟恢复模式,用户均可通过更改接口和绑定配置产生RTP报头中的时标,如图10所示。
      图10. 在接口配置中为时标选择位、字节或帧模式。

      在接口配置中选择了时钟恢复模式和时标发生模式后,用户接下来需要在绑定配置中使能RTP模式。之前图5所示的绑定配置中的RTP被禁用。从绑定配置菜单中,用户需要利用选项27使能RTP模式,如图11所示。
      图11. 在接口配置中为时标选择位、字节或帧模式。

      一旦使能RTP模式,绑定配置菜单将如图12所示。
      图12. 使能RTP模式后的绑定配置菜单。

      有各种不同的软件可用于分析以太网上的报头。本应用笔记中使用Wireshark®软件。用户可这个软件。关于Wireshark的更多信息,请参见。

      互操作性是指各种不同系统和组织间无缝协同工作的能力。与其它产品可以实现互操作的器件要么遵循公开的接口标准,要么容许改变配置,将一个产品的接口直接转换为另一个产品的接口。通过了解其它TDMoP器件生成的报文内容,Maxim的器件可以很容易地与其它TDMoP器件的报文配置相匹配。



『本文转载自网络,版权归原作者所有,如有侵权请联系删除』

热门文章 更多
示波器使用时要注意的19个问题