[go: up one dir, main page]

CN100446578C - A Multi-Channel Advanced Data Link Controller - Google Patents

A Multi-Channel Advanced Data Link Controller Download PDF

Info

Publication number
CN100446578C
CN100446578C CNB2004800436602A CN200480043660A CN100446578C CN 100446578 C CN100446578 C CN 100446578C CN B2004800436602 A CNB2004800436602 A CN B2004800436602A CN 200480043660 A CN200480043660 A CN 200480043660A CN 100446578 C CN100446578 C CN 100446578C
Authority
CN
China
Prior art keywords
data
channel
receiving
buffer
sending
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.)
Expired - Lifetime
Application number
CNB2004800436602A
Other languages
Chinese (zh)
Other versions
CN1994002A (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.)
Sanechips Technology 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
Publication of CN1994002A publication Critical patent/CN1994002A/en
Application granted granted Critical
Publication of CN100446578C publication Critical patent/CN100446578C/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/14Multichannel or multilink protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)
  • Time-Division Multiplex Systems (AREA)

Abstract

本发明多通道HDLC控制器,用于实现多通道HDLC与系统的对接,将数据以多通道HDLC方式进行组织,然后通过时分复用接口传送数据,同时通过AHB总线接口与使用HDLC控制器的系统内存相连,在本发明中,部分HDLC控制器工作所需的临时参数被放在HDLC控制器之外,通过内部逻辑从外部调用这些参数。本发明采用非RISC设计、全电路实现,无需采用通用的RISC,并为HDLC设置专门的接口,设计难度小;本发明将多通道HDLC控制器工作所需要的临时参数存放在内存中,节省了多通道HDLC控制器本身的硬件资源。此外,对于多通道HDLC控制器中多通道的数据发送或者接收,一个多通道HDLC控制器的所有通道共用一套控制逻辑,也节省了很多硬件资源。

Figure 200480043660

The multi-channel HDLC controller of the present invention is used to realize the docking of the multi-channel HDLC and the system, organize the data in a multi-channel HDLC mode, and then transmit the data through the time-division multiplexing interface, and at the same time communicate with the system using the HDLC controller through the AHB bus interface The memory is connected. In the present invention, some temporary parameters required by the HDLC controller are placed outside the HDLC controller, and these parameters are called from the outside through the internal logic. The present invention adopts non-RISC design, full circuit realization, does not need to adopt common RISC, and sets special interface for HDLC, and design difficulty is little; Hardware resources of the multi-channel HDLC controller itself. In addition, for data transmission or reception of multiple channels in a multi-channel HDLC controller, all channels of a multi-channel HDLC controller share a set of control logic, which also saves a lot of hardware resources.

Figure 200480043660

Description

一种多通道高级数据链路控制器 A Multi-Channel Advanced Data Link Controller

技术领域 technical field

本发明涉及T1/E1通信领域,具体地说,涉及一种多通道的高级数据链路(HDLC)控制器。The invention relates to the field of T1/E1 communication, in particular to a multi-channel high-level data link (HDLC) controller.

背景技术 Background technique

现有技术中,采用多通道HDLC的控制器主要有下述两种。In the prior art, controllers using multi-channel HDLC mainly include the following two types.

一种是型号为Conexant CN8472/8474的多通道HDLC控制器,它采用非RISC(精简指令集计算机结构)、全电路实现,共有128个通道,该128通道HDLC由串口处理接口,位(bit)级别处理,中断处理控制器,DMA控制器,PCI(周边元件扩展接口)总线接口组成。A kind of is the multi-channel HDLC controller that model is Conexant CN8472/8474, and it adopts non-RISC (reduced instruction set computer structure), full circuit realization, has 128 channels altogether, and this 128-channel HDLC is processed by the serial port interface, bit (bit) Level processing, interrupt processing controller, DMA controller, PCI (peripheral component expansion interface) bus interface.

但该多通道HDLC控制器存在如下两个的问题:首先,需要大量的硬件资源用于存放临时参数,在控制器的工作过程中需要很多的临时参数,包括:每个通道的接收临时循环冗余校验码CRC(32位)、每个通道的接收临时缓冲区指针(32位)、每个通道的接收临时缓冲区可用长度(14位)、每个通道的发送临时循环冗余校验码CRC(32位)、每个通道的发送临时缓冲区指针(32位)、每个通道的发送临时缓冲区可用长度(14位);那么对于128个这样的通道,则硬件内部需要有(32+32+14+32+32+14)乘以128个(通道数)的RAM来存放这些临时参数。以上是HDLC控制器工作必须的临时参数,如果想提升HDLC控制器的性能,每个通道还需要存放更多的临时参数,这样将耗费大量的硬件资源。其次,HDLC控制器的内部采用乒乓FIFO来实现数据中转,其接收FIFO和发送FIFO如图1和图2所示。其FIFO都分成两个相等空间的RAM结构,数据先向其中一个RAM写入数据,等到写满之后,就换到另外一个RAM结构进行操作,同时产生一个中断给DMA控制器,DMA控制器会去取出其数据。这样的乒乓FIFO一端被写数据端口占用之后,读数据端口就只能访问另一半FIFO,或者等待端口被释放后才能访问,从而导致了资源的浪费。But there are following two problems in this multi-channel HDLC controller: first, need a large amount of hardware resources to be used for depositing temporary parameter, need a lot of temporary parameter in the working process of controller, comprise: each passway receives temporary cyclic redundancy Remaining check code CRC (32 bits), receiving temporary buffer pointer of each channel (32 bits), available length of receiving temporary buffer of each channel (14 bits), sending temporary cyclic redundancy check of each channel Code CRC (32 bits), the sending temporary buffer pointer (32 bits) of each channel, and the available length (14 bits) of the sending temporary buffer of each channel; then for 128 such channels, the hardware needs to have ( 32+32+14+32+32+14) multiplied by 128 (number of channels) RAM to store these temporary parameters. The above are the temporary parameters necessary for the HDLC controller to work. If you want to improve the performance of the HDLC controller, each channel needs to store more temporary parameters, which will consume a lot of hardware resources. Secondly, ping-pong FIFO is used inside the HDLC controller to realize data transfer, and its receiving FIFO and sending FIFO are shown in Fig. 1 and Fig. 2 . Its FIFO is divided into two RAM structures with equal space. The data is first written to one of the RAMs. After it is full, it is switched to another RAM structure for operation. At the same time, an interrupt is generated to the DMA controller. The DMA controller will to retrieve its data. After one end of such a ping-pong FIFO is occupied by the write data port, the read data port can only access the other half of the FIFO, or wait for the port to be released before accessing, thereby resulting in a waste of resources.

