Method and system for realizing RapidIO dynamic enumeration process based on Tsi721

文档序号:1875398 发布日期:2021-11-23 浏览:18次 中文

阅读说明:本技术 基于Tsi721的RapidIO动态枚举过程的实现方法及系统 (Method and system for realizing RapidIO dynamic enumeration process based on Tsi721 ) 是由 左颜 李学慧 顾燕飞 于楠 于 2021-07-21 设计创作,主要内容包括:本发明提供一种基于Tsi721的RapidIO动态枚举过程的实现方法及系统,涉及数据通信技术领域,该方法包括:步骤S1:对板内RapidIO接口芯片Tsi721进行初始化,获取0x60寄存器的值,赋值给主枚举设备节点ID;步骤S2:开始动态枚举,并判断该端口的0x158寄存器是否为link连接状态,则判断该link端口所连接的端口设备是RapidIO交换还是RapidIO端点;步骤S3:将找到的级联交换信息保存进结构体并配置路由表;步骤S4:获取操作系统中所有交换芯片的个数,完成动态枚举。本发明能够解决依赖独立RapidIO交换模块进行网络枚举的问题,能够直接在RapidIO节点模块上完成网络枚举与数据收发,使得RapidIO节点之间的数据通信更为便捷,同时降低了整体应用成本。(The invention provides a method and a system for realizing a RapidIO dynamic enumeration process based on Tsi721, which relate to the technical field of data communication and comprise the following steps: step S1: initializing an intra-board RapidIO interface chip Tsi721, acquiring a value of a 0x60 register, and assigning the value to a node ID of a main enumeration device; step S2: starting dynamic enumeration, and judging whether a 0x158 register of the port is in a link connection state, and judging whether a port device connected with the link port is a RapidIO exchange or RapidIO endpoint; step S3: storing the found cascade exchange information into a structural body and configuring a routing table; step S4: and acquiring the number of all the exchange chips in the operating system to complete dynamic enumeration. The invention can solve the problem of network enumeration by depending on an independent RapidIO switching module, can directly complete network enumeration and data receiving and transmitting on the RapidIO node module, enables data communication between RapidIO nodes to be more convenient and fast, and simultaneously reduces the whole application cost.)

1. A method for implementing a RapidIO dynamic enumeration process based on Tsi721 is characterized by comprising the following steps:

step S1: operating an operating system, initializing a RapidIO interface chip Tsi721 in the board, acquiring a value of a 0x60 register, assigning the value to a node ID of a main enumeration device, configuring the node ID of the main enumeration device to a routing table, and adding the main enumeration device to the operating system;

step S2: starting dynamic enumeration, starting from the 0 th port of the 0 th switching chip, firstly judging whether a 0x158 register of the port is in a link connection state, if so, judging whether a port device connected with the link port is a RapidIO switching or RapidIO endpoint, and traversing all ports of all switching chips in sequence;

step S3: in the port traversal process of the switching chip, searching for cascade switching, storing found cascade switching information into a structure body and configuring a routing table;

step S4: after the dynamic enumeration action in step S2, the number of all the switch chips in the operating system is obtained, the port configuration information is obtained, and the port configuration information is stored in the global structure, so that dynamic enumeration is completed.

2. The method of claim 1, wherein the step S2 of determining whether the 0x158 register of the port is in a link connection state comprises:

if the link state is the link state, the port device connected with the link is endowed with an accumulated exchange index number, and a route from the Host node to the port device is added.

3. The method for implementing a RapidIO dynamic enumeration process based on Tsi721 of claim 1, wherein the step S2 of determining whether the device is a RapidIO exchange or a RapidIO endpoint comprises:

if the RapidIO exchange is carried out, firstly, the 0x14 register of the exchange is read, the specific port number connected with the superior device is determined, and then the 0x8 register of the exchange is read.

4. The method for implementing a RapidIO dynamic enumeration process based on Tsi721 as claimed in claim 1, wherein said step S3 specifically includes:

judging whether more than one connection exists between the two exchange chips;

