[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN1842045A - A data communication method inside a device - Google Patents

A data communication method inside a device Download PDF

Info

Publication number
CN1842045A
CN1842045A CN 200510058896 CN200510058896A CN1842045A CN 1842045 A CN1842045 A CN 1842045A CN 200510058896 CN200510058896 CN 200510058896 CN 200510058896 A CN200510058896 A CN 200510058896A CN 1842045 A CN1842045 A CN 1842045A
Authority
CN
China
Prior art keywords
data
frame
processor
conversion
submodule
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 200510058896
Other languages
Chinese (zh)
Other versions
CN100393060C (en
Inventor
刘友义
杨源新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Shanghai Electric Power Co Ltd
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CNB200510058896XA priority Critical patent/CN100393060C/en
Publication of CN1842045A publication Critical patent/CN1842045A/en
Application granted granted Critical
Publication of CN100393060C publication Critical patent/CN100393060C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The invention discloses a inner data communicating method of device which provides different communicating interface circuit connection between the function unit and the exchanging center unit; when the processor of the function unit doesn't have the standard Ethernet MII interface, it provides the function unit which uses the bus interface type communicating interface circuit to connect with the exchanging center unit; when the processor of the function unit has the standard Ethernet MII interface, it provides the function unit which uses the MII interface type communicating interface circuit to connect with the exchanging center unit; it uses the low pressure differential signal transferring to send and receive the signal between the function unit and the exchanging center unit.

Description

一种设备内部的数据通讯方法A data communication method inside a device

技术领域technical field

本发明涉及一种以太网帧格式数据通讯领域,尤其涉及到复杂系统设备的机架内各个功能单元之间的通讯方法。The invention relates to the field of Ethernet frame format data communication, in particular to a communication method between various functional units in a rack of complex system equipment.

背景技术Background technique

以太网技术自从1990年10BASE-T标准正式通过以来,由于其开放性、结构简单、算法简洁、良好的兼容性和平滑升级功能,并且传输带宽也在随着时间的推移而大幅提升,不但在局域网领域取得霸主地位,其疆域还扩展到城域网和广域网范围。其中交换式以太网产品由于其总的传输带宽是单个端口的数十倍,而且各个端口之间也不存在媒体争用问题,在重负荷应用场合下,总体性能更加突出。Since the formal adoption of the 10BASE-T standard in 1990, Ethernet technology has been greatly improved due to its openness, simple structure, concise algorithm, good compatibility and smooth upgrade function, and the transmission bandwidth has also been greatly improved over time. The domain of the local area network has achieved a dominant position, and its territory has also expanded to the range of the metropolitan area network and the wide area network. Among them, because the total transmission bandwidth of switched Ethernet products is dozens of times that of a single port, and there is no media contention problem between ports, the overall performance is more prominent in heavy-load applications.

在复杂的设备中,为了完成特定的任务,需要各个功能单元协同工作,为了协同工作,各单元之间必须要有畅通的联络通道。根据目前现有的多节点通讯技术,综合考虑传输带宽和成本以及技术复杂程度,交换式以太网10BASE-T/100BASE-TX是最好的选择,这种技术不仅带宽大,采用星形拓扑结构,扩展性好,而且可以实现任意两点之间通讯而不干扰其他单元。因此,交换式以太网被广泛使用于复杂的通讯设备中。In complex equipment, in order to complete specific tasks, each functional unit needs to work together. In order to work together, there must be a smooth communication channel between the units. According to the existing multi-node communication technology, considering the transmission bandwidth, cost and technical complexity, switched Ethernet 10BASE-T/100BASE-TX is the best choice. This technology not only has a large bandwidth, but also adopts a star topology , good scalability, and can realize communication between any two points without disturbing other units. Therefore, switched Ethernet is widely used in complex communication equipment.

根据IEEE802.3规范,标准的10BASE-T/100BASE-TX以太网体系物理层和数据链路层之间,采用了MII即介质无关接口,物理层面,则采用了CSMA/CD(Carrier Sense MultipleAccess with Collision Detection,带冲突检测的载波侦听多路访问),这是以太网技术的特色之一,采用这一机制,使得多个以太网站点可以共享一段媒体介质,但是在设计设备内部通讯方案时,标准的以太网结构10BASE-T/100BASE-TX在复杂的通讯设备中使用存在以下问题:According to the IEEE802.3 specification, between the physical layer and the data link layer of the standard 10BASE-T/100BASE-TX Ethernet system, MII, or Media Independent Interface, is used. On the physical layer, CSMA/CD (Carrier Sense Multiple Access with Collision Detection, carrier sense multi-access with collision detection), this is one of the characteristics of Ethernet technology, using this mechanism, multiple Ethernet sites can share a piece of media, but when designing the internal communication scheme of the device , the standard Ethernet structure 10BASE-T/100BASE-TX has the following problems when used in complex communication equipment:

问题一:作为以太网交换中心单元,交换中心的每个端口都需要使用一个脉冲变压器以及相应的匹配网络电路,有时交换中心单元因PCB(Printed Circuit Board,电路印刷板)可用面积的原因往往无法布局,只好退而求其次,另外安排一块单板,增加了背板的复杂程度,增加了总体成本。Problem 1: As an Ethernet switching center unit, each port of the switching center needs to use a pulse transformer and a corresponding matching network circuit. For the layout, we have to settle for the next best thing, and arrange another single board, which increases the complexity of the backplane and increases the overall cost.

问题二:各个端口的以太网在处理器一侧使用标准的MII接口,对于一些功能简单的单板,因只使单片机或者廉价处理器而不具备这种接口,无法通过以太交换网通讯,只好另外增设RS485或者RS232来通讯,致使整机设备中出现链型485通讯结构、星型以太网结构或者星型双口RAM通讯结构等两种或三种拓扑结构并存,这样不但增加了总体通讯复杂程度和成本,而且使通讯效率也大大降低。Question 2: The Ethernet of each port uses a standard MII interface on the processor side. For some boards with simple functions, because they only use single-chip microcomputers or cheap processors without this interface, they cannot communicate through the Ethernet switching network. In addition, RS485 or RS232 is added for communication, resulting in the coexistence of two or three topological structures such as chain-type 485 communication structure, star-type Ethernet structure or star-type dual-port RAM communication structure in the whole device, which not only increases the complexity of the overall communication The degree and cost, and the communication efficiency is also greatly reduced.

发明内容Contents of the invention

本发明的目的是为了克服现有技术中标准以太网技术物理层配置要求过多,物理层和MAC(媒体访问控制器)层的接口不利于和普通处理器连接的缺点,解决现有技术中存在的物理层器件过多,占用空间大,以及整机设备存在多种通讯结构的问题,而提出一种设备内部的数据通讯方法。The purpose of the present invention is in order to overcome the standard Ethernet technology physical layer configuration requirement too much in the prior art, the interface of physical layer and MAC (media access controller) layer is unfavorable for the shortcoming that is connected with common processor, solves the problem in the prior art There are too many physical layer devices, taking up a lot of space, and there are multiple communication structures in the whole device, so a data communication method inside the device is proposed.

为了实现上述发明目的,本发明提出的一种设备内部的数据通讯方法,包括步骤如下:In order to achieve the purpose of the above invention, a data communication method within the device proposed by the present invention includes the following steps:

步骤1、在各个功能单元和交换中心单元间构造以交换中心单元为核心的星型结构,功能单元之间通过交换中心单元进行双向通讯;Step 1. Construct a star structure with the switching center unit as the core between each functional unit and the switching center unit, and carry out two-way communication between the functional units through the switching center unit;

步骤2、根据功能单元的处理器类型的不同,在功能单元和交换中心单元之间提供不同的通讯接口电路连接:Step 2. According to the difference of the processor type of the functional unit, different communication interface circuit connections are provided between the functional unit and the switching center unit:

当功能单元的处理器不带有标准以太网MII接口时,使该功能单元通过总线接口型通讯接口电路与交换中心单元进行连接;When the processor of the functional unit does not have a standard Ethernet MII interface, the functional unit is connected to the switching center unit through a bus interface type communication interface circuit;

当功能单元的处理器带有标准以太网MII接口标准时,使该功能单元通过MII接口型通讯接口电路与交换中心单元进行连接;When the processor of the functional unit has a standard Ethernet MII interface standard, the functional unit is connected to the switching center unit through the MII interface type communication interface circuit;

步骤3、在功能单元和交换中心单元之间使用低压差分信号传输进行信号的收发。Step 3. Send and receive signals between the functional unit and the switching center unit using low-voltage differential signal transmission.

采用本发明所述的方法,在设备内部通讯时,每个单元独占一个以太网段,采用全双工交换方式,信号收发采用了LVDS(Low Voltage Differential Signaling,低压差分信号传输),不需要复杂的调制解调以及模拟匹配网络,标准的以太网信号,这样不需要调制解调以及模拟匹配网络,简化了物理层电路,并且使得功能单元使用的处理器无论是否具备以太网MII接口,均可以接入到以太网交换电路,从而简化了整机各单元通讯的拓扑结构,降低整体通讯软件的复杂程度,并在总体上降低了成本。Using the method described in the present invention, each unit exclusively occupies an Ethernet segment during the internal communication of the device, adopts a full-duplex switching mode, and uses LVDS (Low Voltage Differential Signaling, Low Voltage Differential Signaling) for signal transmission and reception, and does not require complicated Modulation and demodulation and analog matching network, standard Ethernet signal, so that no modulation and demodulation and analog matching network are required, the physical layer circuit is simplified, and the processor used by the functional unit can be used regardless of whether it has an Ethernet MII interface. It is connected to the Ethernet switching circuit, thereby simplifying the communication topology of each unit of the whole machine, reducing the complexity of the overall communication software, and reducing the overall cost.

附图说明Description of drawings

图1整体通讯拓扑结构图;Figure 1 overall communication topology structure diagram;

图2总线接口型通讯接口电路图;Fig. 2 bus interface type communication interface circuit diagram;

图3MII接口型通讯接口电路图;Fig. 3 MII interface type communication interface circuit diagram;

图4总线接口型数据发送缓冲控制图;Fig. 4 bus interface type data transmission buffer control diagram;

图5总线接口型帧数据包装和发送处理图;Fig. 5 bus interface type frame data packaging and sending processing diagram;

图6总线接口型数据接收缓冲控制图;Fig. 6 bus interface type data reception buffer control diagram;

图7总线接口型帧接收处理图;Fig. 7 bus interface type frame reception processing diagram;

图8MII接口型通讯接口电路帧发送处理图;Figure 8 MII interface type communication interface circuit frame transmission processing diagram;

图9MII接口型通讯接口电路帧接收处理图。Fig. 9 is a frame receiving and processing diagram of the MII interface type communication interface circuit.

具体实施方式Detailed ways

图1是整体通讯拓扑结构,各功能单元和以太网交换单元构成一个星形网络,其中以太网交换单元是中心。Figure 1 is the overall communication topology, each functional unit and the Ethernet switching unit form a star network, in which the Ethernet switching unit is the center.

图2是一种总线接口型通讯接口电路,该电路模型适合于那种处理器不带有标准的MII接口,或者MII接口数量不够但需要扩展以太网接口的单元,此种接口,处理器对于以太网数据帧的收发,是通过总线的读写访问来完成的。Fig. 2 is a kind of bus interface type communication interface circuit, this circuit model is suitable for that kind of processor does not have the standard MII interface, or the unit that MII interface number is not enough but needs to expand the Ethernet interface, this kind of interface, the processor is for The sending and receiving of Ethernet data frames is accomplished through the read and write access of the bus.

图3是MII接口型通讯接口电路,该电路模型适合于那种处理器带有标准的MII接口的单元。此种接口,处理器对于以太网数据帧的收发,是通过和内部的通讯处理器通讯来完成的。Fig. 3 is the MII interface type communication interface circuit, this circuit model is suitable for the unit with the standard MII interface of that kind of processor. In this interface, the processor sends and receives Ethernet data frames through communication with the internal communication processor.

参见附图2,总线接口型数据通讯电路是由以下电路模块组成:总线型数据收发缓冲控制模块22,发送时钟23,帧包装和发送处理模块24,以及帧提取校验处理模块25组成。处理器把要发送的数据写入到总线型数据收发缓冲控制模块22的发送缓冲区内,然后启动发送,则帧包装和发送处理模块24完成数据的封装,封装后的数据先后经过4B/5B变换和并/串变换,最后转换成LVDS信号发送给交换中心单元。一帧发送完后,立即由底层控制电路向处理器发送一个中断,通知处理器。该中断标志在处理器写任一缓冲区数据时被清除。Referring to accompanying drawing 2, bus interface type data communication circuit is made up of following circuit modules: bus type data receiving and dispatching buffer control module 22, sending clock 23, frame packaging and sending processing module 24, and frame extracting check processing module 25 are made up. The processor writes the data to be sent into the sending buffer of the bus type data transceiver buffer control module 22, then starts sending, then the frame packaging and sending processing module 24 completes the encapsulation of the data, and the encapsulated data passes through 4B/5B successively Conversion and parallel/serial conversion, and finally converted into LVDS signals and sent to the switching center unit. After a frame is sent, the underlying control circuit immediately sends an interrupt to the processor to notify the processor. This interrupt flag is cleared when the processor writes data to any buffer.

交换中心单元先对数据进行LVDS电平变换,转换成LVDS信号后,经过帧提取校验处理模块25经过帧提取和CRC校验的全过程后,把提取到的帧信号内容写入总线型收发缓冲控制模块22的接收缓冲区,供处理器随时读出。向接收缓冲区写完这些内容后,立即由底层控制电路向处理器发送一个中断,通知处理器。该中断标志在处理器读缓冲区数据时被清除。The switching center unit first performs LVDS level conversion on the data and converts it into an LVDS signal. After the frame extraction and verification processing module 25 goes through the whole process of frame extraction and CRC verification, the extracted frame signal content is written into the bus type transceiver. The receiving buffer of the buffer control module 22 is for the processor to read at any time. After writing these contents to the receiving buffer, the underlying control circuit immediately sends an interrupt to the processor to notify the processor. This interrupt flag is cleared when the processor reads data from the buffer.

参见附图3,MII接口型通讯接口电路是由以下电路模块组成:帧发送处理模块和帧提取模块,由于标准的MII接口,数据包发送到MII界面,已经是完整的数据包(包含CRC校验码)和帧间隔以及空闲码,处理器发送的数据经过4B/5B码型变换、并/串变换和LVDS电平变换后转换为LVDS信号发送给交换中心单元,而从交换中心单元发送的数据则先后执行LVDS电平变换/时钟数据恢复(CDR),串/并变换,5B/4B码型变换,数据帧边界处理后把数据发送给处理器。这些变换都是物理层的变换处理,CRC校验部分和帧数据提取部分,则由处理器相关功能外部接口和算法来完成。Referring to accompanying drawing 3, MII interface type communication interface circuit is made up of following circuit modules: frame transmission processing module and frame extracting module, because standard MII interface, data packet is sent to MII interface, has been complete data packet (comprising CRC proofreading module) Check code) and frame interval and idle code, the data sent by the processor is converted into LVDS signal after 4B/5B code conversion, parallel/serial conversion and LVDS level conversion, and sent to the switching center unit, while the data sent from the switching center unit For the data, LVDS level conversion/clock data recovery (CDR), serial/parallel conversion, 5B/4B pattern conversion, and data frame boundary processing are performed successively, and the data is sent to the processor. These transformations are the transformation processing of the physical layer, and the CRC check part and the frame data extraction part are completed by the external interface and algorithm of the relevant functions of the processor.

以构造100BASE-TX的帧结构为例,首先对总线接口型数据通讯电路的具体结构做详细的描述如下:Taking the frame structure of 100BASE-TX as an example, firstly, the specific structure of the bus interface data communication circuit is described in detail as follows:

总线接口型数据发送缓冲控制模块:参见附图4,所述模块的核心是一个单向传递数据的不等口宽的双口RAM电路41,其读出口宽度为4,处理器接口侧写入宽度以处理器的实际总线宽度为准。处理器以外总线写方式,把以太网数据帧的目的地址,源地址,长度/类型字段,和数据以及填充PAD写入到双口RAM,写完一帧后,启动发送,由发送时隙控制子模块42在适当的时间产生读允许信号,通过“读出地址,读信号”模块43,结合时钟,产生双口RAM的读地址,读控制信号,把数据读出。5分频模块44用于对输入的125M时钟进行5分频,产生25M的4位并口读出时钟。Bus interface type data transmission buffer control module: referring to accompanying drawing 4, the core of described module is the dual-port RAM circuit 41 of the unequal mouth width of one-way transmission data, and its reading port width is 4, and processor interface side writes The width is subject to the actual bus width of the processor. Bus write mode outside the processor, write the destination address, source address, length/type field, data and filling PAD of the Ethernet data frame into the dual-port RAM, after writing a frame, start sending, controlled by the sending time slot The sub-module 42 generates the read permission signal at an appropriate time, through the "read address, read signal" module 43, combined with the clock, generates the read address of the dual-port RAM, reads the control signal, and reads the data. The 5-frequency division module 44 is used to divide the input 125M clock by 5 to generate a 25M 4-bit parallel port readout clock.

总线接口型帧数据包装和发送处理模块:参见图5由“前导码/起始码/结束码/空闲码”生成子模块51,并/串变换子模块52,CRC校验码产生子模块53,4B/5B变换子模块54,并/串变换电路子模块55,和LVDS电平变换子模块56组成。发送缓冲器的数据写完后,处理器发送“启动发送”信号。首先,“前导码/起始码/结束码/空闲码”生成子模块51以25M的频率5-BIT宽度的格式发送7个前导字节码,接着发送起始码,发送到并/串变换电路子模块55;然后,由双口RAM 41输出的4位并行数据经过并/串变换子模块52变换后分两路输出;一路数据仍以4位宽度的格式发送给4B/5B变换子模块54;另一路数据以串行数据的格式发送给CRC校验码产生子模块53,用于生成CRC校验码;在读出双口RAM 41的内容的同时,启动CRC校验码产生子模块53,产生32位的CRC校验码,并在双口RAM 41的内容读取完毕后,将CRC校验码发送给4B/5B变换子模块54;CRC发送完毕后,再由“前导码/起始码/结束码/空闲码”生成子模块51发送帧结束码和空闲码,从而完成一个完整数据帧的封装处理。如果没有新的数据发送,则空闲码一直在发送。封装好的帧通过4B/5B变换子模块54进行4B/5B变换,变换后的5BIT宽度数据再通过并/串变换电路子模块55进行并/串变换,最后对串行数据进行LVDS变换,以125M的时钟输出到背板。Bus interface type frame data packaging and sending processing module: refer to Figure 5 to generate sub-module 51 from "preamble/start code/end code/idle code", parallel/serial conversion sub-module 52, CRC check code generation sub-module 53 , 4B/5B conversion sub-module 54, parallel/serial conversion circuit sub-module 55, and LVDS level conversion sub-module 56. After the data in the send buffer has been written, the processor sends a "start sending" signal. First, the "preamble/start code/end code/idle code" generation sub-module 51 sends 7 preamble byte codes in the format of 25M frequency 5-BIT width, then sends the start code, and sends it to the parallel/serial conversion The circuit sub-module 55; then, the 4-bit parallel data output by the dual-port RAM 41 is transformed by the parallel/serial conversion sub-module 52 and then divided into two outputs; one road data is still sent to the 4B/5B conversion sub-module in the format of 4-bit width 54; Another road data is sent to CRC check code generation submodule 53 with the format of serial data, is used to generate CRC check code; While reading the content of dual-port RAM 41, start CRC check code generation submodule 53, generate 32-bit CRC check codes, and after the content of dual-port RAM 41 has been read, the CRC check codes are sent to the 4B/5B conversion submodule 54; The "start code/end code/idle code" generation sub-module 51 sends the frame end code and idle code, thereby completing the encapsulation process of a complete data frame. If there is no new data to send, the idle code has been sent. The encapsulated frame is carried out 4B/5B conversion by 4B/5B conversion sub-module 54, and the 5BIT width data after conversion is carried out parallel/serial conversion by parallel/serial conversion circuit sub-module 55 again, and finally serial data is carried out LVDS conversion, with 125M clock output to the backplane.

本发明所使用的4B/5B编码除空闲码外,其余编码采用的是802.3-2002,clause 24的标准子集(以下同),如表1所示:The used 4B/5B coding of the present invention except idle code, what all the other codings adopted is 802.3-2002, the standard subset of clause 24 (below the same), as shown in table 1:

                                  表1   5B编码43210   名称   MII接口(TXD3:0/RXD3:0)3210   解释 Table 1 5B code 43210 name MII interface (TXD3: 0/RXD3: 0) 3210 explain

  11110 11110   0 0   0000 0000   数据0 Data 0   01001 01001   1 1   0001 0001   数据1 Data 1   10100 10100   2 2   0010 0010   数据2 Data 2   10101 10101   3 3   0011 0011   数据3 Data 3   01010 01010   4 4   0100 0100   数据4 Data 4   01011 01011   5 5   0101 0101   数据5 Data 5   01110 01110   6 6   0110 0110   数据6 Data 6   01111 01111   7 7   0111 0111   数据7 Data 7   10010 10010   8 8   1000 1000   数据8 Data 8   10011 10011   9 9   1001 1001   数据9 Data 9   10110 10110   A A   1010 1010   数据A Data A   10111 10111   B B   1011 1011   数据B Data B   11010 11010   C C   1100 1100   数据C Data C   11011 11011   D D   1101 1101   数据D Data D   11100 11100   E E   1110 1110   数据E Data E   11101 11101   F F   1111 1111   数据F Data F   10000 10000   I1 I1   无定义 undefined   空闲码第1部分 Idle Code Part 1   10000 10000   I2 I2   无定义 undefined   空闲码第2部分 Idle Code Part 2   11000 11000   J J   0101 0101   前导码第1部分 Preamble part 1   10001 10001   K K   0101 0101   前导码第2部分 Preamble part 2   01011 01011   SFD1 SFD1   0101 0101   起始码第1部分 Start Code Part 1   11011 11011   SFD2 SFD2   1101 1101   起始码第2部分 Start Code Part 2   01101 01101   T T   无定义 undefined   帧结束码第1部分 Frame end code part 1   00111 00111   R R   无定义 undefined   帧结束码第2部分 Frame end code part 2

CRC校验码采用802.3标准的CRC多项式生成器生成,该CRC多项式是:The CRC check code is generated by the 802.3 standard CRC polynomial generator, and the CRC polynomial is:

G(X)=X32+X26+X23+X22+X16+X12+X11+X10+X8+X7+X5+X4+X2+X1+1;G(X)=X 32 +X 26 +X 23 +X 22 +X 16 +X 12 +X 11 +X 10 +X 8 +X 7 +X 5 + X 4 + X 2 +X 1 +1;

总线接口型数据接收缓冲控制模块:参见图6,该模块由写地址生成子模块61和双口RAM子模块62组成。写地址生成子模块61在下层电路接收到有效以太网数据帧后,在适当的时间,生成双口RAM写地址。双口RAM子模块62是一个单向传递数据的不等口宽的双口RAM,其写入口宽度为4,处理器接口侧读出宽度以处理器的实际总线宽度为准。当下层电路接收完一帧后,将有一个中断信号。处理器以外总线读方式,把以太网数据帧的总长度、CRC校验结果标志、以太网数据帧的目的地址、源地址、长度/类型字段,和数据以及填充PAD从双口RAM读出,写地址生成模块61在处理器执行第1条读指令清除中断信号,程序应该确保一次读完整个接收到数据帧的时间尽可能短,以确保以太帧的完整性。Bus interface type data receiving buffer control module: see FIG. 6 , this module is composed of a write address generating submodule 61 and a dual-port RAM submodule 62 . The write address generation sub-module 61 generates the write address of the dual-port RAM at an appropriate time after the lower circuit receives the valid Ethernet data frame. The dual-port RAM sub-module 62 is a dual-port RAM with unequal port widths for one-way data transmission. Its write-in port width is 4, and the read-out width at the processor interface side is based on the actual bus width of the processor. After the lower circuit receives a frame, there will be an interrupt signal. In bus read mode outside the processor, the total length of the Ethernet data frame, CRC check result flag, destination address, source address, length/type field of the Ethernet data frame, and data and filling PAD are read from the dual-port RAM. The write address generating module 61 clears the interrupt signal when the processor executes the first read instruction, and the program should ensure that the time for reading the entire received data frame at one time is as short as possible to ensure the integrity of the Ethernet frame.

总线接口型帧接收处理模块:参见图7所示,由CDR(时钟和数据恢复电路)子模块71,5分频子模块72,并/串变换子模块73,CRC校验码产生子模块74,“帧头/帧尾识别”子模块75,帧提取子模块76,串/并变换子模块77,5B/4B变换子模块78,CRC比较子模块79和帧长度计数子模块710组成。其中CDR子模块71用于从背板来的LVDS信号中再生成125M的数据和时钟信号。5分频子模块72用于把线路恢复的125M时钟信号分频为25M的时钟信号,供内部并行处理使用。“帧头/帧尾识别”子模块75用于根据信号码流的数据特征,产生帧信号开始和帧信号有效信号。帧提取子模块76用于提取以太帧从目的地址到CRC校验码为止的串行码流。串/并变换子模块77把帧提取子模块76来的串行数据进行串/并变换,变成5B宽度的并行数据。5B/4B变换子模块78则根据表1所示的对照表,把并行数据变换成4B宽度的数据,一方面写入到接收缓冲双口RAM,另一方面再次通过并/串变换子模块73进行并/串变换,串行的数据通过CRC校验码产生子模块74产生CRC校验码。这个生成的CRC校验码通过CRC比较子模块79和接收到的CRC校验码进行对比,根据对比的结果,把CRC校验结果表示写到接收缓冲单元的固定偏移量为2的字节中。帧长度计数子模块710则根据“帧头/帧尾识别”子模块75产生的信号,计算接收到帧的长度,并把这个长度数据写到接收缓冲单元的固定偏移量为0的字节中。CRC校验码的产生算法和上述发送过程相同。Bus interface type frame receiving and processing module: see as shown in Figure 7, by CDR (clock and data recovery circuit) submodule 71, 5 frequency division submodule 72, parallel/serial conversion submodule 73, CRC check code generation submodule 74 , "frame header/frame tail identification" submodule 75, frame extraction submodule 76, serial/parallel conversion submodule 77, 5B/4B conversion submodule 78, CRC comparison submodule 79 and frame length counting submodule 710. The CDR sub-module 71 is used to regenerate 125M data and clock signals from the LVDS signals from the backplane. The 5-frequency sub-module 72 is used to divide the recovered 125M clock signal into a 25M clock signal for internal parallel processing. The "frame head/frame tail identification" sub-module 75 is used to generate frame signal start and frame signal valid signals according to the data characteristics of the signal code stream. The frame extraction sub-module 76 is used to extract the serial code stream of the Ethernet frame from the destination address to the CRC check code. The serial/parallel conversion sub-module 77 performs serial/parallel conversion on the serial data from the frame extraction sub-module 76 to become parallel data with a width of 5B. The 5B/4B conversion sub-module 78 converts the parallel data into data with a width of 4B according to the comparison table shown in Table 1. On the one hand, it is written into the receiving buffer dual-port RAM, and on the other hand, it passes through the parallel/serial conversion sub-module 73 again Parallel/serial conversion is performed, and the serial data generates a CRC check code through the CRC check code generation sub-module 74 . The generated CRC check code is compared with the received CRC check code by the CRC comparison submodule 79, and according to the result of the comparison, the CRC check result is written to the byte with a fixed offset of 2 in the receiving buffer unit middle. The frame length counting sub-module 710 calculates the length of the received frame according to the signal generated by the "frame head/frame tail identification" sub-module 75, and writes this length data to the byte whose fixed offset of the receiving buffer unit is 0 middle. The generation algorithm of the CRC check code is the same as the above-mentioned sending process.

以构造100BASE-TX的帧结构为例对MII接口型数据通讯电路的各个组成模块进行详细描述:Taking the frame structure of 100BASE-TX as an example, each component module of the MII interface data communication circuit is described in detail:

MII接口型通讯接口电路帧发送处理模块:参见图8,该模块由4B/5B变换子模块81,并/串变换子模块82,LVDS电平变换电路83,5分频子模块84组成。4B/5B变换子模块81把来自MII接口的4位并行数据变换成5B编码,变换规则如表1所示。并/串变换子模块82则把5B编码后的数据以125MHz的速率串行发送出去。MII interface type communication interface circuit frame transmission processing module: see Fig. 8, this module is composed of 4B/5B conversion sub-module 81, parallel/serial conversion sub-module 82, LVDS level conversion circuit 83, 5 frequency division sub-module 84. The 4B/5B conversion sub-module 81 converts the 4-bit parallel data from the MII interface into a 5B code, and the conversion rules are shown in Table 1. The parallel/serial conversion sub-module 82 sends out the 5B coded data serially at a rate of 125MHz.

MII接口型通讯接口电路帧接收处理模块:参见图9,该模块由CDR子模块91,5分频子模块92,“帧头/帧尾识别”子模块93,帧提取子模块94,串/并变换子模块95和5B/4B变换子模块96组成。CDR子模块91把线路来的LVDS信号流再生成125MHz的数据和时钟,并产生CRS信号。5分频子模块92把线路时钟分频得到RX_CLK,“帧头/帧尾识别”子模块93则处理得到RX_DV信号,帧提取子模块94则提取完整的以太起始码和完整的以太帧,串/并变换子模块95把线路的5B编码进行串/并变换,变成5-BIT宽度的并行数据,然后输出到5B/4B变换子模块96进行4B编码还原,变换规则如表1所示。得到MII接口的RXD3:0信号。MII interface type communication interface circuit frame receiving and processing module: see Fig. 9, this module is made up of CDR submodule 91, 5 frequency division submodule 92, "frame head/frame tail identification" submodule 93, frame extraction submodule 94, string/ And the conversion sub-module 95 and the 5B/4B conversion sub-module 96 are formed. The CDR sub-module 91 regenerates the LVDS signal stream from the line into 125MHz data and clock, and generates a CRS signal. The 5-frequency sub-module 92 divides the frequency of the line clock to obtain RX_CLK, the "frame head/frame tail identification" sub-module 93 processes the RX_DV signal, and the frame extraction sub-module 94 extracts the complete Ethernet start code and the complete Ethernet frame, The serial/parallel conversion sub-module 95 performs serial/parallel conversion on the 5B code of the line to become parallel data of 5-BIT width, and then outputs it to the 5B/4B conversion sub-module 96 to restore the 4B code. The conversion rules are shown in Table 1 . Get the RXD3:0 signal of the MII interface.

软件部分的处理步骤如下:MAC地址采用本地有效地址的方式,即将地址第二位固定置为1。在采用本地设定的情况下,本发明采用在每块单元板上电后,处理器根据从背板上获得的机框/槽位信号,通过一定的算法来,即可生成在一个系统中唯一的MAC地址,用于板间的以太网通讯。对于更上层的网络地址,例如单板相应的通讯用的IP地址,则采用DHCP的方式来获得,也可以用同类似的方式和单板的槽位信息绑定。The processing steps of the software part are as follows: the MAC address adopts the form of a local effective address, that is, the second bit of the address is fixed to 1. In the case of local settings, the present invention adopts that after each unit board is powered on, the processor can generate it in a system according to the chassis/slot signal obtained from the backplane through a certain algorithm. Unique MAC address for Ethernet communication between boards. For the higher-level network address, such as the corresponding communication IP address of the board, it is obtained through DHCP, and can also be bound with the slot information of the board in a similar manner.

本发明主要是针对802.3 100BASE-TX标准的MII接口以下的物理层进行了变动,对上层协议来讲是完全透明的,所以对网络层的接口仍然采用802.2 LLC协议中规定TYPE 1方式是完全可行的。流量控制方面,根据802.3标准附录31B,需要进行流入控制的单元,可以根据处理的性能,在每接收完一帧或者数帧数据后,发送一个PAUSE帧。暂停的时间长度,则写入到PAUSE帧的request_operand字段。每块单板对外发送信息之前,需要分析发送目标是否有流控请求,如果有的话,则按照对端申告的时间,推迟发送。如果是广播或者多播,发方时延由最大的间隔值确定。The present invention is mainly aimed at changing the physical layer below the MII interface of the 802.3 100BASE-TX standard, which is completely transparent to the upper layer protocol, so it is completely feasible to still use the TYPE 1 method specified in the 802.2 LLC protocol for the interface of the network layer of. In terms of flow control, according to Appendix 31B of the 802.3 standard, the unit that needs to perform flow control can send a PAUSE frame after receiving one or several frames of data according to the processing performance. The length of the pause is written to the request_operand field of the PAUSE frame. Before each board sends information to the outside, it needs to analyze whether the sending target has a flow control request. If so, the sending is delayed according to the time declared by the peer. In the case of broadcast or multicast, the sender delay is determined by the largest interval value.

本发明数据通讯限于第2层的数据交换,只要各个功能单元的MAC地址没有重复,就可以通过交换中心完成各个单元的数据交换。由于底层链路采用了100M全双工的方式,使单片机或者低性能处理器和带有MII接口的高性能处理器在通讯时,针对处理能力不同需要引入流控的机制,流控机制采用802.3标准PAUSE帧,结合各单元上层应用程序来完成。The data communication of the present invention is limited to the data exchange of the second layer, as long as the MAC addresses of each functional unit are not repeated, the data exchange of each unit can be completed through the switching center. Since the underlying link adopts the 100M full-duplex mode, when communicating with a single-chip microcomputer or a low-performance processor and a high-performance processor with an MII interface, a flow control mechanism needs to be introduced according to different processing capabilities. The flow control mechanism adopts 802.3 The standard PAUSE frame is completed in conjunction with the upper layer application programs of each unit.

Claims (8)

1, a kind of data communication method of device interior is characterized in that, comprises the steps:
Step 1, structure is the hub-and-spoke configuration of core with the switching center unit between each functional unit and switching center unit, carries out both-way communication by the switching center unit between the functional unit;
Step 2, according to the difference of the processor type of functional unit, between functional unit and switching center unit, provide different communication interface circuit to connect:
When the processor of functional unit does not have standard ethernet MII interface, this functional unit is connected with the switching center unit by bus interface shape of the mouth as one speaks communication interface circuit;
When the processor of functional unit has standard ethernet MII interface, this functional unit is connected with the switching center unit by MII interface type communication interface circuit;
Step 3, use Low Voltage Differential Signal transmission the carrying out transmitting-receiving of signal between functional unit and switching center unit.
2, the means of communication according to claim 1 is characterized in that, carry out the frame structure of the The data 100BASE-TX of communication; In the described step 2, when the processor of functional unit did not have standard ethernet MII interface, the communication step between this functional unit and switching center unit was as follows:
Bus interface shape of the mouth as one speaks circuit sends data:
A, processor are written to the data that will send in the transmission buffering area of bus-type data transmit-receive buffering control module (22);
B, processor send " start and send " signal, the frame packing is provided and sends the encapsulation that processing module (24) is finished data, and to the encapsulation after data carry out 4B/5B conversion, parallel/serial conversion and LVDS level conversion, convert the LVDS signal to and send to the switching center unit;
After C, a frame send, send an interrupt notification processor by the bottom control circuit to processor immediately, this interrupt identification is eliminated when processor is write arbitrary buffer data;
Bus interface shape of the mouth as one speaks circuit receives data:
After D, switching center unit become the LVDS signal to data transaction, extract the overall process that checking treatment module (25) is finished frame extraction and CRC check through frame;
E, the reception buffering area of the frame signal content write bus type that extracts transmitting-receiving buffering control module (22), read at any time for processor;
F, after receiving buffering area and having write these contents, immediately by the bottom control circuit to interrupt notification processor of processor transmission, this interrupt identification is eliminated when processor is read buffer data.
3, method according to claim 2, it is characterized in that, in the described steps A, processor is the core that the PAD of the destination address of ethernet data frame, source address, length/type field and data and filling is written to transmission buffering control module (22) the dual port RAM circuit storage in the mode of external bus.
4, method according to claim 2 is characterized in that, among the described step B, frame data packing and transmission are handled and comprised:
B1, " lead code/initial code/end code/bell idles " generation submodule (51) successively send lead code and initial code arrives parallel/serial translation circuit submodule (52);
B2, dual port RAM (41) output 4 parallel-by-bit data, one the tunnel outputs to 4B/5B transformation submodule (54) through parallel/serial translation circuit submodule (52) carries out conversion, another road sends to CRC check sign indicating number generation submodule (53) with the form of serial data, generates the CRC check sign indicating number;
B3, the content of dual port RAM (41) read finish after, the CRC check sign indicating number is sent to 4B/5B transformation submodule (54);
After B4, CRC sent and finish, " lead code/initial code/end code/bell idles " generated submodule (51) and sends end code and bell idles, thereby finished the encapsulation process of data;
B5, packaged frame is carried out 4B/5B conversion, parallel/serial conversion and LVDS level conversion, convert the LVDS signal to and send to the switching center unit.
5, method according to claim 2 is characterized in that, among the described step D, provides the frame receiving processing module to finish that frame extracts and the CRC check process comprises:
D1, provide CDR module (71) will become data and the clock signal of 125M from the LVDS signal regeneration that backboard comes;
D2,5 frequency division submodules (72) are provided is the clock signal of 25M with 125M data and the clock signal frequency division that circuit recovers;
D3, provide " frame head/postamble identification " submodule (75) to produce frame signal to begin and the frame signal useful signal;
D4, provide frame to extract submodule (76) to extract Ethernet data frames and lead serial code stream till the CRC check sign indicating number from destination address;
D5, data that step D4 is extracted are by serial/parallel conversion, the 5B/4B conversion;
D6, the data after the step D5 conversion are carried out parallel/serial conversion,, produce the CRC check sign indicating number the input of the serial data after conversion CRC check submodule (74);
D7, the CRC check sign indicating number that step D6 is generated and the check code that receives compare by CRC comparison sub-module (79), and it is 2 byte that comparing result is put into the constant offset amount;
D8, the length that provides frame length counting submodule (710) to calculate the frame that receives, and length data is written to the reception buffer cell.
6, the means of communication according to claim 1 is characterized in that, carry out the frame structure of the The data 100BASE-TX of communication; In the described step 2, when the processor of functional unit had standard ethernet MII interface, the communication step of this functional unit and switching center unit was as follows:
G, processor are sent out interface by MII and are sent the data to frame transmission processing module, and frame sends processing module by the 4B/5B code conversion, and parallel/serial conversion becomes the LVDS signal data with the LVDS level translation with data transaction and sends out;
The data that H, switching center unit send are successively carried out the LVDS level translation, clock and data recovery, and serial/parallel conversion, the 5B/4B code conversion is received interface by MII after the Frame BORDER PROCESSING data is sent to processor.
7, the means of communication according to claim 6 is characterized in that, described step G comprises:
G1, provide 4B/5B transformation submodule (81), will become the 5B coding from 4 parallel-by-bit data conversions of MII interface;
G2, provide parallel/serial transformation submodule (82), the data transaction behind the 5B coding is become the multirate serial data of 125MHz;
G3, provide LVDS level-conversion circuit (83), the serial data that obtains among the step G2 is transformed to the LVDS signal sends to the switching center unit.
8, the means of communication according to claim 6 is characterized in that, described step H comprises:
H1, provide data and the clock of the LVDS signal flow regeneration 125MHz that CDR submodule (91) comes circuit, and produce the CRS signal;
H2, provide 5 frequency division submodules (92) that the line clock frequency division is obtained RX_CL;
H3, provide " frame head/postamble identification " submodule (93) to handle to obtain the RX_DV signal;
H4, provide frame to extract the extraction that submodule (94) carries out complete ether initial code and complete Ether frame;
H5, provide serial/parallel transformation submodule (95) that the 5B of circuit coding is carried out serial/parallel conversion, become the parallel data of 5-BIT width, output to 5B/4B transformation submodule (96) then and carry out the reduction of 4B coding, obtain the RXD3:0 signal of MII interface.
CNB200510058896XA 2005-04-01 2005-04-01 A data communication method inside a device Active CN100393060C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB200510058896XA CN100393060C (en) 2005-04-01 2005-04-01 A data communication method inside a device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB200510058896XA CN100393060C (en) 2005-04-01 2005-04-01 A data communication method inside a device

Publications (2)

Publication Number Publication Date
CN1842045A true CN1842045A (en) 2006-10-04
CN100393060C CN100393060C (en) 2008-06-04

Family

ID=37030894

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB200510058896XA Active CN100393060C (en) 2005-04-01 2005-04-01 A data communication method inside a device

Country Status (1)

Country Link
CN (1) CN100393060C (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101640686B (en) * 2009-08-25 2012-09-26 中兴通讯股份有限公司 Method and device for reusing in-band management interface
CN107257309A (en) * 2017-05-31 2017-10-17 成都希德电子信息技术有限公司 A kind of means of communication of internal identification
CN115004622A (en) * 2020-12-18 2022-09-02 西安诺瓦星云科技股份有限公司 Data processing method and device and data processing system of board card
CN118689825A (en) * 2024-08-23 2024-09-24 北京国科天迅科技股份有限公司 Interface circuits and electronic equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6577689B1 (en) * 1998-04-24 2003-06-10 Cirrus Logic, Inc. Timing recovery system for a 10 BASE-T/100 BASE-T ethernet physical layer line interface
EP1388057A4 (en) * 2001-04-20 2009-07-01 Egenera Inc Virtual networking system and method in a processing system
KR100401193B1 (en) * 2001-05-26 2003-10-10 삼성전자주식회사 Voice over internet protocol gateway and method therefor
CN1435765A (en) * 2002-01-26 2003-08-13 网乐电子科技(深圳)有限公司 Wide-band network audio and video machine and flash memory internal storage starting method thereof
CN100592701C (en) * 2002-09-06 2010-02-24 因芬奈昂技术股份有限公司 Configurable Fast Ethernet and Gigabit Ethernet data ports

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101640686B (en) * 2009-08-25 2012-09-26 中兴通讯股份有限公司 Method and device for reusing in-band management interface
CN107257309A (en) * 2017-05-31 2017-10-17 成都希德电子信息技术有限公司 A kind of means of communication of internal identification
CN115004622A (en) * 2020-12-18 2022-09-02 西安诺瓦星云科技股份有限公司 Data processing method and device and data processing system of board card
CN118689825A (en) * 2024-08-23 2024-09-24 北京国科天迅科技股份有限公司 Interface circuits and electronic equipment

Also Published As

Publication number Publication date
CN100393060C (en) 2008-06-04

Similar Documents

Publication Publication Date Title
US11296807B2 (en) Techniques to operate a time division multiplexing(TDM) media access control (MAC)
CN103916252B (en) High-bandwidth Ethernet IP core based on FPGA
JP3412825B2 (en) Method and apparatus for switching data packets over a data network
CN100416534C (en) Packet combining on PCI express
US20050132089A1 (en) Directly connected low latency network and interface
CN110297797B (en) Heterogeneous protocol conversion device and method
CN105900386A (en) Reliable transmission of Ethernet packet data with line rate and packet data rate matching
CN103077148B (en) A kind of host communication method of Based PC IE and main frame
CN109861931B (en) Storage redundancy system of high-speed Ethernet switching chip
WO2016191990A1 (en) Packet conversion method and device
GB2459838A (en) Encapsulating Ethernet frames for transit through a bridge or router
GB2523046A (en) Method for using FPGA to realize 32-Bit addressing and accessing of SV data
CN103942014A (en) FC-AE-1553 protocol interface card storage mapping device and storage mapping method
CN109710550B (en) Double-cache-based RS422 data communication system with unfixed frame length
CN102316113A (en) POWERLINK and HDLC protocol conversion equipment and realization method thereof
CN103136163A (en) Protocol processor chip capable of allocating and achieving FC-AE-ASM and FC-AV protocol
CN100393060C (en) A data communication method inside a device
WO2022042396A1 (en) Data transmission method and system, and chip
CN103312577B (en) A kind of method and device of processing MAC data
EP2201740B1 (en) High speed packet processing in a wireless network
CN106168933A (en) A kind of method realizing virtual dual-port shared drive based on high-speed serial communication
CN102404207B (en) A kind of processing method and processing device of Ethernet data
US9274586B2 (en) Intelligent memory interface
CN115550104B (en) AXI bus expansion method, device, electronic equipment and storage medium
CN101540656B (en) Decoding device and decoding method used for intermittent balise of CTCS

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: STATE GRID SHANGHAI ELECTRIC POWER COMPANY

Free format text: FORMER OWNER: ZTE CORPORATION

Effective date: 20141211

C41 Transfer of patent application or patent right or utility model
C53 Correction of patent for invention or patent application
CB03 Change of inventor or designer information

Inventor after: Tao Yan

Inventor after: Liu Youyi

Inventor after: Yang Yuanxin

Inventor before: Liu Youyi

Inventor before: Yang Yuanxin

COR Change of bibliographic data

Free format text: CORRECT: INVENTOR; FROM: LIU YOUYI YANG YUANXIN TO: TAO YAN LIU YOUYI YANG YUANXIN

Free format text: CORRECT: ADDRESS; FROM: 518057 SHENZHEN, GUANGDONG PROVINCE TO: 200002 HUANGPU, SHANGHAI

TR01 Transfer of patent right

Effective date of registration: 20141211

Address after: 200002 Nanjing East Road, Shanghai, No. 181, No.

Patentee after: State Grid Shanghai Municipal Electric Power Company

Address before: 518057 Nanshan District science and Technology Industrial Park, Guangdong high tech Industrial Park, ZTE building

Patentee before: ZTE Corporation