第二种是美国摩托罗拉公司生产的MPC8260通信处理器,如图3所示,其内部有两个128通道的HDLC通信接口,这种方案的缺点在于它的多通道HDLC是不能独立运作的,需要有一个RISC来实现对多通道HDLC的配置与控制、数据的组织和数据的调度,并控制其它外设,以此来实现与Conexant CN8472/8474多通道HDLC控制器相同的功能。因此该通信处理器要求在硬件上有一个RISC模块,且该模块具有与多通道HDLC和其它外设连接的相应接口,方便RISC模块进行控制;同时还需要对该RISC模块编写代码。这样的设计比较复杂,需要较长的设计周期。The second is the MPC8260 communication processor produced by Motorola, USA. As shown in Figure 3, there are two 128-channel HDLC communication interfaces inside. The disadvantage of this solution is that its multi-channel HDLC cannot operate independently. There is a RISC to realize the configuration and control of multi-channel HDLC, data organization and data scheduling, and control other peripherals, so as to realize the same function as Conexant CN8472/8474 multi-channel HDLC controller. Therefore, the communication processor requires a RISC module on the hardware, and the module has a corresponding interface connected with multi-channel HDLC and other peripherals to facilitate the control of the RISC module; at the same time, it is also necessary to write code for the RISC module. Such a design is more complicated and requires a longer design cycle.

发明内容 Contents of the invention

本发明所要解决的技术问题在于提供一种多通道高级数据链路控制器,解决现有技术中硬件资源耗费量大、FIFO资源不能充分使用以及实现难度大的缺点,利用外部资源来实现内部运算。The technical problem to be solved by the present invention is to provide a multi-channel advanced data link controller, which solves the shortcomings of large hardware resource consumption, insufficient use of FIFO resources and high difficulty in implementation in the prior art, and uses external resources to realize internal calculations. .

本发明所述多通道高级数据链路控制器,包括时分复用数据接收处理模块、接收通道处理器、接收监控器、接收缓存器、接收引擎、发送引擎、发送缓存器、发送监控器、发送通道处理器、时分复用数据发送处理模块以及AHB总线接口;其中The multi-channel advanced data link controller of the present invention includes a time division multiplexing data receiving processing module, a receiving channel processor, a receiving monitor, a receiving buffer, a receiving engine, a sending engine, a sending buffer, a sending monitor, a sending Channel processor, time-division multiplexing data transmission processing module and AHB bus interface; wherein

所述时分复用数据接收处理模块,用于从串行接口接收数据,并转换为8位并行数据,输出到所述接收通道处理器;The time-division multiplexing data receiving and processing module is used to receive data from the serial interface, and convert it into 8-bit parallel data, and output it to the receiving channel processor;

所述接收通道处理器,用于以通道号为编号,将接收的数据中插入的零去除,输出到所述接收监控器;The receiving channel processor is used to use the channel number as the serial number to remove the zero inserted in the received data and output it to the receiving monitor;

所述接收监控器,用于按通道编号,把数据存放到所述接收缓存器内,同时监视所述接收缓存器的容量,向所述接收引擎发送数据申请;The receiving monitor is used to store data in the receiving buffer according to the channel number, monitor the capacity of the receiving buffer at the same time, and send a data request to the receiving engine;

所述接收缓存器,用于暂存接收的数据;The receiving buffer is used to temporarily store the received data;

所述接收引擎,用于对数据进行循环冗余码校验处理,对缓冲区描述符进行读写操作,并按照缓冲区描述符的要求进行数据传送,再把相应的中断写入内存中;The receiving engine is used to perform cyclic redundancy check processing on the data, read and write the buffer descriptor, and perform data transmission according to the requirements of the buffer descriptor, and then write the corresponding interrupt into the memory;

所述发送引擎,用于对缓冲区描述符进行读写操作,并按照缓冲区描述符的要求进行数据传送,同时进行循环冗余码校验处理,再把相应的中断写入内存中;The sending engine is used to perform read and write operations on the buffer descriptor, and perform data transmission according to the requirements of the buffer descriptor, and perform cyclic redundancy check processing at the same time, and then write the corresponding interrupt into the memory;

所述发送缓存器,用于暂存发送数据;The sending buffer is used to temporarily store sending data;

所述发送监控器,用于根据所述发送通道处理器的申请,从所述发送缓存器中读取数据并传送给所述发送通道处理器,并根据所述发送缓存器的容量,向所述发送引擎申请数据;The transmission monitor is configured to read data from the transmission buffer and transmit it to the transmission channel processor according to the application of the transmission channel processor, and send data to the transmission channel processor according to the capacity of the transmission buffer. Send engine application data as described above;

所述发送通道处理器,用于以通道为编号,对所述发送监控器传送的数据进行插零操作;The sending channel processor is used to perform zero-insertion operation on the data transmitted by the sending monitor with the channel as the number;

所述时分复用数据发送处理模块,用于从时隙编号中读取通道编号,并根据通道编号读取通道数据,将8位并行数据转化为串行数据输出;The time-division multiplexing data transmission processing module is used to read the channel number from the time slot number, and read the channel data according to the channel number, and convert 8-bit parallel data into serial data output;