configuring routing tables from all the exchange chips to the newly-found exchange chip and routing tables between the newly-found exchange chip and the master enumeration equipment node;

relabel the 0x8 register of the newly discovered switch chip;

traversing all ports of the newly discovered switching chip, enumerating port endpoint devices and allocating to the node ID of the main enumeration device, and if the ports are cascade switching, recursively calling.

5. The method of claim 1, wherein the step S4 includes:

sequentially scanning the devices connected on the switching chip, and writing all ports of all the switching chips into a 0x15c register for port enabling;

and acquiring the configuration information of all the ports and storing the configuration information in the global structure.

6. The method for implementing a RapidIO dynamic enumeration process based on Tsi721 as claimed in claim 1, wherein said method further comprises:

step S5: and adding a hot plug maintenance process, and performing state polling on all ports of all the switching chips in the operating system every two seconds.

7. The method of claim 6, wherein the step S5 includes:

the current state of the port 0x158 register is compared with the state stored in the port structure last time, and whether the port is pulled out or inserted is determined according to whether the port changes from link to down or from down to link.

8. The method of claim 7, wherein the step S5 further comprises:

judging whether the plugging of an endpoint or the plugging of a switching chip is needed in the process; if the switching chip is pulled out, the port which is switched currently is directly reset;

if the switching chip is inserted, the current switching chip is required to be added to all other switching chips, all RapidIO endpoints and bidirectional routes among the master enumeration equipment nodes;

if the end point is pulled out, the port connected with the end point is directly reset, and if the end point is inserted, the end point is added to a routing table among the other end points.

9. A system for implementing a RapidIO dynamic enumeration process based on Tsi721, comprising:

module M1: operating an operating system, initializing a RapidIO interface chip Tsi721 in the board, acquiring a value of a 0x60 register, assigning the value to a node ID of a main enumeration device, configuring the node ID of the main enumeration device to a routing table, and adding the main enumeration device to the operating system;

module M2: starting dynamic enumeration, starting from the 0 th port of the 0 th exchange chip, firstly judging whether a 0x158 register of the port is in a link connection state, judging whether a port device connected with the link port is a RapidIO (rapid inertial output) exchange or a RapidIO endpoint, and traversing all ports of all the exchange chips in sequence;

module M3: in the port traversal process of the switching chip, searching for cascade switching, storing found cascade switching information into a structure body and configuring a routing table;

module M4: after the dynamic enumeration action in the module M2, the number of all the switch chips in the operating system is obtained, the port configuration information is obtained, and the port configuration information is stored in the global structure body, so that the dynamic enumeration is completed.

10. The system for implementing a RapidIO dynamic enumeration process based on Tsi721 of claim 6, wherein the module M3 specifically comprises:

judging whether more than one connection exists between the two exchange chips;

configuring routing tables from all the exchange chips to the newly-found exchange chip and routing tables between the newly-found exchange chip and the master enumeration equipment node;

relabel the 0x8 register of the newly discovered switch chip;

traversing all ports of the newly discovered switching chip, enumerating port endpoint devices and allocating to the node ID of the main enumeration device, and if the ports are cascade switching, recursively calling.

Technical Field

The invention relates to the technical field of data communication, in particular to a method and a system for realizing a RapidIO dynamic enumeration process based on Tsi 721.

Background

Tsi 721: the bridge is a bridge for converting PCIe into RapidIO, a solution for converting a hardware-based PCIeGen2 to RapidIO 2 protocol is realized in a bridge device, and the interconnection of PCIe and RapidIO is realized. Applications that require significant data transfers without processor involvement may be executed using the effective transfer rates of the block DMA engine and the message engine of Tsi 721.

RapidIO: the Rapid IO technology is an embedded system interconnection international standard (ISO/IEC18372), and mechanical standard specifications such as ATCA, AMC, UTCA, VXS, VPX and the like have introduced the Rapid IO technology as a standard interconnection technology among boards.

