CN115714637A - Message transmission device and method based on SRIO time division multiplexing and demultiplexing - Google Patents
Message transmission device and method based on SRIO time division multiplexing and demultiplexing Download PDFInfo
- Publication number
- CN115714637A CN115714637A CN202211111783.1A CN202211111783A CN115714637A CN 115714637 A CN115714637 A CN 115714637A CN 202211111783 A CN202211111783 A CN 202211111783A CN 115714637 A CN115714637 A CN 115714637A
- Authority
- CN
- China
- Prior art keywords
- srio
- division multiplexing
- demultiplexing
- time division
- channel
- 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.)
- Pending
Links
Images
Landscapes
- Time-Division Multiplex Systems (AREA)
Abstract
Description
技术领域technical field
本发明涉及高速数据通信技术领域,具体为一种基于SRIO分时复用和解复用的报文传输装置及方法。The invention relates to the technical field of high-speed data communication, in particular to a message transmission device and method based on SRIO time division multiplexing and demultiplexing.
背景技术Background technique
在高速数据通信领域,SRIO(Serial Rapid IO)总线技术成为常用的高速控制总线,能够支持芯片间和板间通信,在通信系统中的应用越来越多。In the field of high-speed data communication, SRIO (Serial Rapid IO) bus technology has become a commonly used high-speed control bus, which can support inter-chip and inter-board communication, and is increasingly used in communication systems.
随着通信技术及嵌入式系统的发展,现有的通信传输系统在FPGA方案设计中的SRIO链路部分,一个SRIO链路往往需要:1、传输实时性要求高、数据量大的多业务通道;2、传输可靠性要求高、数据量小的多控制通道;3、保证各功能能够同时进行,互不干扰。在多通道SRIO总线的环境下,如果采用CS(Chip Select)片选的方式,则每次只能选择一路SRIO总线,如果需要多路SRIO总线同时传输报文时,那么在片选时会冲突,出现大量丢包的现象,无法实现多路SRIO总线同时传输,不满足使用需求。With the development of communication technology and embedded systems, in the SRIO link part of the FPGA solution design of the existing communication transmission system, an SRIO link often needs: 1. Transmission of multi-service channels with high real-time requirements and large data volume ; 2. Multi-control channels with high transmission reliability requirements and small data volume; 3. Ensure that various functions can be performed simultaneously without interfering with each other. In a multi-channel SRIO bus environment, if CS (Chip Select) is used, only one SRIO bus can be selected each time. If multiple SRIO buses are required to transmit messages at the same time, there will be conflicts during chip selection. , a large number of packet loss occurs, and simultaneous transmission of multiple SRIO buses cannot be realized, which does not meet the use requirements.
发明内容Contents of the invention
本发明的目的在于提供一种基于SRIO分时复用和解复用的报文传输装置及方法,以解决上述背景技术中提出的问题。The object of the present invention is to provide a message transmission device and method based on SRIO time-division multiplexing and demultiplexing, so as to solve the problems raised in the above-mentioned background technology.
为了解决上述技术问题,本发明提供如下技术方案:In order to solve the above technical problems, the present invention provides the following technical solutions:
一种基于SRIO分时复用和解复用的报文传输装置,所述装置采用装有FPGA芯片的两个单板电路来实现;A message transmission device based on SRIO time-division multiplexing and demultiplexing, said device is realized by two single-board circuits equipped with FPGA chips;
所述装置的输入通道总路数为L,业务通道路数为n,控制通道路数为m;The total number of input channels of the device is L, the number of service channels is n, and the number of control channels is m;
所述FPGA芯片包括本端芯片FPGA1和对端芯片FPGA2,所述本端芯片FPGA1和所述对端芯片FPGA2内部的结构是相同的,内部连接方式是相同的,放置方向是相反的;所述本端芯片FPGA1与n路业务通道和m路控制通道相连接;所述对端芯片FPGA2与所述本端芯片FPGA1相连接;Described FPGA chip comprises this end chip FPGA1 and opposite end chip FPGA2, and described local end chip FPGA1 and described opposite end chip FPGA2 internal structure are identical, and internal connection mode is identical, and placement direction is opposite; The local chip FPGA1 is connected to the n-way service channel and the m-way control channel; the opposite-end chip FPGA2 is connected to the local-end chip FPGA1;
所述本端芯片FPGA1包括分时复用模块MUX、SRIO发送模块SRIO_TX、SRIO接收模块SRIO_RX和解复用模块DEMUX;Described local chip FPGA1 comprises time-division multiplexing module MUX, SRIO sending module SRIO_TX, SRIO receiving module SRIO_RX and demultiplexing module DEMUX;
所述本端芯片FPGA1的分时复用模块MUX的输出端与所述本端芯片FPGA1的SRIO发送模块SRIO_TX的输入端相连接;所述本端芯片FPGA1的SRIO发送模块SRIO_TX的输出端与所述对端芯片FPGA2的SRIO接收模块SRIO_RX的输入端相连接;所述对端芯片FPGA2的SRIO接收模块SRIO_RX的输出端与所述对端芯片FPGA2的解复用模块DEMUX的输入端相连接;所述对端芯片FPGA2的解复用模块DEMUX的输出端与所述对端芯片FPGA2的分时复用模块MUX的输入端相连接;所述对端芯片FPGA2的分时复用模块MUX的输出端与所述对端芯片FPGA2的SRIO发送模块SRIO_TX的输入端相连接;所述对端芯片FPGA2的SRIO发送模块SRIO_TX的输出端与所述本端芯片FPGA1的SRIO接收模块SRIO_RX的输入端相连接;所述本端芯片FPGA1的SRIO接收模块SRIO_RX的输出端与所述本端芯片FPGA1的解复用模块DEMUX的输入端相连接。The output of the time-division multiplexing module MUX of the local chip FPGA1 is connected with the input of the SRIO transmission module SRIO_TX of the local chip FPGA1; the output of the SRIO transmission module SRIO_TX of the local chip FPGA1 is connected with the The input of the SRIO receiving module SRIO_RX of the opposite chip FPGA2 is connected; the output of the SRIO receiving module SRIO_RX of the opposite chip FPGA2 is connected with the input of the demultiplexing module DEMUX of the opposite chip FPGA2; The output end of the demultiplexing module DEMUX of the opposite end chip FPGA2 is connected with the input end of the time division multiplexing module MUX of the opposite end chip FPGA2; the output end of the time division multiplexing module MUX of the opposite end chip FPGA2 Be connected with the input end of the SRIO sending module SRIO_TX of described opposite end chip FPGA2; The output end of the SRIO sending module SRIO_TX of described opposite end chip FPGA2 is connected with the input end of the SRIO receiving module SRIO_RX of described local end chip FPGA1; The output terminal of the SRIO receiving module SRIO_RX of the local chip FPGA1 is connected to the input terminal of the demultiplexing module DEMUX of the local chip FPGA1.
根据上述技术方案,所述分时复用模块MUX包括缓存单元、拆包单元、寄存单元、写时钟、读时钟和轮询单元;According to the above technical solution, the time-division multiplexing module MUX includes a cache unit, an unpacking unit, a register unit, a write clock, a read clock and a polling unit;
所述缓存单元用于将L路输入通道输入进来的SRIO接口数据送入FIFO存储器进行缓存以及对两个异步FIFO存储器进行乒乓缓存;The buffer unit is used to send the SRIO interface data input by the L-way input channel into the FIFO memory for buffering and perform ping-pong buffering for two asynchronous FIFO memories;
所述拆包单元用于对L路输入通道输入进来的SRIO接口数据中的n路业务通道数据进行拆包;The unpacking unit is used to unpack the n-way service channel data in the SRIO interface data input by the L-way input channel;
所述寄存单元用于将各L路输入通道对应FIFO存储器的写完成标志wr_done_flag从右到左依次存入写完成标志寄存器wr_done_reg中;The register unit is used to store the write completion flag wr_done_flag corresponding to the FIFO memory of each L input channel into the write completion flag register wr_done_reg from right to left;
所述写时钟是各L路输入通道对应的速率;The write clock is the rate corresponding to each L input channel;
所述读时钟是SRIO的用户时钟log_clk;The read clock is the user clock log_clk of SRIO;
所述轮询单元用于用轮询计数器轮询是否有通道的写完成标志wr_done_flag有效,当出现两个及以上通道的写完成标志wr_done_flag有效时,开启优先级动态调整方式。The polling unit is used to use the polling counter to poll whether the write completion flag wr_done_flag of the channel is valid, and when there are two or more channels with the write completion flag wr_done_flag valid, the priority dynamic adjustment mode is started.
根据上述技术方案,所述SRIO发送模块SRIO_TX包括组包单元和发送单元;According to the above technical solution, the SRIO sending module SRIO_TX includes a grouping unit and a sending unit;
所述组包单元用于完成对SRIO接口协议的组包;The grouping unit is used to complete the grouping of the SRIO interface protocol;
所述发送单元用于发送时序设计,并将分时复用信号srio_mux发送到对端芯片FPGA2中。The sending unit is used to send the timing design, and send the time-division multiplexing signal srio_mux to the peer chip FPGA2.
根据上述技术方案,所述SRIO接收模块SRIO_RX包括解析单元和传送单元;According to the above technical solution, the SRIO receiving module SRIO_RX includes an analysis unit and a transmission unit;
所述解析单元用于解析对端芯片FPGA2内部SRIO发送的分时复用信号srio_mux“’;The analysis unit is used to analyze the time-division multiplexing signal srio_mux "' sent by the internal SRIO of the opposite chip FPGA2;
所述传送单元用于将解析后的分时复用信号srio_mux“’传送入解复用模块。The transmitting unit is used to transmit the analyzed time-division multiplexing signal srio_mux"' to the demultiplexing module.
根据上述技术方案,所述解复用模块DEMUX包括识别单元、选择单元、写时钟、读时钟和解复用单元;According to the above technical solution, the demultiplexing module DEMUX includes an identification unit, a selection unit, a writing clock, a reading clock and a demultiplexing unit;
所述识别单元用于根据SRIO协议帧头识别通道号;The identification unit is used to identify the channel number according to the frame header of the SRIO protocol;
所述选择单元用于根据通道号选择对应的异步双口ram存储;The selection unit is used to select the corresponding asynchronous dual-port ram storage according to the channel number;
所述写时钟对应分时复用模块的读时钟log_clk;The write clock corresponds to the read clock log_clk of the time-division multiplexing module;
所述读时钟是各L路输入通道对应的速率;The read clock is the rate corresponding to each L input channel;
解复用单元用于完成从1路到L路的解复用,还原L路SRIO接口数据。The demultiplexing unit is used to complete demultiplexing from
一种基于SRIO分时复用和解复用的报文传输方法,所述方法的步骤包括:A kind of message transmission method based on SRIO time-division multiplexing and demultiplexing, the step of described method comprises:
S1:将L路输入通道输入进来的SRIO接口数据送入FIFO存储器进行缓存以及对两个异步FIFO存储器进行乒乓缓存,对L路输入通道输入进来的SRIO接口数据中的n路业务通道数据进行拆包;S1: Send the SRIO interface data input from the L-channel input channel into the FIFO memory for buffering and perform ping-pong buffering on two asynchronous FIFO memories, and disassemble the n-channel service channel data in the SRIO interface data input from the L-channel input channel Bag;
S2:将各L路输入通道对应FIFO存储器的写完成标志wr_done_flag从右到左依次存入写完成标志寄存器wr_done_reg中,利用轮询计数器cnt1对各L路输入通道对应FIFO存储器的写完成标志进行轮询和优先级动态调整;S2: the write completion flag wr_done_flag corresponding to the FIFO memory of each L road input channel is stored in the write completion flag register wr_done_reg from right to left, and the write completion flag of each L road input channel corresponding to the FIFO memory is polled by using the polling counter cnt1 query and priority dynamic adjustment;
S3:完成与对端的SRIO接口协议交互,即将分时复用模块MUX输出的复用信号srio_mux送入SRIO发送模块SRIO_TX,完成组包和时序设计后并转串成高速数据流txp/n后,送入对端芯片FPGA2的SRIO接口,对端处理完成后发送至本端芯片FPGA1的SRIO接收模块SRIO_RX,本端接收高速数据流rxp/n后,通过串转并和解析将其转换成SRIO接口的总线数据;S3: Complete the SRIO interface protocol interaction with the opposite end, that is, send the multiplexing signal srio_mux output by the time-division multiplexing module MUX to the SRIO transmission module SRIO_TX, complete the grouping and timing design and convert it into a high-speed data stream txp/n, Send it to the SRIO interface of the peer chip FPGA2, and send it to the SRIO receiving module SRIO_RX of the local chip FPGA1 after the peer processing is completed. After the local end receives the high-speed data stream rxp/n, it converts it into an SRIO interface through serial conversion and parsing bus data;
S4:对SRIO总线数据进行解复用,即将srio_demux数据送入解复用模块DEMUX,根据协议帧头识别通道号,根据通道号选择对应的异步双口ram存储,完成1路到L路的解复用,还原L路SRIO接口数据。S4: Demultiplex the SRIO bus data, send the srio_demux data to the demultiplexing module DEMUX, identify the channel number according to the protocol frame header, select the corresponding asynchronous dual-port ram storage according to the channel number, and complete the demultiplexing from
根据上述技术方案,在步骤S1中,所述L路输入通道包括n路业务通道和m路控制通道;According to the above technical solution, in step S1, the L input channels include n service channels and m control channels;
对L路输入通道中的n路业务通道数据进行拆包,设置一包的比特数为c比特;Unpack the data of the n-way business channels in the L-way input channels, and set the number of bits in one package to c bits;
一包的比特数可根据需求自定义,但是为了保证此类型数据的实时性,一般取值在200比特以内。The number of bits in a packet can be customized according to requirements, but in order to ensure the real-time performance of this type of data, the value is generally within 200 bits.
所述各n路业务通道比特流按小包依次在对应的两个FIFO存储器中来回缓存。The bit streams of the n service channels are sequentially buffered back and forth in the corresponding two FIFO memories according to small packets.
根据上述技术方案,在步骤S2中,所述轮询计数器cnt1根据当时轮询计数器cnt1的值来确定和累加选择读取数据的通道,并且轮询计数器cnt1轮询到两个及以上通道的写完成标志wr_done_flag有效时,开启优先级动态调整方式。According to the above technical solution, in step S2, the polling counter cnt1 determines and accumulates the channel for selecting the read data according to the value of the polling counter cnt1 at that time, and the polling counter cnt1 polls the write data of two or more channels When the completion flag wr_done_flag is valid, the priority dynamic adjustment method is enabled.
根据上述技术方案,所述分时复用模块MUX的状态机的状态流程图的具体表现为:According to the technique scheme, the specific performance of the state flow diagram of the state machine of the time-division multiplexing module MUX is as follows:
状态1:初始状态,开始时对轮询计数器cnt1和等待计数器cnt2等信号进行复位;当轮询计数器cnt1检测到写完成标志寄存器wr_done_reg有效时,触发进入状态2,若写完成标志寄存器wr_done_reg无效,则一直在状态1循环;State 1: initial state, reset the polling counter cnt1 and waiting counter cnt2 and other signals at the beginning; when the polling counter cnt1 detects that the write completion flag register wr_done_reg is valid, it triggers to enter state 2, if the write completion flag register wr_done_reg is invalid, Then it keeps looping in
状态2:轮询状态,对各通道的写完成标志进行轮询;轮询方式为优先级动态调整,根据当时轮询计数器cnt1的值确定优先级,轮询计数器cnt1从0开始循环计数,计数范围为0~p,当检测到写完成标志寄存器wr_done_reg[cnt1]有效时,轮询结束,轮询计数器cnt1停止计数,触发进入到状态3,若写完成标志寄存器wr_done_reg[cnt1]无效,则一直在状态2循环;State 2: polling state, polling the writing completion flag of each channel; the polling method is dynamic adjustment of priority, and the priority is determined according to the value of the polling counter cnt1 at that time, and the polling counter cnt1 starts counting from 0, counting The range is 0 to p. When it is detected that the write completion flag register wr_done_reg[cnt1] is valid, the polling ends, the polling counter cnt1 stops counting, and the trigger enters state 3. If the write completion flag register wr_done_reg[cnt1] is invalid, the Loop in state 2;
状态3:等待状态,等待计数器cnt2从0开始循环计数,计数范围为0~q,同时根据分时复用的接口协议添加各通道的帧头,长度为1字节,当检测到cnt2为q时,触发进入到状态4,若cnt2小于q,则一直在状态3循环;State 3: Waiting state, the waiting counter cnt2 counts cyclically from 0, and the counting range is 0~q. At the same time, the frame header of each channel is added according to the interface protocol of time-division multiplexing, and the length is 1 byte. When cnt2 is detected as q , the trigger enters state 4, and if cnt2 is less than q, it keeps looping in state 3;
状态4:读取状态,将对应通道FIFO存储器的读使能rd[cnt1]拉高,读至FIFO空标志empty[cnt1]有效时,触发回到状态1,进入下一次轮询操作,否则一直在状态4循环。State 4: Read the state, pull the read enable rd[cnt1] of the FIFO memory of the corresponding channel high, read until the FIFO empty flag empty[cnt1] is valid, trigger back to
根据上述技术方案,在步骤S3中,所述其中SRIO接口协议包括发起请求ireq、发起响应iresp、目标请求treq、目标响应tresp。According to the above technical solution, in step S3, the SRIO interface protocol includes an initiation request ireq, an initiation response iresp, a target request treq, and a target response tresp.
与现有技术相比,本发明所达到的有益效果是:Compared with the prior art, the beneficial effects achieved by the present invention are:
(1)本发明解决了传统CS片选方式无法在同一时间传输多路SRIO总线的难题,通过“提速+轮询+优先级动态调整”的方式,提出分时复用和解复用的完整解决方案,此方案在节省SRIO接口资源的前提下,能够解决CS片选通道冲突及大量丢包的问题,同时保证了各业务通道数据的实时性和各控制通道数据的可靠性;(1) The present invention solves the problem that the traditional CS chip selection method cannot transmit multiple SRIO buses at the same time, and proposes a complete solution for time-division multiplexing and demultiplexing by means of "speed up + polling + dynamic priority adjustment" Solution, under the premise of saving SRIO interface resources, this solution can solve the problem of CS chip selection channel conflict and a large number of packet loss, and at the same time ensure the real-time data of each service channel and the reliability of data of each control channel;
(2)本发明设计的分时复用模块MUX和解复用模块DEMUX内部均配置了L路spi总线通道,支持n+m的灵活配置,只需要满足n+m<=L即可,其中n优选数据量大、实时性要求高的业务数据类型,m优选数据量小、可靠性要求高的控制数据类型。(2) The time-division multiplexing module MUX of the present invention's design and the demultiplexing module DEMUX are all equipped with L road spi bus channels inside, support the flexible configuration of n+m, only need to satisfy n+m<=L and get final product, wherein n Business data types with large data volume and high real-time requirements are preferred, and control data types with small data volume and high reliability requirements are preferred.
附图说明Description of drawings
附图用来提供对本发明的进一步理解,并且构成说明书的一部分,与本发明的实施例一起用于解释本发明,并不构成对本发明的限制。在附图中:The accompanying drawings are used to provide a further understanding of the present invention, and constitute a part of the description, and are used together with the embodiments of the present invention to explain the present invention, and do not constitute a limitation to the present invention. In the attached picture:
图1是本发明一种基于SRIO分时复用和解复用的报文传输装置及方法的架构图;Fig. 1 is a structure diagram of a message transmission device and method based on SRIO time-division multiplexing and demultiplexing in the present invention;
图2是本发明分时复用模块MUX的状态流程图;Fig. 2 is the state flowchart of time-division multiplexing module MUX of the present invention;
图3是本发明本地SRIO与对端SRIO协议交互框图;Fig. 3 is the interaction block diagram of local SRIO and opposite end SRIO protocol of the present invention;
图4是本发明一种基于SRIO分时复用和解复用的报文传输装置及方法的流程图。FIG. 4 is a flowchart of a message transmission device and method based on SRIO time-division multiplexing and demultiplexing in the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
请参阅图1-图4,本发明提供技术方案:Please refer to Fig. 1-Fig. 4, the present invention provides technical scheme:
一种基于SRIO分时复用和解复用的报文传输装置,所述装置采用装有FPGA芯片的两个单板电路来实现;A message transmission device based on SRIO time-division multiplexing and demultiplexing, said device is realized by two single-board circuits equipped with FPGA chips;
所述装置的输入通道总路数为L,业务通道路数为n,控制通道路数为m;The total number of input channels of the device is L, the number of service channels is n, and the number of control channels is m;
所述FPGA芯片包括本端芯片FPGA1和对端芯片FPGA2,所述本端芯片FPGA1和所述对端芯片FPGA2内部的结构是相同的,内部连接方式是相同的,放置方向是相反的;所述本端芯片FPGA1与n路业务通道和m路控制通道相连接;所述对端芯片FPGA2与所述本端芯片FPGA1相连接;Described FPGA chip comprises this end chip FPGA1 and opposite end chip FPGA2, and described local end chip FPGA1 and described opposite end chip FPGA2 internal structure are identical, and internal connection mode is identical, and placement direction is opposite; The local chip FPGA1 is connected to the n-way service channel and the m-way control channel; the opposite-end chip FPGA2 is connected to the local-end chip FPGA1;
所述本端芯片FPGA1包括分时复用模块MUX、SRIO发送模块SRIO_TX、SRIO接收模块SRIO_RX和解复用模块DEMUX;Described local chip FPGA1 comprises time-division multiplexing module MUX, SRIO sending module SRIO_TX, SRIO receiving module SRIO_RX and demultiplexing module DEMUX;
所述本端芯片FPGA1的分时复用模块MUX的输出端与所述本端芯片FPGA1的SRIO发送模块SRIO_TX的输入端相连接;所述本端芯片FPGA1的SRIO发送模块SRIO_TX的输出端与所述对端芯片FPGA2的SRIO接收模块SRIO_RX的输入端相连接;所述对端芯片FPGA2的SRIO接收模块SRIO_RX的输出端与所述对端芯片FPGA2的解复用模块DEMUX的输入端相连接;所述对端芯片FPGA2的解复用模块DEMUX的输出端与所述对端芯片FPGA2的分时复用模块MUX的输入端相连接;所述对端芯片FPGA2的分时复用模块MUX的输出端与所述对端芯片FPGA2的SRIO发送模块SRIO_TX的输入端相连接;所述对端芯片FPGA2的SRIO发送模块SRIO_TX的输出端与所述本端芯片FPGA1的SRIO接收模块SRIO_RX的输入端相连接;所述本端芯片FPGA1的SRIO接收模块SRIO_RX的输出端与所述本端芯片FPGA1的解复用模块DEMUX的输入端相连接。The output of the time-division multiplexing module MUX of the local chip FPGA1 is connected with the input of the SRIO transmission module SRIO_TX of the local chip FPGA1; the output of the SRIO transmission module SRIO_TX of the local chip FPGA1 is connected with the The input of the SRIO receiving module SRIO_RX of the opposite chip FPGA2 is connected; the output of the SRIO receiving module SRIO_RX of the opposite chip FPGA2 is connected with the input of the demultiplexing module DEMUX of the opposite chip FPGA2; The output end of the demultiplexing module DEMUX of the opposite end chip FPGA2 is connected with the input end of the time division multiplexing module MUX of the opposite end chip FPGA2; the output end of the time division multiplexing module MUX of the opposite end chip FPGA2 Be connected with the input end of the SRIO sending module SRIO_TX of described opposite end chip FPGA2; The output end of the SRIO sending module SRIO_TX of described opposite end chip FPGA2 is connected with the input end of the SRIO receiving module SRIO_RX of described local end chip FPGA1; The output terminal of the SRIO receiving module SRIO_RX of the local chip FPGA1 is connected to the input terminal of the demultiplexing module DEMUX of the local chip FPGA1.
根据上述技术方案,所述分时复用模块MUX包括缓存单元、拆包单元、寄存单元、写时钟、读时钟和轮询单元;According to the above technical solution, the time-division multiplexing module MUX includes a cache unit, an unpacking unit, a register unit, a write clock, a read clock and a polling unit;
所述缓存单元用于将L路输入通道输入进来的SRIO接口数据送入FIFO存储器进行缓存以及对两个异步FIFO存储器进行乒乓缓存;The buffer unit is used to send the SRIO interface data input by the L-way input channel into the FIFO memory for buffering and perform ping-pong buffering for two asynchronous FIFO memories;
所述拆包单元用于对L路输入通道输入进来的SRIO接口数据中的n路业务通道数据进行拆包;The unpacking unit is used to unpack the n-way service channel data in the SRIO interface data input by the L-way input channel;
所述寄存单元用于将各L路输入通道对应FIFO存储器的写完成标志wr_done_flag从右到左依次存入写完成标志寄存器wr_done_reg中;The register unit is used to store the write completion flag wr_done_flag corresponding to the FIFO memory of each L input channel into the write completion flag register wr_done_reg from right to left;
所述写时钟是各L路输入通道对应的速率;The write clock is the rate corresponding to each L input channel;
所述读时钟是SRIO的用户时钟log_clk;The read clock is the user clock log_clk of SRIO;
所述轮询单元用于用轮询计数器轮询是否有通道的写完成标志wr_done_flag有效,当出现两个及以上通道的写完成标志wr_done_flag有效时,开启优先级动态调整方式。The polling unit is used to use the polling counter to poll whether the write completion flag wr_done_flag of the channel is valid, and when there are two or more channels with the write completion flag wr_done_flag valid, the priority dynamic adjustment mode is started.
根据上述技术方案,所述SRIO发送模块SRIO_TX包括组包单元和发送单元;According to the above technical solution, the SRIO sending module SRIO_TX includes a grouping unit and a sending unit;
所述组包单元用于完成对SRIO接口协议的组包;The grouping unit is used to complete the grouping of the SRIO interface protocol;
所述发送单元用于发送时序设计,并将分时复用信号srio_mux发送到对端芯片FPGA2中。The sending unit is used to send the timing design, and send the time-division multiplexing signal srio_mux to the peer chip FPGA2.
根据上述技术方案,所述SRIO接收模块SRIO_RX包括解析单元和传送单元;According to the above technical solution, the SRIO receiving module SRIO_RX includes an analysis unit and a transmission unit;
所述解析单元用于解析对端芯片FPGA2内部SRIO发送的分时复用信号srio_mux“’;The analysis unit is used to analyze the time-division multiplexing signal srio_mux "' sent by the internal SRIO of the opposite chip FPGA2;
所述传送单元用于将解析后的分时复用信号srio_mux“’传送入解复用模块。The transmitting unit is used to transmit the analyzed time-division multiplexing signal srio_mux"' to the demultiplexing module.
根据上述技术方案,所述解复用模块DEMUX包括识别单元、选择单元、写时钟、读时钟和解复用单元;According to the above technical solution, the demultiplexing module DEMUX includes an identification unit, a selection unit, a writing clock, a reading clock and a demultiplexing unit;
所述识别单元用于根据SRIO协议帧头识别通道号;The identification unit is used to identify the channel number according to the frame header of the SRIO protocol;
所述选择单元用于根据通道号选择对应的异步双口ram存储;The selection unit is used to select the corresponding asynchronous dual-port ram storage according to the channel number;
所述写时钟对应分时复用模块的读时钟log_clk;The write clock corresponds to the read clock log_clk of the time-division multiplexing module;
所述读时钟是各L路输入通道对应的速率;The read clock is the rate corresponding to each L input channel;
解复用单元用于完成从1路到L路的解复用,还原L路SRIO接口数据。The demultiplexing unit is used to complete demultiplexing from
一种基于SRIO分时复用和解复用的报文传输方法,所述方法的步骤包括:A kind of message transmission method based on SRIO time-division multiplexing and demultiplexing, the step of described method comprises:
S1:将L路输入通道输入进来的SRIO接口数据送入FIFO存储器进行缓存以及对两个异步FIFO存储器进行乒乓缓存,对L路输入通道输入进来的SRIO接口数据中的n路业务通道数据进行拆包;S1: Send the SRIO interface data input from the L-channel input channel into the FIFO memory for buffering and perform ping-pong buffering on two asynchronous FIFO memories, and disassemble the n-channel service channel data in the SRIO interface data input from the L-channel input channel Bag;
S2:将各L路输入通道对应FIFO存储器的写完成标志wr_done_flag从右到左依次存入写完成标志寄存器wr_done_reg中,利用轮询计数器cnt1对各L路输入通道对应FIFO存储器的写完成标志进行轮询和优先级动态调整;S2: the write completion flag wr_done_flag corresponding to the FIFO memory of each L road input channel is stored in the write completion flag register wr_done_reg from right to left, and the write completion flag of each L road input channel corresponding to the FIFO memory is polled by using the polling counter cnt1 query and priority dynamic adjustment;
S3:完成与对端的SRIO接口协议交互,即将分时复用模块MUX输出的复用信号srio_mux送入SRIO发送模块SRIO_TX,完成组包和时序设计后并转串成高速数据流txp/n后,送入对端芯片FPGA2的SRIO接口,对端处理完成后发送至本端芯片FPGA1的SRIO接收模块SRIO_RX,本端接收高速数据流rxp/n后,通过串转并和解析将其转换成SRIO接口的总线数据;S3: Complete the SRIO interface protocol interaction with the opposite end, that is, send the multiplexing signal srio_mux output by the time-division multiplexing module MUX to the SRIO transmission module SRIO_TX, complete the grouping and timing design and convert it into a high-speed data stream txp/n, Send it to the SRIO interface of the peer chip FPGA2, and send it to the SRIO receiving module SRIO_RX of the local chip FPGA1 after the peer processing is completed. After the local end receives the high-speed data stream rxp/n, it converts it into an SRIO interface through serial conversion and parsing bus data;
S4:对SRIO总线数据进行解复用,即将srio_demux数据送入解复用模块DEMUX,根据协议帧头识别通道号,根据通道号选择对应的异步双口ram存储,完成1路到L路的解复用,还原L路SRIO接口数据。S4: Demultiplex the SRIO bus data, send the srio_demux data to the demultiplexing module DEMUX, identify the channel number according to the protocol frame header, select the corresponding asynchronous dual-port ram storage according to the channel number, and complete the demultiplexing from
对L路输入通道中的n路业务通道数据进行拆包,设置一包的比特数为c比特;Unpack the data of the n-way business channels in the L-way input channels, and set the number of bits in one package to c bits;
所述各n路业务通道比特流按小包依次在对应的两个FIFO存储器中来回缓存。The bit streams of the n service channels are sequentially buffered back and forth in the corresponding two FIFO memories according to small packets.
根据上述技术方案,在步骤S2中,所述轮询计数器cnt1根据当时轮询计数器cnt1的值来确定和累加选择读取数据的通道,并且轮询计数器cnt1轮询到两个及以上通道的写完成标志wr_done_flag有效时,开启优先级动态调整方式。According to the above technical solution, in step S2, the polling counter cnt1 determines and accumulates the channel for selecting the read data according to the value of the polling counter cnt1 at that time, and the polling counter cnt1 polls the write data of two or more channels When the completion flag wr_done_flag is valid, the priority dynamic adjustment method is enabled.
根据上述技术方案,所述分时复用模块MUX的状态机的状态流程图的具体表现为:According to the technique scheme, the specific performance of the state flow diagram of the state machine of the time-division multiplexing module MUX is as follows:
状态1:初始状态,开始时对轮询计数器cnt1和等待计数器cnt2等信号进行复位;当轮询计数器cnt1检测到写完成标志寄存器wr_done_reg有效时,触发进入状态2,若写完成标志寄存器wr_done_reg无效,则一直在状态1循环;State 1: initial state, reset the polling counter cnt1 and waiting counter cnt2 and other signals at the beginning; when the polling counter cnt1 detects that the write completion flag register wr_done_reg is valid, it triggers to enter state 2, if the write completion flag register wr_done_reg is invalid, Then it keeps looping in
状态2:轮询状态,对各通道的写完成标志进行轮询;轮询方式为优先级动态调整,根据当时轮询计数器cnt1的值确定优先级,轮询计数器cnt1从0开始循环计数,计数范围为0~p,当检测到写完成标志寄存器wr_done_reg[cnt1]有效时,轮询结束,轮询计数器cnt1停止计数,触发进入到状态3,若写完成标志寄存器wr_done_reg[cnt1]无效,则一直在状态2循环;State 2: polling state, polling the writing completion flag of each channel; the polling method is dynamic adjustment of priority, and the priority is determined according to the value of the polling counter cnt1 at that time, and the polling counter cnt1 starts counting from 0, counting The range is 0 to p. When it is detected that the write completion flag register wr_done_reg[cnt1] is valid, the polling ends, the polling counter cnt1 stops counting, and the trigger enters state 3. If the write completion flag register wr_done_reg[cnt1] is invalid, the Loop in state 2;
状态3:等待状态,等待计数器cnt2从0开始循环计数,计数范围为0~q,同时根据分时复用的接口协议添加各通道的帧头,长度为1字节,当检测到cnt2为q时,触发进入到状态4,若cnt2小于q,则一直在状态3循环;State 3: Waiting state, the waiting counter cnt2 counts cyclically from 0, and the counting range is 0~q. At the same time, the frame header of each channel is added according to the interface protocol of time-division multiplexing, and the length is 1 byte. When cnt2 is detected as q , the trigger enters state 4, and if cnt2 is less than q, it keeps looping in state 3;
状态4:读取状态,将对应通道FIFO存储器的读使能rd[cnt1]拉高,读至FIFO空标志empty[cnt1]有效时,触发回到状态1,进入下一次轮询操作,否则一直在状态4循环。State 4: Read the state, pull the read enable rd[cnt1] of the FIFO memory of the corresponding channel high, read until the FIFO empty flag empty[cnt1] is valid, trigger back to
根据上述技术方案,在步骤S3中,所述其中SRIO接口协议包括发起请求ireq、发起响应iresp、目标请求treq、目标响应tresp。According to the above technical solution, in step S3, the SRIO interface protocol includes an initiation request ireq, an initiation response iresp, a target request treq, and a target response tresp.
在本实施例中:In this example:
设定通道总数L=10,其中业务通道n=5,控制通道m=5。Set the total number of channels L=10, where n=5 service channels and m=5 control channels.
S1:将10路输入通道输入进来的SRIO接口数据送入FIFO存储器进行缓存以及对两个异步FIFO存储器进行乒乓缓存,对L路输入通道输入进来的SRIO接口数据中的5路业务通道数据进行拆包;S1: Send the SRIO interface data input from the 10 input channels into the FIFO memory for buffering and perform ping-pong buffering on two asynchronous FIFO memories, and disassemble the 5 business channel data from the SRIO interface data input from the L input channels Bag;
S2:将各10路输入通道对应FIFO存储器的写完成标志wr_done_flag从右到左依次存入写完成标志寄存器wr_done_reg中,利用轮询计数器cnt1对各10路输入通道对应FIFO存储器的写完成标志进行轮询和优先级动态调整;S2: the write completion flag wr_done_flag corresponding to the FIFO memory of each 10-way input channel is stored in the write completion flag register wr_done_reg from right to left, and the write completion flag of each 10-way input channel corresponding to the FIFO memory is carried out by polling counter cnt1 query and priority dynamic adjustment;
S3:完成与对端的SRIO接口协议交互,即将分时复用模块MUX输出的复用信号srio_mux送入SRIO发送模块SRIO_TX,完成组包和时序设计后并转串成高速数据流txp/n后,送入对端芯片FPGA2的SRIO接口,对端处理完成后发送至本端芯片FPGA1的SRIO接收模块SRIO_RX,本端接收高速数据流rxp/n后,通过串转并和解析将其转换成SRIO接口的总线数据;S3: Complete the SRIO interface protocol interaction with the opposite end, that is, send the multiplexing signal srio_mux output by the time-division multiplexing module MUX to the SRIO transmission module SRIO_TX, complete the grouping and timing design and convert it into a high-speed data stream txp/n, Send it to the SRIO interface of the peer chip FPGA2, and send it to the SRIO receiving module SRIO_RX of the local chip FPGA1 after the peer processing is completed. After the local end receives the high-speed data stream rxp/n, it converts it into an SRIO interface through serial conversion and parsing bus data;
S4:对SRIO总线数据进行解复用,即将srio_demux数据送入解复用模块DEMUX,根据协议帧头识别通道号,根据通道号选择对应的异步双口ram存储,完成1路到10路的解复用,还原10路SRIO接口数据。S4: Demultiplex the SRIO bus data, send the srio_demux data to the demultiplexing module DEMUX, identify the channel number according to the protocol frame header, select the corresponding asynchronous dual-port ram storage according to the channel number, and complete the demultiplexing of
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is a relationship between these entities or operations. There is no such actual relationship or order between them. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device.
最后应说明的是:以上所述仅为本发明的优选实施例而已,并不用于限制本发明,尽管参照前述实施例对本发明进行了详细的说明,对于本领域的技术人员来说,其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。Finally, it should be noted that: the above is only a preferred embodiment of the present invention, and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, for those skilled in the art, it still The technical solutions recorded in the foregoing embodiments may be modified, or some technical features thereof may be equivalently replaced. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211111783.1A CN115714637A (en) | 2022-09-13 | 2022-09-13 | Message transmission device and method based on SRIO time division multiplexing and demultiplexing |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211111783.1A CN115714637A (en) | 2022-09-13 | 2022-09-13 | Message transmission device and method based on SRIO time division multiplexing and demultiplexing |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN115714637A true CN115714637A (en) | 2023-02-24 |
Family
ID=85230656
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211111783.1A Pending CN115714637A (en) | 2022-09-13 | 2022-09-13 | Message transmission device and method based on SRIO time division multiplexing and demultiplexing |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115714637A (en) |
Citations (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20080092001A1 (en) * | 2006-10-03 | 2008-04-17 | Vijay Kumar Kodavalla | Method and device for data communication |
| CN101227291A (en) * | 2007-01-18 | 2008-07-23 | 杭州华三通信技术有限公司 | Ethernet MAC layer cross-connection system, transmission method and chip for its application |
| WO2009082897A1 (en) * | 2007-12-27 | 2009-07-09 | Huawei Technologies Co., Ltd. | Method and device for multiplexing and demultiplexing ethernet messages |
| US20110225337A1 (en) * | 2010-03-12 | 2011-09-15 | Byrne Richard J | Transaction performance monitoring in a processor bus bridge |
| CN103377690A (en) * | 2012-04-17 | 2013-10-30 | 广东新岸线计算机系统芯片有限公司 | Data sending and receiving device and system and method for data transmission |
| CN106301659A (en) * | 2015-06-05 | 2017-01-04 | 华东师范大学 | A kind of magnetic resonance multi-channel digital transmission system and data transmission method thereof |
| CN207339846U (en) * | 2017-11-07 | 2018-05-08 | 武汉华讯国蓉科技有限公司 | A kind of independent double-channel data Transmission system based on SRIO |
| CN112653638A (en) * | 2020-12-14 | 2021-04-13 | 中科院计算技术研究所南京移动通信与计算创新研究院 | Device for switching routes of multiple paths of intermediate frequencies and baseband at high speed and communication method thereof |
| CN114443170A (en) * | 2022-01-29 | 2022-05-06 | 中国航空无线电电子研究所 | FPGA dynamic parallel loading and unloading system |
| CN217307778U (en) * | 2021-12-29 | 2022-08-26 | 湖南源科创新科技有限公司 | Heterogeneous platform target image processing system and target image processing device |
-
2022
- 2022-09-13 CN CN202211111783.1A patent/CN115714637A/en active Pending
Patent Citations (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20080092001A1 (en) * | 2006-10-03 | 2008-04-17 | Vijay Kumar Kodavalla | Method and device for data communication |
| CN101227291A (en) * | 2007-01-18 | 2008-07-23 | 杭州华三通信技术有限公司 | Ethernet MAC layer cross-connection system, transmission method and chip for its application |
| WO2009082897A1 (en) * | 2007-12-27 | 2009-07-09 | Huawei Technologies Co., Ltd. | Method and device for multiplexing and demultiplexing ethernet messages |
| US20110225337A1 (en) * | 2010-03-12 | 2011-09-15 | Byrne Richard J | Transaction performance monitoring in a processor bus bridge |
| CN103377690A (en) * | 2012-04-17 | 2013-10-30 | 广东新岸线计算机系统芯片有限公司 | Data sending and receiving device and system and method for data transmission |
| CN106301659A (en) * | 2015-06-05 | 2017-01-04 | 华东师范大学 | A kind of magnetic resonance multi-channel digital transmission system and data transmission method thereof |
| CN207339846U (en) * | 2017-11-07 | 2018-05-08 | 武汉华讯国蓉科技有限公司 | A kind of independent double-channel data Transmission system based on SRIO |
| CN112653638A (en) * | 2020-12-14 | 2021-04-13 | 中科院计算技术研究所南京移动通信与计算创新研究院 | Device for switching routes of multiple paths of intermediate frequencies and baseband at high speed and communication method thereof |
| CN217307778U (en) * | 2021-12-29 | 2022-08-26 | 湖南源科创新科技有限公司 | Heterogeneous platform target image processing system and target image processing device |
| CN114443170A (en) * | 2022-01-29 | 2022-05-06 | 中国航空无线电电子研究所 | FPGA dynamic parallel loading and unloading system |
Non-Patent Citations (2)
| Title |
|---|
| 任安虎;张燕;: "光纤多路传输系统的设计与实现", 西安工业大学学报, no. 04, 15 August 2010 (2010-08-15) * |
| 王恒;白玉新;张天琪;张达;秦二卫;: "基于高速同步485总线通信的多通道伺服控制器设计", 计算机测量与控制, no. 03, 25 March 2017 (2017-03-25) * |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20110276731A1 (en) | Dual-port functionality for a single-port cell memory device | |
| CN105207794B (en) | Statistical counting equipment and its implementation, the system with statistical counting equipment | |
| CN111339003A (en) | General multichannel data sending system and method based on FPGA | |
| CN109905321B (en) | Routing control system for interaction between user-defined high-speed interface and Ethernet | |
| CN112653638B (en) | Device for switching routes of multiple paths of intermediate frequencies and baseband at high speed and communication method thereof | |
| CN111147175B (en) | Time-triggered Ethernet data frame capturing and storing device and method | |
| US7272675B1 (en) | First-in-first-out (FIFO) memory for buffering packet fragments through use of read and write pointers incremented by a unit access and a fraction of the unit access | |
| CN101252579A (en) | A Packing and Unpacking Method of Network Layer | |
| CN108614792A (en) | 1394 transaction layer data packet memory management methods and circuit | |
| CN117648274A (en) | A transmission length adaptive FC data transmission control system and method | |
| US20030193894A1 (en) | Method and apparatus for early zero-credit determination in an infiniband system | |
| CN111526317A (en) | Low-delay image acquisition method, device and system | |
| CN119415473B (en) | A chiplet interconnect interface protocol layer circuit and chip compatible with CHI protocol | |
| CN1738224B (en) | Circuit and method for TDM data and frame format conversion, transmission and switching system and method | |
| CN115714637A (en) | Message transmission device and method based on SRIO time division multiplexing and demultiplexing | |
| CN119201838A (en) | A method for managing out-of-order reception of RapidIO Message transactions based on FPGA | |
| CN120029951B (en) | SRIO multichannel communication method and system based on FC equipment | |
| CN117687889B (en) | Performance test device and method for memory expansion equipment | |
| Lu et al. | Design and implementation of multi-channel high speed HDLC data processor | |
| CN116804977A (en) | Inter-chip data transmission system and inter-chip data transmission method | |
| US8050294B2 (en) | Method and system for transmitting in TDM mode | |
| CN105939238A (en) | SOC isolation Memory-based 10Gbps Ethernet real-time data acquisition method | |
| CN112637027B (en) | Frame boundary defining device based on UART (universal asynchronous receiver/transmitter), transmitting method and receiving method | |
| CN100403700C (en) | Test method and equipment for inverse multiplexing of asynchronous transfer mode | |
| CN100591067C (en) | A Method of Implementing SDH and Ethernet Speed Adaptation Using Logic |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| AD01 | Patent right deemed abandoned | ||
| AD01 | Patent right deemed abandoned |
Effective date of abandoning: 20250912 |