所述AHB总线接口,与所述接收引擎和所述发送引擎相连,用于将内部总线行为转换到AHB总线行为。The AHB bus interface is connected with the receiving engine and the sending engine, and is used to convert the behavior of the internal bus to the behavior of the AHB bus.

本发明采用非RISC设计、全电路实现,无需采用通用的RISC,并为HDLC设置专门的接口,设计难度小;本发明将多通道HDLC控制器工作所需要的临时参数存放在内存中,节省了多通道HDLC控制器本身的硬件资源,节省的硬件资源为((32+32+14)(发送部分的位数)+(32+32+14)(接收部分的位数))*128(通道数);同时系统只有在使用多通道HDLC控制器的时候,才需要分配一个内存空间,如果系统不使用多通道HDLC控制器,或者在一段时间内不需要使用多通道HDLC控制器,那么这个内存资源可以释放,以作其它的用途。此外,对于多通道HDLC控制器中多通道的数据发送或者接收,并不是每个通道采用一套控制逻辑,而是一个多通道HDLC控制器的所有通道共用一套控制逻辑,这是因为在任何时间点上,只有一个通道在工作中,所以每个通道无需都做一套控制逻辑,这样也节省了很多硬件资源。本发明中接收缓存器和发送缓存器采用FIFO结构,读和写操作可以同时运行,另外对FIFO的空间大小采用动态分配的方式,即按照每个通道实际占用的T1/E1的时隙数目分配FIFO的空间大小,比如占用时隙数目多的通道,其FIFO空间就分配多一些,占用时隙数目少的通道就分配少一些FIFO空间。The present invention adopts non-RISC design, full circuit realization, does not need to adopt common RISC, and sets special interface for HDLC, and design difficulty is little; The hardware resources of the multi-channel HDLC controller itself, the saved hardware resources are ((32+32+14) (the number of bits in the sending part)+(32+32+14) (the number of bits in the receiving part))*128 (channel Number); at the same time, the system only needs to allocate a memory space when the multi-channel HDLC controller is used. If the system does not use the multi-channel HDLC controller, or does not need to use the multi-channel HDLC controller for a period of time, then this memory Resources can be released for other uses. In addition, for data transmission or reception of multiple channels in a multi-channel HDLC controller, not each channel adopts a set of control logic, but all channels of a multi-channel HDLC controller share a set of control logic, because in any At this point in time, only one channel is working, so each channel does not need to implement a set of control logic, which also saves a lot of hardware resources. In the present invention, the receiving buffer and the sending buffer adopt a FIFO structure, and the read and write operations can run simultaneously. In addition, the space size of the FIFO is dynamically allocated, that is, allocated according to the number of T1/E1 time slots actually occupied by each channel The size of the FIFO space, such as channels that occupy a large number of time slots, allocate more FIFO space, and channels that occupy a small number of time slots allocate less FIFO space.

附图说明 Description of drawings

图1是现有技术中Conexant CN8472/8474多通道HDLC控制器的接收FIFO的示意图;Fig. 1 is the schematic diagram of the receiving FIFO of Conexant CN8472/8474 multi-channel HDLC controller in the prior art;

图2是现有技术中Conexant CN8472/8474多通道HDLC控制器的发送FIFO的示意图;Fig. 2 is the schematic diagram of sending FIFO of Conexant CN8472/8474 multi-channel HDLC controller in the prior art;

图3是现有技术中摩托罗拉MPC8260的多通道HDLC结构示意图;Fig. 3 is the multi-channel HDLC structural representation of Motorola MPC8260 in the prior art;

图4是本发明多通道HDLC控制器的结构示意图。Fig. 4 is a schematic structural diagram of the multi-channel HDLC controller of the present invention.

具体实施方式 Detailed ways

下面结合附图和实施例对本发明的技术方案做进一步的详细描述。The technical solutions of the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments.

图1至图3给出了现有技术中多通道HDLC控制器的解决方案,在背景技术部分已经介绍,此处不再赘述。FIG. 1 to FIG. 3 show solutions of multi-channel HDLC controllers in the prior art, which have been introduced in the background technology section and will not be repeated here.

本发明多通道HDLC控制器将数据以多通道HDLC方式进行组织,然后通过时分复用(TDM)接口传送数据,同时通过AHB(AMBA)总线接口与使用HDLC控制器的系统内存相连,在本发明中,部分HDLC控制器工作所需的临时参数被放在HDLC控制器之外,通过内部逻辑从外部调用这些参数。The multi-channel HDLC controller of the present invention organizes data in a multi-channel HDLC mode, then transmits data through a time-division multiplexing (TDM) interface, and simultaneously connects with the system memory using the HDLC controller through an AHB (AMBA) bus interface, in the present invention In , part of the temporary parameters required for HDLC controller work are placed outside the HDLC controller, and these parameters are called from the outside through internal logic.

如图4所示,本发明多通道HDLC控制器包括:时分复用数据接收处理模块、接收通道处理器、接收监控器、接收缓存器、接收引擎、发送引擎、发送缓存器、发送监控器、发送通道处理器、时分复用数据发送处理模块和AHB总线接口。下面从接收数据和发送数据两个方面来介绍多通道HDLC控制器的各个组成部分。As shown in Figure 4, the multi-channel HDLC controller of the present invention includes: time division multiplexing data receiving processing module, receiving channel processor, receiving monitor, receiving buffer, receiving engine, sending engine, sending buffer, sending monitor, A sending channel processor, a time division multiplexing data sending processing module and an AHB bus interface. The following introduces the various components of the multi-channel HDLC controller from two aspects of receiving data and sending data.

接收数据:Receive data:

时分复用数据接收处理模块从TDM串行接口接收数据后,由于后续的数据处理都以字节为单元,故需要将数据从串行数据转化为8位并行数据,并输出到接收通道处理器。另外,TDM是以时隙进行编号的,而后续处理是以通道号为编号,因此也需要把TDM的处理与后续以通道编号的处理分开。After the time-division multiplexing data receiving and processing module receives data from the TDM serial interface, since the subsequent data processing is in units of bytes, it is necessary to convert the data from serial data to 8-bit parallel data and output it to the receiving channel processor . In addition, TDM is numbered by time slots, and subsequent processing is numbered by channel numbers. Therefore, it is also necessary to separate TDM processing from subsequent processing by channel numbers.

接收通道处理器收到时分复用接收处理模块传送来的并行数据后,以通道号为编号进行处理。这些并行数据虽然以字节为单元,但实际上已经进行了插零操作,所以接收通道处理器需要去除数据中插入的零,这样后续的功能模块才可以真正地以字节为最小单元进行操作。经过除零操作的数据传送到接收监控器。After receiving the parallel data transmitted by the time-division multiplexing receiving processing module, the receiving channel processor uses the channel number as the serial number to process the data. Although these parallel data are in units of bytes, zero-insertion operations have actually been performed, so the receiving channel processor needs to remove the zeros inserted in the data, so that subsequent functional modules can actually operate on bytes as the smallest unit . The divided-by-zero data is passed to the receive monitor.

接收监控器将收到的数据按通道存放在接收缓存器中,并监视接收缓存器的容量,当其达到门限值后,向接收引擎产生相应的数据传送申请,其门限值一般为4个字节或16个字节或是一帧数据。为了提高总线利用率,数据一般积累到一个字(4个字节)时才发送出去。The receiving monitor stores the received data in the receiving buffer according to the channel, and monitors the capacity of the receiving buffer. When it reaches the threshold value, it generates a corresponding data transmission application to the receiving engine. The threshold value is generally 4 bytes or 16 bytes or a frame of data. In order to improve the utilization rate of the bus, the data is generally accumulated to a word (4 bytes) before being sent out.

接收缓存器对接收监控器传过来的数据进行暂存,为接收引擎积累4字节以上的数据。这个缓存器的容量是动态可分配的,可根据实际情况进行调节。在实际中,缓存器可采用FIFO实现。The receiving buffer temporarily stores the data transmitted by the receiving monitor, and accumulates more than 4 bytes of data for the receiving engine. The capacity of this buffer is dynamically allocable and can be adjusted according to actual conditions. In practice, the buffer can be implemented using FIFO.

为了节省HDLC控制器的硬件资源,HDLC控制器工作所需的部分信息可存放在内存中,如临时接收循环冗余校验码CRC(32位)、接收缓冲区临时指针(32位)、接收缓冲区临时可用长度(14位)以及通道的一些控制状态信息。In order to save the hardware resources of the HDLC controller, some information required by the HDLC controller can be stored in the memory, such as the temporary receiving cyclic redundancy check code CRC (32 bits), the temporary pointer of the receiving buffer (32 bits), the receiving The temporary available length of the buffer (14 bits) and some control status information of the channel.

接收引擎在收到接收监控器发来的数据申请后,分两个阶段进行操作:After the receiving engine receives the data request from the receiving monitor, it operates in two stages:

如果接收引擎发现接到的数据是一帧的开始,或者当时没有有效的缓冲区描述符(buffer descriptor,简称BD),则接收引擎通过AHB总线接口从内存的指定通道BD表内读取BD,得到BD上的参数,按照BD给出的地址开始搬运数据,并确认此BD的长度是否足够装下此次传送的数据:如果BD不够或者刚好满足此次操作,或者BD长度超过此次数据传送量,但是在数据传送中发现数据内有一帧结束的信息,则在数据传送完成之后,把状态回写,同时关闭BD;如果BD长度超过此次数据传送的量值,并且在数据传送中没有发现数据内有一帧结束的信息,则在数据传送完成之后,把当时的CRC值存到指定通道(临时)参数表内作为临时CRC(32位),把当时的地址存到指定通道(临时)参数表内作为接收缓冲区临时指针(32位),把当时的还可以传送的数据长度存到指定通道(临时)参数表内作为接收缓冲区临时可用长度(14位),还有其它的参数。然后退出此通道操作。If the receiving engine finds that the received data is the beginning of a frame, or there is no valid buffer descriptor (buffer descriptor, referred to as BD) at that time, the receiving engine reads the BD from the specified channel BD table of the memory through the AHB bus interface, Get the parameters on the BD, start to move the data according to the address given by the BD, and confirm whether the length of the BD is enough to hold the data transferred this time: if the BD is not enough or just meets the operation, or the BD length exceeds the data transfer for this time However, during the data transmission, it is found that there is an end-of-frame information in the data, then after the data transmission is completed, the status is written back, and the BD is closed at the same time; if the BD length exceeds the value of this data transmission, and there is no If there is an end-of-frame information in the data, after the data transmission is completed, save the current CRC value in the specified channel (temporary) parameter table as a temporary CRC (32 bits), and save the current address in the specified channel (temporary) The parameter table is used as the receiving buffer temporary pointer (32 bits), and the data length that can be transmitted at that time is stored in the specified channel (temporary) parameter table as the receiving buffer temporary available length (14 bits), and other parameters . Then exit this channel operation.