The invention patent with publication number CN103347098A discloses a network enumeration method of a RapidIO bus interconnection system, in a system using a RapidIO bus as an interconnection architecture, a connected graph G0(V, E) is constructed and stored as a network template in a host node, V is a vertex set describing network nodes, and each vertex V in the vertex set V comprises a network address and a physical address pre-allocated to each node; in the network enumeration algorithm containing the network enumeration main function and the node setting sub-function, adding a distribution strategy of a network template predefined address, for each newly found network node, taking the network address and the port number of the enumerated port as keywords, searching a matching node in G0 to distribute an address for a new node, and in the network enumeration algorithm, calling the node setting function as the sub-function by the enumeration function.

In a conventional inter-chassis interconnection application, a RapidIO switch module is generally used to perform inter-chassis switching and node enumeration, and an ID is assigned to each node, so as to implement data transmission between nodes. The Rapid IO switch module is a switch module for transmitting data, and has a structure that each port is directly connected to a host and generally operates in a full duplex mode. The exchange module can communicate with a plurality of pairs of ports at the same time to transmit data without conflict.

Network enumeration of the RapidIO switching module is to realize enumeration of other devices in the network through a master device in the RapidIO network, and complete the configuration process of the whole network. The master device judges the state of the port device by analyzing the link state of each port of the switch, traverses the entire RapidIO network, initializes and allocates device IDs for each device, and establishes a routing table for data transmission.

The routing and switching of RapidIO is achieved by the ID number of each end device. Each terminal is assigned a unique ID number, and when a data packet is transmitted from a terminal, the header thereof contains the ID number of the destination terminal and the ID number of the transmission source terminal. Each switch has a switch routing table on each of its ports from which it can determine which port the packet is sent. The routing table for each port needs to be configured at system initialization, which is not very flexible and intelligent compared to ethernet, but which makes the routing implementation of the system very simple. In the prior art, data communication between RapidIO nodes is not convenient enough, and the overall application cost is high.

Disclosure of Invention

Aiming at the defects in the prior art, the invention provides a method and a system for realizing a RapidIO dynamic enumeration process based on Tsi 721.

According to the method and the system for realizing the RapidIO dynamic enumeration process based on the Tsi721, the scheme is as follows:

in a first aspect, a method for implementing a RapidIO dynamic enumeration process based on Tsi721 is provided, where the method includes:

step S1: operating an operating system, initializing a RapidIO interface chip Tsi721 in the board, acquiring a value of a 0x60 register, assigning the value to a node ID of a main enumeration device, configuring the node ID of the main enumeration device to a routing table, and adding the main enumeration device to the operating system;

step S2: starting dynamic enumeration, starting from the 0 th port of the 0 th exchange chip, firstly judging whether a 0x158 register of the port is in a link connection state, judging whether a port device connected with the link port is a RapidIO (rapid inertial output) exchange or a RapidIO endpoint, and traversing all ports of all the exchange chips in sequence;

step S3: in the port traversal process of the switching chip, searching for cascade switching, storing found cascade switching information into a structure body and configuring a routing table;

step S4: after the dynamic enumeration action in step S2, the number of all the switch chips in the operating system is obtained, the port configuration information is obtained, and the port configuration information is stored in the global structure, so that dynamic enumeration is completed.

Preferably, the step S2 of determining whether the 0x158 register of the port is in the link connection state includes:

if the link state is the link state, the port device connected with the link is endowed with an accumulated exchange index number, and a route from the Host node to the port device is added.

Preferably, the step S2 of determining whether the device is a RapidIO exchange or a RapidIO endpoint includes:

if the RapidIO exchange is carried out, firstly, the 0x14 register of the exchange is read, the specific port number connected with the superior device is determined, and then the 0x8 register of the exchange is read.

Preferably, the step S3 specifically includes:

judging whether more than one connection exists between the two exchange chips;

configuring routing tables from all the exchange chips to the newly-found exchange chip and routing tables between the newly-found exchange chip and the master enumeration equipment node;

relabel the 0x8 register of the newly discovered switch chip;

traversing all ports of the newly discovered switching chip, enumerating port endpoint devices and allocating to the node ID of the main enumeration device, and if the ports are cascade switching, recursively calling.

Preferably, the step S4 includes:

sequentially scanning the devices connected on the switching chip, and writing all ports of all the switching chips into a 0x15c register for port enabling;

and acquiring the configuration information of all the ports and storing the configuration information in the global structure.

Preferably, the method further comprises:

step S5: and adding a hot plug maintenance process, and performing state polling on all ports of all the switching chips in the operating system every two seconds.

Preferably, the step S5 includes:

the current state of the port 0x158 register is compared with the state stored in the port structure last time, and whether the port is pulled out or inserted is determined according to whether the port changes from link to down or from down to link.

Preferably, the step S5 further includes:

judging whether the plugging of an endpoint or the plugging of a switching chip is needed in the process; if the switching chip is pulled out, the port which is switched currently is directly reset;

if the switching chip is inserted, the current switching chip is required to be added to all other switching chips, all RapidIO endpoints and bidirectional routes among the master enumeration equipment nodes;

if the end point is pulled out, the port connected with the end point is directly reset, and if the end point is inserted, the end point is added to a routing table among the other end points.

In a second aspect, a system for implementing a RapidIO dynamic enumeration process based on Tsi721 is provided, where the system includes:

module M1: operating an operating system, initializing a RapidIO interface chip Tsi721 in the board, acquiring a value of a 0x60 register, assigning the value to a node ID of a main enumeration device, configuring the node ID of the main enumeration device to a routing table, and adding the main enumeration device to the operating system;

module M2: starting dynamic enumeration, starting from the 0 th port of the 0 th exchange chip, firstly judging whether a 0x158 register of the port is in a link connection state, judging whether a port device connected with the link port is a RapidIO (rapid inertial output) exchange or a RapidIO endpoint, and traversing all ports of all the exchange chips in sequence;

module M3: in the port traversal process of the switching chip, searching for cascade switching, storing found cascade switching information into a structure body and configuring a routing table;

module M4: after the dynamic enumeration action in the module M2, the number of all the switch chips in the operating system is obtained, the port configuration information is obtained, and the port configuration information is stored in the global structure body, so that the dynamic enumeration is completed.

Preferably, the module M3 specifically includes:

judging whether more than one connection exists between the two exchange chips;

configuring routing tables from all the exchange chips to the newly-found exchange chip and routing tables between the newly-found exchange chip and the master enumeration equipment node;

relabel the 0x8 register of the newly discovered switch chip;

traversing all ports of the newly discovered switching chip, enumerating port endpoint devices and allocating to the node ID of the main enumeration device, and if the ports are cascade switching, recursively calling.

Compared with the prior art, the invention has the following beneficial effects:

1. the invention solves the problem of network enumeration by relying on an independent RapidIO switching module, and can directly complete network enumeration and data receiving and transmitting on the RapidIO node module, so that the data communication between RapidIO nodes is more convenient;

2. the invention also reduces the overall application cost.

Drawings

Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments with reference to the following drawings:

FIG. 1 is a schematic block diagram of a specific design of the present invention;

FIG. 2 is a flow chart of RapidIO dynamic enumeration based on Tsi 721.

Detailed Description

The present invention will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the invention, but are not intended to limit the invention in any way. It should be noted that it would be obvious to those skilled in the art that various changes and modifications can be made without departing from the spirit of the invention. All falling within the scope of the present invention.

The embodiment of the invention provides a method for realizing a RapidIO dynamic enumeration process based on Tsi721, and the interconnection of SRIO interfaces is realized by adopting a 1-chip SRIO switch (CPS 1848). CPS1848 supports a 12-way x4 SRIO interface, with 2 ways interconnected with each DSP and 6 ways accessed to the VPX bus. The Rapid IO design communication rate of the invention is 5GHz, the maximum line rate is 20Gbps, and the transmission of target data can be fully satisfied. Referring to fig. 1, the method includes:

step S1: operating an operating system, initializing a RapidIO interface chip Tsi721 in the board, acquiring a value of a 0x60 register, assigning to a main enumeration device node (Host) ID, configuring the main enumeration device node ID to a routing table, and adding the main enumeration device to the operating system, including adding to the routing table.