如果接收到的数据不是一帧的开始,并且当时的BD还没有用完,则接收引擎通过AHB总线接口从内存的指定通道(临时)参数表内,读取接收临时CRC(32位)(接收引擎会用作CRC的初值,进行CRC运作)、接收缓冲区临时指针(32位)(接收引擎以此指针作为地址的起点,进行数据的搬运)、接收缓冲区临时可用长度(14位)(接收引擎用于长度控制)等控制信息,然后开始对接收缓存器传送来的数据进行CRC处理,同时进行数据的搬运,并确认此BD的长度是否足够装下此次传送的数据量:如果BD的长度不够或者刚好满足,或者BD长度超过此次数据传送量,但是在数据传送中发现数据内有一帧结束的信息,则在数据传送完成之后,把状态回写到BD上,同时关闭BD,如果BD长度超过此次数据传送的量值,并且在数据传送中没有发现数据内有一帧结束的信息,则在数据传送完成之后,把当时的CRC值存到指定通道(临时)参数表内作为临时CRC(32位),把当时的地址存到指定通道(临时)参数表内作为接收缓冲区临时指针(32位),把当时的还可以传送的数据长度存到指定通道(临时)参数表内作为接收缓冲区临时可用长度(14位),还有其它的参数。然后退出此通道的操作。If the received data is not the beginning of a frame, and the BD at that time has not been used up, the receiving engine reads the receiving temporary CRC (32 bits) from the specified channel (temporary) parameter table of the memory through the AHB bus interface (receiving The engine will be used as the initial value of the CRC for CRC operation), the temporary pointer of the receiving buffer (32 bits) (the receiving engine uses this pointer as the starting point of the address to carry out data transfer), the temporary available length of the receiving buffer (14 bits) (The receiving engine is used for length control) and other control information, and then start to perform CRC processing on the data transmitted from the receiving buffer, and carry out data transfer at the same time, and confirm whether the length of this BD is enough to hold the amount of data transmitted this time: If The length of the BD is not enough or just enough, or the length of the BD exceeds the amount of data transmission this time, but it is found that there is an end of frame information in the data during the data transmission, then after the data transmission is completed, write the status back to the BD, and close the BD at the same time , if the BD length exceeds the value of this data transmission, and there is no information about the end of a frame in the data during data transmission, then after the data transmission is completed, save the current CRC value in the specified channel (temporary) parameter table As a temporary CRC (32 bits), store the address at that time in the specified channel (temporary) parameter table as a temporary pointer (32 bits) of the receiving buffer, and store the current data length that can still be transmitted in the specified channel (temporary) parameter The temporary available length (14 bits) of the receive buffer in the table, and other parameters. Then exit the operation of this channel.

AHB总线接口作为多通道HDLC控制器与AHB总线的连接口,实现HDLC内部总线行为到标准AHB总线行为的转换。The AHB bus interface is used as the connection port between the multi-channel HDLC controller and the AHB bus to realize the conversion of the HDLC internal bus behavior to the standard AHB bus behavior.

发送数据:send data:

发送引擎在收到发送监控器发来的申请后,同样会有两个阶段的操作,这与接收相似,只是数据的流向与接收相反,同样为了节省HDLC控制器的硬件资源,HDLC控制器工作所需的部分信息存放在内存中,如临发送时循环冗余校验码CRC(32位)、发送缓冲区临时指针(32位)、发送缓冲区临时可用长度(14位)以及通道的一些控制状态信息,在每个BD操作结束之后,都会把相应的帧信息返回到BD内。After the sending engine receives the application from the sending monitor, it will also have two stages of operation, which is similar to receiving, except that the flow of data is opposite to receiving. Also in order to save the hardware resources of the HDLC controller, the HDLC controller works Part of the required information is stored in the memory, such as the cyclic redundancy check code CRC (32 bits), the temporary pointer of the sending buffer (32 bits), the temporary available length of the sending buffer (14 bits), and some channel information. Control status information, after each BD operation ends, the corresponding frame information will be returned to the BD.

由于发送引擎是一次传入批量数据,而发送通道每次只要求读取一个字节,因此需要对发送引擎传送的批量数据进行暂存,提供这个暂存空间的就是发送缓存器,这样操作可使总线有更高的运作效率。发送缓存器采用FIFO实现,其容量是动态可分配的,可根据实际情况进行调节。Since the sending engine transmits batch data at one time, and the sending channel only requires to read one byte at a time, it is necessary to temporarily store the batch data transmitted by the sending engine. The sending buffer provides this temporary storage space, so the operation can be Make the bus more efficient. The sending buffer is realized by FIFO, and its capacity is dynamically distributable and can be adjusted according to the actual situation.

发送监控器根据发送通道处理器的数据申请,从发送缓存器中读取数据,传送给发送通道处理器;并根据当时发送缓存器的空余量,向发送引擎申请数据,申请的条件是该通道是使能状态,并且发送缓存器对应此通道有4个字节或者有16个节字以上的空余。According to the data application of the sending channel processor, the sending monitor reads the data from the sending buffer and sends it to the sending channel processor; and according to the free amount of the sending buffer at that time, applies for data to the sending engine, and the condition of the application is that the channel It is in the enabled state, and the send buffer corresponds to this channel with 4 bytes or more than 16 bytes free.

发送通道处理器以通道为编号,对发送监控器传过来的数据进行处理。发送监控器传来的数据是以字节为单元的,但并不是最终的数据格式,需在发送数据之前进行插零操作。The sending channel processor takes the channel as the number and processes the data transmitted from the sending monitor. The data sent by the sending monitor is in units of bytes, but it is not the final data format, and zero insertion is required before sending the data.

时分复用数据发送处理模块从发送通道处理器获得数据,再把数据转换为串行数据传送出去,由于之前的数据处理都以字节为单元,需要将数据从8位并行数据转换为串行数据,另外与接收相似,TDM是以时隙进行编号的,而后续处理是以通道号为编号,因此也需要把时分复用数据发送处理模块与其它以通道编号的模块分开。The time-division multiplexing data transmission processing module obtains data from the transmission channel processor, and then converts the data into serial data for transmission. Since the previous data processing is in units of bytes, it is necessary to convert the data from 8-bit parallel data to serial data. Data, similar to reception, TDM is numbered by time slot, and subsequent processing is numbered by channel number, so it is also necessary to separate the time division multiplexing data transmission processing module from other modules with channel number.