Step S2: starting dynamic enumeration, referring to fig. 2, starting from the 0 th port of the 0 th switching chip, first determining whether the 0x158 register of the port is in a link connection state, if so, assigning an accumulated exchange index number to the port device connected by the link, and adding a route from the Host node to the port device.

Then judging whether the port equipment is a RapidIO exchange or a RapidIO endpoint, if the port equipment is the RapidIO exchange, firstly reading a 0x14 register of the exchange, determining a specific port number connected with the superior equipment, and then reading a 0x8 register of the exchange; and traversing all ports of all the switching chips in sequence.

Step S3: and then storing the found cascade exchange information into a structural body and configuring a route. In this step, it is necessary to determine whether there is more than one connection between two switching chips, and then configure the routes from all switching chips to the newly discovered switching chip and the route between the newly discovered switching chip and the master enumeration device node (Host); and the 0x8 register of the newly discovered switch chip is relabeled to avoid a situation of repeated traversal. All ports of the newly discovered switch chip are then traversed, port endpoint devices are enumerated and assigned IDs, and the call is recursively invoked if the ports are cascaded switches.

Step S4: after the dynamic enumeration action, acquiring the number of all the switch chips in the operating system, sequentially scanning the devices connected on the switch chips, and writing all the ports of all the switch chips into a 0x15c register to perform port enabling; configuration information such as quadrant, lane, and rate of all ports is then obtained and stored in the global fabric.

To this end, the RapidIO dynamic enumeration process based on Tsi721 has been completed. To facilitate the status monitoring and maintenance of all switching devices and endpoint devices in the system, a step S5 is added at the end, that is:

step S5: and adding a hot plug maintenance process, and performing state polling on all ports of all the switching chips in the operating system every two seconds.

The current state of the port 0x158 register is compared with the state stored in the port structure last time, and whether the port is pulled out or inserted is determined according to whether the port changes from link to down or from down to link.

Judging whether the plugging of an endpoint or the plugging of a switching chip is needed in the process; if the switching chip is pulled out, the port which is switched currently is directly reset;

if the switching chip is inserted, the current switching chip is required to be added to all other switching chips, all RapidIO endpoints and bidirectional routes among the master enumeration equipment nodes;

if the end point is pulled out, the port connected with the end point is directly reset, and if the end point is inserted, the end point is added to a routing table among the other end points.

The embodiment of the invention provides a realization method of a RapidIO dynamic enumeration process based on Ts i721, which is based on a calculation module of a Feiteng 1500A-16 domestic CPU, realizes enumeration processes of RapidIO exchange and end points outside a board through an onboard RapidIO interface chip Tsi721 and a RapidIO exchange chip CPS1848, initializes and distributes equipment IDs for each equipment, and establishes a routing table of data transmission. Compared with RapidIO information interaction between modules in a traditional case, the RapidIO information interaction method is different in that an independent RapidIO exchange module is not needed to complete enumeration of other devices in the network and route configuration of the whole network. The invention solves the problem of network enumeration by relying on an independent RapidIO switching module, and can directly complete network enumeration and data receiving and transmitting on the RapidIO node module, so that the data communication between RapidIO nodes is more convenient; and simultaneously, the overall application cost is reduced.

Those skilled in the art will appreciate that, in addition to implementing the system and its various devices, modules, units provided by the present invention as pure computer readable program code, the system and its various devices, modules, units provided by the present invention can be fully implemented by logically programming method steps in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Therefore, the system and various devices, modules and units thereof provided by the invention can be regarded as a hardware component, and the devices, modules and units included in the system for realizing various functions can also be regarded as structures in the hardware component; means, modules, units for performing the various functions may also be regarded as structures within both software modules and hardware components for performing the method.

The foregoing description of specific embodiments of the present invention has been presented. It is to be understood that the present invention is not limited to the specific embodiments described above, and that various changes or modifications may be made by one skilled in the art within the scope of the appended claims without departing from the spirit of the invention. The embodiments and features of the embodiments of the present application may be combined with each other arbitrarily without conflict.

9页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于单片机的低功耗安全防护控制装置及算法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!