对本发明来说,一个多通道HDLC控制器可支持32通道,4个多通道HDLC控制器共可支持128通道。For the present invention, one multi-channel HDLC controller can support 32 channels, and four multi-channel HDLC controllers can support a total of 128 channels.

本发明多通道HDLC控制器可以作为SOC芯片的通信模块的一部分,实现多通道HDLC与系统的对接,并支持BD方式,可以主动地把数据传送到用户指定的内存空间内。多通道HDLC控制器必须有一个独立的AHB slave端口,可视为AHB总线接口的一部分,用于系统对HDLC控制器进行配置操作,同时该多通道HDLC控制器还必须是一个AHB Master,可视为AHB总线接口的一部分,能够主动按照BD的要求进行数据传送,并在数据传送完成之后,在BD上标识这一帧数据的状态。The multi-channel HDLC controller of the present invention can be used as a part of the communication module of the SOC chip to realize the connection between the multi-channel HDLC and the system, and supports the BD mode, and can actively transmit data to the memory space specified by the user. The multi-channel HDLC controller must have an independent AHB slave port, which can be regarded as a part of the AHB bus interface, and is used for the system to configure the HDLC controller. At the same time, the multi-channel HDLC controller must also be an AHB Master, which can be viewed as As a part of the AHB bus interface, it can actively transmit data according to the requirements of the BD, and mark the status of this frame of data on the BD after the data transmission is completed.

多通道HDLC控制器采用标准的AHB总线接口,AHB总线接口在SOC芯片中最为常见,这样可以使HDLC控制器成为一个标准的模块,容易移植到其它SOC芯片中。The multi-channel HDLC controller adopts the standard AHB bus interface, which is the most common in SOC chips, which makes the HDLC controller a standard module and can be easily transplanted to other SOC chips.

SOC芯片实际上是多层AHB总线系统,在同一时刻内,只要不同的AHBMaster访问不同的AHB Slave空间,则各AHB Master的运作就不会受到影响;同时SOC芯片内有多个内存空间,其中SRAM空间和SDRAM空间可用于存储HDLC控制器运作的有关信息。The SOC chip is actually a multi-layer AHB bus system. At the same time, as long as different AHBMasters access different AHB Slave spaces, the operation of each AHB Master will not be affected; at the same time, there are multiple memory spaces in the SOC chip, of which SRAM space and SDRAM space can be used to store information about the operation of the HDLC controller.

SRAM空间比较小,支持BURST操作。从SRAM空间读写数据,可以每个时钟返回一个32位数据,这样为部分临时参数存放到内存里提供了可行的物质基础,因此,将每个通道运作所需要的一些临时参数存放在SRAM空间内,例如每个通道的接收临时CRC(32位),发送临时CRC(32位),接收缓冲区临时指针(32位),发送缓冲区临时指针(32位),接收缓冲区临时可用长度(14位),发送缓冲区临时可用长度(14位)等信息。SDRAM空间的容量比SRAM空间大,用于存放每个通道的BD表以及BD表指向的缓冲区。The SRAM space is relatively small and supports BURST operation. Reading and writing data from the SRAM space can return a 32-bit data per clock, which provides a feasible material basis for storing some temporary parameters in the memory. Therefore, some temporary parameters required for the operation of each channel are stored in the SRAM space. In, for example, each channel’s receiving temporary CRC (32 bits), sending temporary CRC (32 bits), receiving buffer temporary pointer (32 bits), sending buffer temporary pointer (32 bits), receiving buffer temporary available length ( 14 bits), send buffer temporary available length (14 bits) and other information. The capacity of the SDRAM space is larger than that of the SRAM space, and is used to store the BD table of each channel and the buffer pointed to by the BD table.

对于多通道HDLC控制器来说,实际上并不知道哪一区是高速内存空间,哪一区是中速大容量空间,用户甚至可以把每个通道的基地址、运作指针、运作所需要的一些临时参数、BD表以及指向的缓冲区都放在同一个内存空间内。但从优化流程的角度来看,最好是将运作所需要的一些临时参数存放在高速内存空间中,而将每个通道的BD表以及缓冲数据存放在中速大容量内存空间里。For the multi-channel HDLC controller, it is actually unknown which area is the high-speed memory space and which area is the medium-speed large-capacity space. Some temporary parameters, BD table and the buffer pointed to are placed in the same memory space. But from the perspective of optimizing the process, it is best to store some temporary parameters needed for operation in the high-speed memory space, and store the BD table and buffer data of each channel in the medium-speed large-capacity memory space.

最后所应说明的是,以上实施例仅用以说明本发明的技术方案而非限制,尽管参照较佳实施例对本发明进行了详细说明,本领域的普通技术人员应当理解,可以对本发明的技术方案进行修改或者等同替换,而不脱离本发明技术方案的精神和范围,其均应涵盖在本发明的权利要求范围当中。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention without limitation. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be Modifications or equivalent replacements of the technical solutions without departing from the spirit and scope of the technical solutions of the present invention shall be covered by the scope of the claims of the present invention.

Claims (8)

1、一种多通道高级数据链路控制器,其特征在于,包括时分复用数据接收处理模块、接收通道处理器、接收监控器、接收缓存器、接收引擎、发送引擎、发送缓存器、发送监控器、发送通道处理器、时分复用数据发送处理模块以及AHB总线接口;其中1. A multi-channel advanced data link controller is characterized in that it includes a time division multiplexing data receiving processing module, a receiving channel processor, a receiving monitor, a receiving buffer, a receiving engine, a sending engine, a sending buffer, a sending A monitor, a sending channel processor, a time-division multiplexing data sending processing module, and an AHB bus interface; where 所述时分复用数据接收处理模块,用于从串行接口接收数据,并转换为8位并行数据,输出到所述接收通道处理器;The time-division multiplexing data receiving and processing module is used to receive data from the serial interface, and convert it into 8-bit parallel data, and output it to the receiving channel processor; 所述接收通道处理器,用于以通道号为编号,将接收的数据中插入的零去除,输出到所述接收监控器;The receiving channel processor is used to use the channel number as the serial number to remove the zero inserted in the received data and output it to the receiving monitor; 所述接收监控器,用于按通道编号,把数据存放到所述接收缓存器内,监视所述接收缓存器的容量,向所述接收引擎发送数据申请;所述接收缓存器,用于暂存接收的数据;The receiving monitor is used to store data in the receiving buffer according to the channel number, monitor the capacity of the receiving buffer, and send a data request to the receiving engine; the receiving buffer is used to temporarily store received data; 所述接收引擎,用于对数据进行循环冗余码校验处理,对缓冲区描述符进行读写操作,并按照缓冲区描述符的要求进行数据传送,再把相应的中断写入内存中;The receiving engine is used to perform cyclic redundancy check processing on the data, read and write the buffer descriptor, and perform data transmission according to the requirements of the buffer descriptor, and then write the corresponding interrupt into the memory; 所述发送引擎,用于对缓冲区描述符进行读写操作,并按照缓冲区描述符的要求进行数据传送,同时进行循环冗余码校验处理,再把相应的中断写入内存中;所述发送缓存器,用于暂存发送数据;The sending engine is used to read and write the buffer descriptor, and perform data transmission according to the requirements of the buffer descriptor, and perform cyclic redundancy check processing at the same time, and then write the corresponding interrupt into the memory; The sending buffer is used to temporarily store the sending data; 所述发送监控器,用于根据所述发送通道处理器的申请,从所述发送缓存器中读取数据并传送给所述发送通道处理器,并根据所述发送缓存器的容量,向所述发送引擎申请数据;The transmission monitor is configured to read data from the transmission buffer and transmit it to the transmission channel processor according to the application of the transmission channel processor, and send data to the transmission channel processor according to the capacity of the transmission buffer. Send engine application data as described above; 所述发送通道处理器,用于以通道为编号,对所述发送监控器传送的数据进行插零操作;The sending channel processor is used to perform a zero-insertion operation on the data transmitted by the sending monitor with the channel as the number; 所述时分复用数据发送处理模块,用于从时隙编号中读取通道编号,并根据通道编号读取通道数据,将8位并行数据转化为串行数据输出;The time-division multiplexing data transmission processing module is used to read the channel number from the time slot number, and read the channel data according to the channel number, and convert 8-bit parallel data into serial data output; 所述AHB总线接口,与所述接收引擎和所述发送引擎相连,用于将内部总线行为转换到AHB总线行为。The AHB bus interface is connected with the receiving engine and the sending engine, and is used to convert the behavior of the internal bus to the behavior of the AHB bus. 2、根据权利要求1所述的多通道高级数据链路控制器,其特征在于,所述接收监控器监视所述接收缓存器的容量到达门限值后,向所述接收引擎发送数据申请。2. The multi-channel advanced data link controller according to claim 1, wherein the receiving monitor monitors that the capacity of the receiving buffer reaches a threshold value, and then sends a data request to the receiving engine. 3、根据权利要求2所述的多通道高级数据链路控制器,其特征在于,所述门限值是4个字节或16个字节或是一帧数据。3. The multi-channel advanced data link controller according to claim 2, wherein the threshold value is 4 bytes or 16 bytes or a frame of data. 4、根据权利要求1所述的多通道高级数据链路控制器,其特征在于,所述发送监控器向所述发送引擎申请数据的条件是该通道是使能状态,并且所述发送缓存器对应该通道有4个字节或16个字节以上的空余。4. The multi-channel advanced data link controller according to claim 1, wherein the condition for the transmission monitor to apply for data to the transmission engine is that the channel is in an enabled state, and the transmission buffer 4 bytes or more than 16 bytes are free for this channel. 5、根据权利要求1所述的多通道高级数据链路控制器,其特征在于,所述内存空间中存放有每个通道运作所需的临时参数、每个通道的缓冲区描述符表以及缓冲区描述符表指向的缓冲数据。5. The multi-channel advanced data link controller according to claim 1, characterized in that, the temporary parameters required for the operation of each channel, the buffer descriptor table and the buffer descriptor table of each channel are stored in the memory space. The buffer data pointed to by the region descriptor table. 6、根据权利要求5所述的多通道高级数据链路控制器,其特征在于,所述每个通道运作所需的临时参数存放在高速内存空间中,而每个通道的缓冲区描述符表以及缓冲数据存放在中速大容量内存空间中。6. The multi-channel advanced data link controller according to claim 5, wherein the temporary parameters required for the operation of each channel are stored in a high-speed memory space, and the buffer descriptor table of each channel And the buffered data is stored in the medium-speed large-capacity memory space. 7、根据权利要求1所述的多通道高级数据链路控制器,其特征在于,所述接收引擎在收到接收监控器发来的数据申请或者发送引擎在收到发送监控器发来的数据申请后,需先通过AHB总线接口从内存中读取临时参数及缓冲区描述符表。7. The multi-channel advanced data link controller according to claim 1, wherein the receiving engine receives the data application from the receiving monitor or the sending engine receives the data from the sending monitor. After the application, it is necessary to read the temporary parameters and the buffer descriptor table from the memory through the AHB bus interface. 8、根据权利要求1所述的多通道高级数据链路控制器,其特征在于,所述接收缓存器/发送缓存器采用先进先出缓冲器实现,其容量是动态可分配的。8. The multi-channel advanced data link controller according to claim 1, wherein the receiving buffer/transmitting buffer is implemented by a first-in-first-out buffer, and its capacity is dynamically allocable.
CNB2004800436602A 2004-08-02 2004-08-02 A Multi-Channel Advanced Data Link Controller Expired - Lifetime CN100446578C (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2004/000889 WO2006012771A1 (en) 2004-08-02 2004-08-02 A multi-channel hdlc controller

Publications (2)

Publication Number Publication Date
CN1994002A CN1994002A (en) 2007-07-04
CN100446578C true CN100446578C (en) 2008-12-24

Family

ID=35786858

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004800436602A Expired - Lifetime CN100446578C (en) 2004-08-02 2004-08-02 A Multi-Channel Advanced Data Link Controller

Country Status (2)

Country Link
CN (1) CN100446578C (en)
WO (1) WO2006012771A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103002518B (en) * 2011-09-16 2017-12-15 山东比特智能科技股份有限公司 Link parameter auto-negotiation method, terminal and system based on HDLC protocol
CN103118005A (en) * 2013-01-04 2013-05-22 中国兵器工业集团第二一四研究所苏州研发中心 High-level data link control (HDLC) protocol controller
DE102013227059A1 (en) * 2013-12-23 2015-06-25 Robert Bosch Gmbh METHOD FOR DETERMINISTIC DATA TRANSMISSION IN A BUS SYSTEM AND BUS SYSTEM
CN110134365B (en) * 2019-05-21 2022-10-11 合肥工业大学 Method and device for reading FIFO (first in first out) in parallel by multiple channels
CN111343106B (en) * 2020-02-25 2023-03-24 母国标 Multi-channel intermediate frequency digital signal processing device and method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1249876A (en) * 1997-12-31 2000-04-05 阿尔卡塔尔公司 Subscriber card, subscriber connecting unit and relay centre for concentrating internet frames
WO2002073910A1 (en) * 2001-03-12 2002-09-19 Qualcomm Incorporated Method and apparatus for providing multiple quality of service levels in a wireless packet data services connection
US20020141371A1 (en) * 2001-03-28 2002-10-03 Hsu Raymond T. Method and apparatus for transmission framing in a wireless communication system
WO2003005794A1 (en) * 2001-07-12 2003-01-23 Telefonaktiebolaget Lm Ericsson Multi-channel hdlc controller
CN1464671A (en) * 2002-06-13 2003-12-31 深圳市中兴通讯股份有限公司 Apparatus and method for implementing optical monitoring channel of dense wavelength division multiplex system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1249876A (en) * 1997-12-31 2000-04-05 阿尔卡塔尔公司 Subscriber card, subscriber connecting unit and relay centre for concentrating internet frames
WO2002073910A1 (en) * 2001-03-12 2002-09-19 Qualcomm Incorporated Method and apparatus for providing multiple quality of service levels in a wireless packet data services connection
US20020141371A1 (en) * 2001-03-28 2002-10-03 Hsu Raymond T. Method and apparatus for transmission framing in a wireless communication system
WO2003005794A1 (en) * 2001-07-12 2003-01-23 Telefonaktiebolaget Lm Ericsson Multi-channel hdlc controller
CN1464671A (en) * 2002-06-13 2003-12-31 深圳市中兴通讯股份有限公司 Apparatus and method for implementing optical monitoring channel of dense wavelength division multiplex system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
低功耗RS-485总线HDLC控制器的ASIC设计. 刘振宇,陈禾,韩月秋.微电子学,第32卷第6期. 2002 *

Also Published As

Publication number Publication date
CN1994002A (en) 2007-07-04
WO2006012771A1 (en) 2006-02-09

Similar Documents

Publication Publication Date Title
KR100560761B1 (en) Interface conversion system and method
EP1428131B1 (en) Multiple channel interface for communications between devices
CN101504633B (en) Multi-channel DMA controller
CN100471156C (en) Data bus bridge and its working method
US20040107265A1 (en) Shared memory data transfer apparatus
CN113961494B (en) Bridging system of PCIE bus and AXI bus
WO2002079971A1 (en) Programmable cpu/interface buffer structure using dual port ram
US20020184453A1 (en) Data bus system including posted reads and writes
CN115543877B (en) PCIE data transmission method and related device
CN1819554B (en) Data processing system and data interfacing method thereof
TWI423119B (en) Externally-connected audio apparatus and method for processing audio signal thereof
WO2001024015A2 (en) Asynchronous centralized multi-channel dma controller
CN100446578C (en) A Multi-Channel Advanced Data Link Controller
KR100476895B1 (en) Interface device having variable data transfer mode and operating method thereof
CN118550857B (en) Data transmission method, device, electronic device and storage medium
US11169947B2 (en) Data transmission system capable of transmitting a great amount of data
CN219916336U (en) LPC interface to AXI bus protocol bridge
CN116776781A (en) A management method, system, device and storage medium for register parameters
CN100477608C (en) Method for increasing transmitting and receiving efficiency of embedded Ethernet controller
KR101345437B1 (en) Interfacing apparatus and method for communication between chips
CN100514971C (en) IP nuclear interface standardizing method
CN116775524B (en) Lli dynamic writing method of dma linked list mode
KR100778476B1 (en) Communication interface inverter and method
JP2017004092A (en) Serial communication system between integrated circuits
CN119759828A (en) Bus data transmission method and bus for connecting CPLD and FPGA

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
C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20151030

Address after: Dameisha Yantian District of Shenzhen City, Guangdong province 518085 Building No. 1

Patentee after: SANECHIPS TECHNOLOGY Co.,Ltd.

Address before: 518000 Zhongxing building, science and technology south road, Nanshan District hi tech Industrial Park, Guangdong, Shenzhen

Patentee before: ZTE Corp.

EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20070704

Assignee: Xi'an Chris Semiconductor Technology Co.,Ltd.

Assignor: SANECHIPS TECHNOLOGY Co.,Ltd.

Contract record no.: 2019440020036

Denomination of invention: Multi-channel high-grade data link controller

Granted publication date: 20081224

License type: Common License

Record date: 20190619

CX01 Expiry of patent term
CX01 Expiry of patent term

Granted publication date: 20081224