[go: up one dir, main page]

CN105573951A - AHB interface system for stream data transmission - Google Patents

AHB interface system for stream data transmission Download PDF

Info

Publication number
CN105573951A
CN105573951A CN201510990127.7A CN201510990127A CN105573951A CN 105573951 A CN105573951 A CN 105573951A CN 201510990127 A CN201510990127 A CN 201510990127A CN 105573951 A CN105573951 A CN 105573951A
Authority
CN
China
Prior art keywords
module
transmission
slave
ahb bus
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510990127.7A
Other languages
Chinese (zh)
Other versions
CN105573951B (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.)
Harbin University of Science and Technology
Original Assignee
Harbin University of Science and Technology
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 Harbin University of Science and Technology filed Critical Harbin University of Science and Technology
Priority to CN201510990127.7A priority Critical patent/CN105573951B/en
Publication of CN105573951A publication Critical patent/CN105573951A/en
Application granted granted Critical
Publication of CN105573951B publication Critical patent/CN105573951B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Communication Control (AREA)

Abstract

一种针对数据流传输的AHB总线接口系统,本发明涉及针对数据流传输的AHB总线接口系统。本发明是要解决现有方法未能提供一种通用接口而导致IP模块不能与SOC的片上总线相匹配的问题,而提供了一种针对数据流传输的AHB总线接口系统。一种针对数据流传输的AHB总线接口系统,它包括:主控制模块、寄存器组模块、译码控制模块、异常检测模块、突发传输监控模块、提前终止判断模块、分块传输处理模块、Rd_FIFO模块即读FIFO模块和Wr_FIFO模块即写FIFO模块。本发明应用于集成电路领域。

An AHB bus interface system aimed at data stream transmission, the invention relates to an AHB bus interface system aimed at data stream transmission. The invention aims to solve the problem that the IP module cannot match the on-chip bus of the SOC because the existing method fails to provide a general interface, and provides an AHB bus interface system for data stream transmission. An AHB bus interface system for data stream transmission, which includes: a main control module, a register group module, a decoding control module, an abnormality detection module, a burst transmission monitoring module, an early termination judgment module, a block transmission processing module, and Rd_FIFO The module is the read FIFO module and the Wr_FIFO module is the write FIFO module. The invention is applied to the field of integrated circuits.

Description

一种针对数据流传输的AHB总线接口系统An AHB bus interface system for data stream transmission

技术领域technical field

本发明涉及针对数据流传输的AHB总线接口系统。The invention relates to an AHB bus interface system for data flow transmission.

背景技术Background technique

随着集成电路技术的日益发展,SOC(SystemOnChip,片上系统)逐渐成为IC设计关注的焦点。SOC设计主要有两种方式:一种是以功能设计为基础,即按要求对模块进行功能划分与设计实现,再集成到一个系统;一种是以组装设计为基础,即由复用IP构成设计系统。目前,第二种设计方式逐渐成为主流,该种方法可实现更大的规模、更简便的操作等优势,更符合SOC的设计需求。With the development of integrated circuit technology, SOC (System On Chip, System on Chip) has gradually become the focus of IC design. There are two main methods of SOC design: one is based on functional design, that is, the modules are divided and designed according to requirements, and then integrated into a system; the other is based on assembly design, that is, composed of multiplexed IP design system. At present, the second design method has gradually become the mainstream. This method can achieve advantages such as larger scale and easier operation, and is more in line with the design requirements of SOC.

基于IP复用的SOC系统设计最关键的问题在于IP接口,由于IP模块是由第三方提供,并不能保证与SOC的片上总线相匹配,因此,一种通用接口标准的设计规范成为解决该问题的核心。目前片上应用较多的总线主要是AMBA系列总线、AVALON总线、IBMCoreConnect总线、OCP总线等,不同的总线各有其特点及适用领域。The most critical problem in the design of SOC system based on IP multiplexing is the IP interface. Since the IP module is provided by a third party, it cannot be guaranteed to match the on-chip bus of the SOC. Therefore, a design specification for a general interface standard has become a solution to this problem. Core. At present, the buses that are widely used on the chip are mainly AMBA series bus, AVALON bus, IBMCoreConnect bus, OCP bus, etc. Different buses have their own characteristics and applicable fields.

发明内容Contents of the invention

本发明是要解决现有方法未能提供一种通用接口而导致IP模块不能与SOC的片上总线相匹配的问题,而提供了一种针对数据流传输的AHB总线接口系统。The invention aims to solve the problem that the IP module cannot match the on-chip bus of the SOC because the existing method fails to provide a general interface, and provides an AHB bus interface system for data stream transmission.

一种针对数据流传输的AHB总线接口系统,它包括:An AHB bus interface system for data stream transmission, which includes:

主控制模块、寄存器组模块、译码控制模块、异常检测模块、突发传输监控模块、提前终止判断模块、分块传输处理模块、Rd_FIFO模块即读FIFO模块和Wr_FIFO模块即写FIFO模块;Main control module, register group module, decoding control module, anomaly detection module, burst transmission monitoring module, early termination judgment module, block transmission processing module, Rd_FIFO module is read FIFO module and Wr_FIFO module is write FIFO module;

其中,所述主控制模块向各模块发送控制信号,协调各模块之间的通信及与AHB总线的通信;Wherein, the main control module sends control signals to each module, coordinates the communication between each module and the communication with the AHB bus;

其中,所述寄存器组模块是由一系列供AHB总线读写的寄存器构成,用于存储AHB总线传输所需的数据;Wherein, the register group module is composed of a series of registers for AHB bus to read and write, and is used to store the data required for AHB bus transmission;

其中,所述译码控制模块将主控制模块发出的读写请求及地址信息进行译码,控制寄存器组模块的数据存取;Wherein, the decoding control module decodes the read-write request and address information sent by the main control module, and controls the data access of the register group module;

其中,所述异常检测模块检测FIFO状态,判断从机是否满足传输要求,通过对Rd_FIFO模块、Wr_FIFO模块的状态及AHB总线的读写信号进行监控,指示目前的传输是否符合读写要求;Wherein, the abnormal detection module detects the FIFO state, judges whether the slave meets the transmission requirements, monitors the state of the Rd_FIFO module, the Wr_FIFO module and the read and write signals of the AHB bus, and indicates whether the current transmission meets the read and write requirements;

其中,所述突发传输监控模块记录每一次突发传输的数据个数,作为判断突发是否提前终止或突发传输完成的依据;Wherein, the burst transmission monitoring module records the number of data of each burst transmission as a basis for judging whether the burst is terminated in advance or the burst transmission is completed;

其中,所述提前终止判断模块检测突发传输是否被迫终止,主机未完成传输失去对AHB总线的占有,AHB总线交由其他主机使用时,根据提前终止判断模块的判断结果,从机停止传输数据或与其他主机建立通信;Wherein, the early termination judging module detects whether the burst transmission is forced to be terminated, the host loses the possession of the AHB bus if the transmission is not completed, and when the AHB bus is handed over to other masters for use, according to the judging result of the early termination judging module, the slave stops the transmission data or establish communications with other hosts;

其中,所述分块传输处理模块检测从机是否有能力对该主机进行一次分块传输,并通知主控制模块向AHB总线发送请求完成分块传输的信号,主机才能继续控制AHB总线。Wherein, the block transfer processing module detects whether the slave machine has the ability to perform a block transfer to the master, and notifies the master control module to send a signal requesting to complete the block transfer to the AHB bus, so that the master can continue to control the AHB bus.

发明效果:Invention effect:

本发明是针对ARM公司开发的AMBA系列总线中AHB(AdvancedHigh-performanceBus)总线而开发,AHB总线是为高性能、高时钟频率模块而设计的总线标准,主要用于总线主机、片上存储模块、带FIFO(Firstinputfirstoutput,先入先出队列)接口的外设等高速模块。本发明即是基于AHB总线高性能数据传输的一种简便实现方式,采用FIFO作为总线与从机进行数据传输的桥梁,简化了从机与总线通信所面对的接口及时序问题,可作为一种通用的AHB总线数据流传输的方法,并且该方法也适用于支持分块传输的从机。The present invention is developed aiming at the AHB (Advanced High-performance Bus) bus in the AMBA series bus developed by ARM company. The AHB bus is a bus standard designed for high performance and high clock frequency modules, and is mainly used for bus hosts, on-chip storage modules, belt High-speed modules such as peripherals of the FIFO (First in first output, first in first out queue) interface. The present invention is a simple and convenient implementation of high-performance data transmission based on the AHB bus. FIFO is used as a bridge for data transmission between the bus and the slave, which simplifies the interface and timing problems faced by the slave and the bus communication. It can be used as a A general AHB bus data stream transmission method, and this method is also applicable to slaves that support block transfer.

本系统的主要目的是针对AHB总线的从机设计一种规范、方便的接口,该接口能够满足AHB总线协议的时序要求,并且具有一定的通用性,在处理数据流传输方面尤为适宜。The main purpose of this system is to design a standardized and convenient interface for the AHB bus slave. This interface can meet the timing requirements of the AHB bus protocol and has certain versatility. It is especially suitable for processing data stream transmission.

本系统的设计方案选择FIFO作为数据传输的通用接口,FIFO具有时序简单、信号少、可配置性强等优点,简化了挂载在AHB总线上的用户模块的接口设计。The design scheme of this system chooses FIFO as the general interface for data transmission. FIFO has the advantages of simple timing, less signals, and strong configurability, which simplifies the interface design of the user module mounted on the AHB bus.

附图说明Description of drawings

图1是对主机从机的通信机制说明图;Figure 1 is a diagram illustrating the communication mechanism of the host and slave;

图2是本发明对从机系统的工作示意图;Fig. 2 is the working schematic diagram of the present invention to slave system;

图3是本发明是对从机接口的设计结构图;Fig. 3 is that the present invention is the design structural diagram to slave machine interface;

图4是对从机接口结构图中的主控制模块的设计图。Fig. 4 is a design diagram of the main control module in the slave machine interface structure diagram.

具体实施方式detailed description

具体实施方式一:如图1所示,AHB总线协议是基于中央多路选择器互联方案设计而成,互联模块包括主机、从机、仲裁器、译码器,该系统的结构示意图如图1所示。AHB总线支持多主机多从机的通信方式。由仲裁器判定获得AHB总线所有权的主机,并通过控制多路选择器向从机发送控制信号及写入数据。译码器决定某一个从机数据有效,并通过多路选择器将有效数据向主机发送。Specific implementation mode 1: As shown in Figure 1, the AHB bus protocol is designed based on the central multiplexer interconnection scheme, and the interconnection modules include a master, a slave, an arbiter, and a decoder. The structural diagram of the system is shown in Figure 1 shown. The AHB bus supports the communication mode of multi-master and multi-slave. The arbiter determines the master that has obtained the ownership of the AHB bus, and sends control signals and writes data to the slave by controlling the multiplexer. The decoder determines that a certain slave data is valid, and sends the valid data to the master through the multiplexer.

如图2所示,对本设计中从机系统说明的示意图,选择FIFO作为数据传输的通用接口。总线通过发送控制信号选择该从机及与从机间传输的方式。Rd_FIFO向部分寄存器写入数据,若该次传输为读传输,则总线读取这些寄存器中存储的数据;Wr_FIFO读取部分寄存器中的数据,若该次传输为写传输,则总线将数据写入这些寄存器中。用户模块可以仅通过读取FIFO中的状态,控制相应FIFO的信号,实现数据的读入与写出,简化了从机与AHB总线的接口关系。As shown in Figure 2, for the schematic diagram of the slave system description in this design, FIFO is selected as the general interface for data transmission. The bus selects the slave and the transmission mode between the slave and the slave by sending control signals. Rd_FIFO writes data to some registers, if the transfer is a read transfer, the bus reads the data stored in these registers; Wr_FIFO reads the data in some registers, if the transfer is a write transfer, the bus writes the data in these registers. The user module can only read the state in the FIFO, control the signal of the corresponding FIFO, and realize the reading and writing of data, which simplifies the interface relationship between the slave and the AHB bus.

如图3所示,一种针对数据流传输的AHB总线接口系统,它包括主控制模块、寄存器组模块、译码控制模块、异常检测模块、突发传输监控模块、提前终止判断模块、分块传输处理模块、Rd_FIFO模块即读FIFO模块和Wr_FIFO模块即写FIFO模块;As shown in Figure 3, an AHB bus interface system for data stream transmission includes a main control module, a register group module, a decoding control module, an abnormality detection module, a burst transmission monitoring module, an early termination judgment module, and a block The transmission processing module, the Rd_FIFO module is the read FIFO module and the Wr_FIFO module is the write FIFO module;

其中,所述主控制模块向各模块发送控制信号,协调各模块之间的通信及与AHB总线的通信;Wherein, the main control module sends control signals to each module, coordinates the communication between each module and the communication with the AHB bus;

其中,所述寄存器组模块是由一系列供AHB总线读写的寄存器构成,用于存储AHB总线传输所需的数据;Wherein, the register group module is composed of a series of registers for AHB bus to read and write, and is used to store the data required for AHB bus transmission;

其中,所述译码控制模块将主控制模块发出的读写请求及地址信息进行译码,控制寄存器组模块的数据存取;Wherein, the decoding control module decodes the read-write request and address information sent by the main control module, and controls the data access of the register group module;

其中,所述异常检测模块检测FIFO状态,判断从机是否满足传输要求,通过对Rd_FIFO模块、Wr_FIFO模块的状态及AHB总线的读写信号进行监控,指示目前的传输是否符合读写要求;Wherein, the abnormal detection module detects the FIFO state, judges whether the slave meets the transmission requirements, monitors the state of the Rd_FIFO module, the Wr_FIFO module and the read and write signals of the AHB bus, and indicates whether the current transmission meets the read and write requirements;

其中,所述突发传输监控模块记录每一次突发传输的数据个数,作为判断突发是否提前终止或突发传输完成的依据;Wherein, the burst transmission monitoring module records the number of data of each burst transmission as a basis for judging whether the burst is terminated in advance or the burst transmission is completed;

其中,所述提前终止判断模块检测突发传输是否被迫终止,主机未完成传输失去对AHB总线的占有,AHB总线交由其他主机使用时,根据提前终止判断模块的判断结果,从机停止传输数据或与其他主机建立通信;Wherein, the early termination judging module detects whether the burst transmission is forced to be terminated, the host loses the possession of the AHB bus if the transmission is not completed, and when the AHB bus is handed over to other masters for use, according to the judging result of the early termination judging module, the slave stops the transmission data or establish communications with other hosts;

其中,所述分块传输处理模块对于具有分块传输能力的从机,若从机未准备好传输数据,则某主机与从机的通信被告知需要分块传输,则该主机被挂起,不再控制AHB总线;检测从机是否有能力对该主机进行一次分块传输,并通知主控制模块向AHB总线发送请求完成分块传输的信号,主机才能继续控制AHB总线;Wherein, the block transmission processing module is for a slave with block transfer capability, if the slave is not ready to transmit data, the communication between a certain master and the slave is notified that block transfer is required, and the master is suspended, No longer control the AHB bus; detect whether the slave has the ability to perform a block transmission on the master, and notify the master control module to send a signal to the AHB bus to request the completion of the block transfer, so that the master can continue to control the AHB bus;

其中,所述从机是指任何具有独立功能的用户模块及其接口,其数据的交换直接通过两个FIFO模块即Rd_FIFO模块和Wr_FIFO模块进行,若Wr_FIFO模块非空,则读取Wr_FIFO模块中的数据,若Rd_FIFO模块非满,则用户模块处理后的结果写入Rd_FIFO模块;Wherein, the slave machine refers to any user module and its interface with independent functions, and the exchange of its data is carried out directly through two FIFO modules, that is, the Rd_FIFO module and the Wr_FIFO module. If the Wr_FIFO module is not empty, then read the Data, if the Rd_FIFO module is not full, the result processed by the user module is written into the Rd_FIFO module;

其中,所述Rd_FIFO模块存储用户模块处理完成的数据,其空满状态的信号发送给异常检测模块及用户模块,用户模块根据其是否满来判断是否写入数据,主控制模块控制是否读出其数据给寄存器组模块;Wherein, the Rd_FIFO module stores the data processed by the user module, and the signal of its empty and full state is sent to the abnormal detection module and the user module, and the user module judges whether to write data according to whether it is full, and the main control module controls whether to read its Data to the register bank module;

其中,所述Wr_FIFO模块存储需要用户模块处理的数据,其空满状态的信号发送给异常检测模块及用户模块,用户模块根据其是否空来判断是否读出数据,主控制模块控制其是否写入寄存器组模块的输出数据。Wherein, the Wr_FIFO module stores data that needs to be processed by the user module, and its empty and full state signal is sent to the abnormal detection module and the user module, and the user module judges whether to read data according to whether it is empty, and the main control module controls whether it writes Output data for the register file block.

其中,所述AHB总线向从机发送的控制信号包括:Hsel、HADDR、Hwrite、Htrans、Hsize、Hburst、Hmaster、Hmasterlock,由于信号过多且以上信号具有相同的时序,这里使用Hctrl作为以上控制信号的表示。从机向AHB总线发送的响应信号包括:Hsplit、Hready、Hresp。表1对AHB总线与从机之间接口的控制信号进行简明介绍,后续涉及到AHB总线控制信号便不再解释。Wherein, the control signal sent by the AHB bus to the slave includes: Hsel, HADDR, Hwrite, Htrans, Hsize, Hburst, Hmaster, Hmasterlock, because there are too many signals and the above signals have the same timing, here use Hctrl as the above control signal representation. The response signals sent from the slave to the AHB bus include: Hsplit, Hready, and Hresp. Table 1 briefly introduces the control signals of the interface between the AHB bus and the slave, and will not explain the subsequent AHB bus control signals.

表1.AHB总线控制信号说明Table 1. AHB bus control signal description

首先AHB总线向从机发送控制信号,表明该从机被选中执行数据传输,AHB总线与寄存器组模块进行数据通信,主控制模块根据从机状态与AHB总线发送的控制信息向相应的FIFO发送控制读写的信号,若从机满足通信要求,则主控制模块向AHB总线发送从机准备好的指示,相应的FIFO向寄存器组模块及用户模块读入或写出数据,即可完成一次数据传输,从机发出成功的响应,AHB的时序规定,地址与控制信号要先于数据发送,因此每一个数据对应的控制信息在上一个时钟周期出现。First, the AHB bus sends a control signal to the slave, indicating that the slave is selected to perform data transmission. The AHB bus communicates with the register group module. The main control module sends control to the corresponding FIFO according to the status of the slave and the control information sent by the AHB bus. Read and write signals, if the slave machine meets the communication requirements, the main control module sends the slave machine ready indication to the AHB bus, and the corresponding FIFO reads or writes data to the register group module and the user module, and a data transmission can be completed , the slave sends a successful response. The timing of AHB stipulates that the address and control signals are sent before the data, so the control information corresponding to each data appears in the previous clock cycle.

若从机不满足通信要求,则异常检测模块向主控制模块发送中断请求,请求可分为两种:一种指示当前传输错误,主机传输失败,主机取消剩余传输,并且错误类型存储在寄存器组中,可供主机查看;一种指示分块传输,则主机失去AHB总线使用权,等待从机准备好继续传输后再将其恢复;If the slave does not meet the communication requirements, the abnormal detection module sends an interrupt request to the main control module. The request can be divided into two types: one indicates the current transmission error, the master fails to transmit, the master cancels the remaining transmission, and the error type is stored in the register group In the middle, it can be viewed by the host; if one indicates block transmission, the host loses the right to use the AHB bus, and waits for the slave to be ready to continue the transmission before restoring it;

主控制模块根据异常检测模块判断的结果向AHB总线发送从机响应,若从机发送分块传输信号,则分块传输处理模块对此进行记录,且实时检测从机对该主机的传输是否准备好,若准备好且没有新的传输正在进行,则分块模块向主控制模块发送准备恢复主机未完成的传输,若准备好但是有其他的传输正在进行,则分块模块等待传输结束再发送请求恢复主机传输的信号,主控制模块根据该恢复信号向总线发送完成分块请求信号,随后可继续完成主机剩余数据的传输;The main control module sends a slave response to the AHB bus according to the judgment result of the abnormality detection module. If the slave sends a block transmission signal, the block transmission processing module records this, and detects in real time whether the slave is ready to transmit to the master OK, if it is ready and there is no new transmission in progress, the block module will send to the main control module to prepare to resume the unfinished transmission of the host, if it is ready but there are other transmissions in progress, the block module will wait for the end of the transmission before sending Request to restore the signal transmitted by the host, the main control module sends a block request signal to the bus according to the recovery signal, and then continue to complete the transmission of the remaining data of the host;

在某主机占据总线进行传输时,可能会出现突发提前终止的情况,当trans信号为idle或nonseq时,则表明一次新的传输开始,可根据此信号划分每一次的突发传输,当一次突发传输的数据个数少于burst信号所指明的突发数量,则表示本次传输被提前终止,计数模块对每一次突发传输的数据个数进行记录,提前终止判断模块据此进行判断,并将结果发送至主控制模块,同时主控制模块也需要根据数据量的记录进行时序控制。When a host occupies the bus for transmission, the burst may end prematurely. When the trans signal is idle or nonseq, it indicates that a new transmission starts. Each burst transmission can be divided according to this signal. When a If the number of data transmitted in a burst is less than the number of bursts indicated by the burst signal, it means that the transmission is terminated early, and the counting module records the number of data transmitted in each burst, and the early termination judgment module judges accordingly , and send the result to the main control module, and the main control module also needs to perform timing control according to the records of the data volume.

基于以上的设计思路,如图2所示,描述了接口电路的具体设计方案。在该结构图中,与用户模块连接的信号全部采用usr作为后缀,与总线连接的信号全部采用H作为首字母。Based on the above design ideas, as shown in Figure 2, the specific design scheme of the interface circuit is described. In this structure diagram, all signals connected to the user module use usr as the suffix, and all signals connected to the bus use H as the initial letter.

具体实施方式二:本实施方式与具体实施方式一不同的是:Specific implementation mode two: the difference between this implementation mode and specific implementation mode one is:

图4为系统主控制模块的设计,图中各状态间的跳转条件按标号可在表2中查询。Figure 4 is the design of the main control module of the system. The jump conditions between the states in the figure can be queried in Table 2 according to the labels.

所述主控制模块的输入是AHB总线向从机发送的控制信号及各模块的检测结果,输出为从机的响应及各模块的控制信号;The input of the main control module is the control signal sent by the AHB bus to the slave and the detection results of each module, and the output is the response of the slave and the control signal of each module;

所述主控制模块在idle状态,等待传输;若从机被选择进行传输且传输类型为nonseq且指明读/写且从机准备好,则跳转至trans状态;若从机准备好完成分块传输,则跳转至hsplit状态;若读传输时Rd_FIFO模块与Wr_FIFO模块均为空,或者,写传输时Wr_FIFO模块与Rd_FIFO模块均为满,则跳转至error状态;若读传输时Rd_FIFO模块空且Wr_FIFO模块未空,或者,写传输时Wr_FIFO模块满且Rd_FIFO模块未满,则跳转至split状态;The main control module is in the idle state, waiting for transmission; if the slave is selected for transmission and the transmission type is nonseq and indicates read/write and the slave is ready, then jump to the trans state; if the slave is ready to complete the block For transmission, jump to the hsplit state; if the Rd_FIFO module and the Wr_FIFO module are both empty during the read transmission, or if the Wr_FIFO module and the Rd_FIFO module are both full during the write transmission, then jump to the error state; if the Rd_FIFO module is empty during the read transmission And the Wr_FIFO module is not empty, or the Wr_FIFO module is full and the Rd_FIFO module is not full during the write transmission, then jump to the split state;

所述主控制模块在trans状态进行数据传输,读传输则读取Rd_FIFO模块中的数据,写传输则向Wr_FIFO模块中写入数据;若读传输的过程中,出现Rd_FIFO模块为空但Wr_FIFO模块非空,或者,写传输的过程中,出现Wr_FIFO模块为满且Rd_FIFO模块非满,则跳转至split状态;若读传输过程出现Rd_FIFO模块与Wr_FIFO模块均为空,或者,写传输的过程中,出现Wr_FIFO模块与Rd_FIFO模块均为满,则跳转至error状态;若一次锁定传输的控制信号发送完成,则跳转至wait状态;若传输完成,从机被放弃且非锁定传输,则跳转至idle状态;若传输完成,从机被放弃且从机准备好完成分块传输,则跳转至hsplit状态;Described master control module carries out data transmission in trans state, reads and transmits then reads the data in the Rd_FIFO module, and writes and transmits and then writes data in the Wr_FIFO module; If in the process of reading and transmitting, the Rd_FIFO module appears to be empty but the Wr_FIFO module is not Empty, or, during the write transmission process, if the Wr_FIFO module is full and the Rd_FIFO module is not full, then jump to the split state; if the read transmission process shows that both the Rd_FIFO module and the Wr_FIFO module are empty, or, during the write transmission process, If the Wr_FIFO module and the Rd_FIFO module are both full, jump to the error state; if the control signal of a locked transmission is sent, jump to the wait state; if the transmission is completed, the slave is abandoned and the non-locked transmission, then jump Go to the idle state; if the transmission is completed, the slave is abandoned and the slave is ready to complete the block transfer, then jump to the hsplit state;

所述主控制模块在wait状态中,等待从机准备好完成最后一个锁定传输的数据;若从机准备好,则跳转至idle;否则,继续在wait中等待;The main control module is in the wait state, waiting for the slave to be ready to complete the data of the last locked transmission; if the slave is ready, then jump to idle; otherwise, continue to wait in the wait;

所述主控制模块在hsplit状态中,向AHB总线发送完成分块请求的信号Hsplit,只持续一个周期后,即跳转至idle状态;In the hsplit state, the main control module sends a signal Hsplit that completes the block request to the AHB bus, and after only one cycle, it jumps to the idle state;

所述主控制模块在error状态中,向AHB总线发送Hresp为错误的响应,且Hready置低即从机没有准备好,该状态为一个周期,跳转至sec_error状态;In the error state, the main control module sends Hresp to the AHB bus as an error response, and Hready is set low, that is, the slave is not ready, this state is a cycle, and jumps to the sec_error state;

所述主控制模块sec_error状态保持向AHB总线发送Hresp为错误的响应,但Hready置高即从机准备好,该状态持续一个周期,完成错误信号的双周期响应,方便主机取消剩余的传输,跳转至idle状态;The sec_error state of the main control module keeps sending Hresp to the AHB bus as an error response, but Hready is set high to indicate that the slave is ready. This state lasts for one cycle and completes the double-cycle response of the error signal, which is convenient for the host to cancel the remaining transmission. Go to idle state;

所述主控制模块在split状态中,向AHB总线发送Hresp为分块的响应,且Hready置低即从机没有准备好,该信号将执行本次传输的主机挂起,不再控制AHB总线,直到该从机请求完成分块传输后继续进行剩余数据的传输,本状态持续一个周期,跳转至sec_split状态;In the split state, the main control module sends Hresp to the AHB bus as a block response, and Hready is set low, that is, the slave is not ready, and the signal will hang up the host that performs this transmission, and no longer controls the AHB bus. Continue to transmit the remaining data until the slave requests to complete the block transmission. This state lasts for one cycle and jumps to the sec_split state;

所述主控制模块在sec_split状态保持向AHB总线发送Hresp为分块的响应,且Hready置高即从机准备好,该状态持续一个周期,完成分块信号的双周期响应,方便主机取消剩余的传输,跳转至idle状态。The main control module keeps sending Hresp as a block response to the AHB bus in the sec_split state, and Hready is set high to indicate that the slave is ready. This state lasts for one cycle and completes the double-cycle response of the block signal, which is convenient for the host to cancel the remaining Transmit, jump to idle state.

表2.跳转条件说明Table 2. Description of jump conditions

其它步骤及参数与具体实施方式一相同。Other steps and parameters are the same as those in Embodiment 1.

具体实施方式三:本实施方式与具体实施方式一或二不同的是:所述寄存器组模块的输入为AHB总线向从机传输的数据、错误信息、寄存器读使能信号及Rd_FIFO模块发送的待读取数据,输出数据为从机向AHB总线发送的数据及寄存器组模块向Wr_FIFO模块发送的待写入数据;将控制信息定义为从机的error响应,以便主机根据error的类型做出正确的传输;Specific embodiment three: the difference between this embodiment and specific embodiment one or two is: the input of the register group module is the data, error information, register read enable signal and Rd_FIFO module sent by the AHB bus to the slave. Read data, the output data is the data sent by the slave to the AHB bus and the data to be written sent by the register group module to the Wr_FIFO module; the control information is defined as the error response of the slave, so that the host can make the correct response according to the type of error transmission;

所述寄存器组模块根据地址信号控制寄存器组的读写操作:当进行写操作时,地址可作为寄存器组的使能信息,使相应寄存器写入数据;当进行读操作时,地址指明寄存器位置信息,是相应寄存器被读出;The register group module controls the read and write operations of the register group according to the address signal: when performing a write operation, the address can be used as the enable information of the register group, so that the corresponding register can be written into data; when performing a read operation, the address indicates the register location information , the corresponding register is read out;

所述寄存器组的大小根据从机的传输要求及具体数据位宽而定,若AHB总线传输数据位宽大于用户模块数据位宽,则在主机写操作时,需要对数据进行划分,划分为用户模块所需位宽再存储于寄存器组中,在主机读操作时,需要对数据进行拼接处理后,形成AHB总线所需位宽再存储于寄存器组中;反之亦然;在寄存器组中应划分为三部分,一部分存储AHB总线输入数据,一部分存储AHB总线读取数据,一部分存储信息数据。The size of the register group is determined according to the transmission requirements of the slave and the specific data bit width. If the AHB bus transmission data bit width is greater than the user module data bit width, the data needs to be divided into user modules when the host writes. The bit width required by the module is then stored in the register group. When the host reads, the data needs to be spliced to form the required bit width of the AHB bus and then stored in the register group; vice versa; the register group should be divided into It is divided into three parts, one part stores AHB bus input data, one part stores AHB bus read data, and one part stores information data.

其它步骤及参数与具体实施方式一或二相同。Other steps and parameters are the same as those in Embodiment 1 or Embodiment 2.

具体实施方式四:本实施方式与具体实施方式一至三之一不同的是:所述译码控制模块主要功能是将主控模块发出的读写请求及地址信息进行译码,控制寄存器组模块的数据存取;Embodiment 4: This embodiment differs from Embodiment 1 to Embodiment 3 in that the main function of the decoding control module is to decode the read-write request and address information sent by the main control module, and to control the operation of the register group module. data access;

所述译码控制模块的输入为主控模块的读写请求与地址信息,输出为寄存器组模块的读写地址信号;The input of the decoding control module is the read and write request and address information of the main control module, and the output is the read and write address signal of the register group module;

所述译码控制模块对主控模块的地址信息进行译码,对寄存器组模块发出读写地址信号,控制其中相应寄存器的读写操作。The decoding control module decodes the address information of the main control module, sends read and write address signals to the register group module, and controls the read and write operations of the corresponding registers.

其它步骤及参数与具体实施方式一至三之一相同。Other steps and parameters are the same as those in Embodiments 1 to 3.

具体实施方式五:本实施方式与具体实施方式一至四之一不同的是:所述异常检测模块检测从机状态,判断从机是否满足传输要求,通过对Rd_FIFO模块、Wr_FIFO模块的状态及AHB总线的读写信号进行监控,指示目前的传输是否符合读写要求;Specific embodiment five: this embodiment is different from one of specific embodiments one to four: the abnormal detection module detects the state of the slave, judges whether the slave meets the transmission requirements, and checks the state of the Rd_FIFO module, the Wr_FIFO module and the AHB bus The read and write signals are monitored to indicate whether the current transmission meets the read and write requirements;

本模块的输入为Rd_FIFO模块、Wr_FIFO模块的状态,AHB总线控制的读写信号,输出为异常状态指示信号;The input of this module is the state of the Rd_FIFO module and Wr_FIFO module, the read and write signals controlled by the AHB bus, and the output is the abnormal state indication signal;

若AHB总线进行读传输时Rd_FIFO模块与Wr_FIFO模块均为空,或者,AHB总线进行写传输时Wr_FIFO模块与Rd_FIFO模块均为满,则异常检测模块检测为传输错误,并发送至主控制模块,主控制模块接收到此信号有效,则向AHB总线发送错误的响应,终止本次传输;若AHB总线进行读传输时Rd_FIFO模块空且Wr_FIFO模块未空,或者,写传输时Wr_FIFO模块满且Rd_FIFO模块未满,则本模块指示为分块传输,并发送至主控制模块,主控制模块接收到此信号有效,则向AHB总线发送分块的响应,终止本次传输,直到FIFO即Rd_FIFO模块与Wr_FIFO模块状态满足传输条件,再完成其余的传输,分块传输只针对具有分块传输能力的从机而言,若从机不具备分块传输的能力,则此信号无效。If the Rd_FIFO module and the Wr_FIFO module are both empty when the AHB bus is performing read transmission, or the Wr_FIFO module and the Rd_FIFO module are both full when the AHB bus is performing write transmission, the abnormal detection module detects a transmission error and sends it to the main control module. If the control module receives this signal and it is valid, it will send an error response to the AHB bus and terminate this transmission; if the AHB bus is reading and transmitting, the Rd_FIFO module is empty and the Wr_FIFO module is not empty, or the Wr_FIFO module is full and the Rd_FIFO module is not empty during the write transmission. If it is full, the module indicates block transmission and sends it to the main control module. The main control module sends a block response to the AHB bus and terminates this transmission until the FIFO, that is, the Rd_FIFO module and the Wr_FIFO module The status meets the transmission conditions, and then complete the rest of the transmission. The block transfer is only for the slave with the block transfer capability. If the slave does not have the block transfer capability, this signal is invalid.

其它步骤及参数与具体实施方式一至四之一相同。Other steps and parameters are the same as in one of the specific embodiments 1 to 4.

具体实施方式六:本实施方式与具体实施方式一至五之一不同的是:所述突发传输监控模块记录每一次突发传输的数据个数,作为判断突发是否提前终止或突发传输完成的依据;Specific embodiment six: this embodiment is different from one of specific embodiments one to five in that: the burst transmission monitoring module records the number of data transmitted in each burst, as a judgment whether the burst is terminated in advance or the burst transmission is completed basis;

所述突发传输监控模块的输入为部分AHB总线控制信号(包括:Htrans、Hready、Hsel),输出为一次突发数据量记录的结果;The input of the burst transmission monitoring module is a part of the AHB bus control signal (comprising: Htrans, Hready, Hsel), and the output is the result of a burst data volume record;

Hsel作为模块启动的信号,模块通过监控Htrans的类型判断新的传输是否开启,若Htrans的类型为idle或nonseq,则表示新的传输开始,上一次突发传输结束,对数据的记录在下一个周期重现开始,每一次传输的数据都要检测Hready是否置高,即从机准备好后才进行一次有效的数据记录,输出的结果给提前终止判断模块与主控制模块,主控制模块根据该信号向Wr_FIFO模块与Rd_FIFO模块发送读写信号。其它步骤及参数与具体实施方式一至五之一相同。Hsel is used as the signal to start the module. The module judges whether the new transmission is started by monitoring the type of Htrans. If the type of Htrans is idle or nonseq, it means that the new transmission starts, the last burst transmission ends, and the data is recorded in the next cycle. At the beginning of reappearance, every time the transmitted data should be checked whether Hready is set high, that is, a valid data record is performed only after the slave is ready, and the output result is given to the early termination judgment module and the main control module, and the main control module is based on the signal Send read and write signals to the Wr_FIFO module and Rd_FIFO module. Other steps and parameters are the same as one of the specific embodiments 1 to 5.

具体实施方式七:本实施方式与具体实施方式一至六之一不同的是:所述提前终止判断模块检测突发传输是否被迫终止,主机未完成传输就失去对AHB总线的占有,AHB总线交由其他主机使用时,根据此模块的判断结果,从机停止传输数据或与其他主机建立通信;Embodiment 7: This embodiment differs from Embodiments 1 to 6 in that: the early termination judging module detects whether the burst transmission is forced to be terminated, and the host loses the possession of the AHB bus before completing the transmission, and the AHB bus exchanges When used by other hosts, according to the judgment result of this module, the slave stops transmitting data or establishes communication with other hosts;

所述提前终止判断模块的输入为部分AHB总线控制信号(包括:Hburst、Htrans)以及突发传输监控模块的输出结果,输出突发提前终止的判断结果给主控制模块;The input of the early termination judgment module is a part of the AHB bus control signal (comprising: Hburst, Htrans) and the output result of the burst transmission monitoring module, and the judgment result of the early termination of the output burst is given to the main control module;

根据Htrans的类型判断新的传输是否开启,并记录突发传输要求的数据量Hburst,当新的传输开始,比对数据量与计数模块记录的传输量是否一致,若一致,则表示未发生提前终止,否则,表示突发传输被提前终止;主控制模块此时根据Htrans的类型判断从机是否继续传输数据,若提前终止且Htrans类型为idle,则从机停止传输数据,进入等待状态,若提前终止且Htrans类型为nonseq,则从机继续与新的主机进行通信。Determine whether the new transmission is enabled according to the type of Htrans, and record the data volume Hburst required by the burst transmission. When the new transmission starts, compare whether the data volume is consistent with the transmission volume recorded by the counting module. If they are consistent, it means that there is no advance Termination, otherwise, it means that the burst transmission is terminated in advance; the main control module judges whether the slave continues to transmit data according to the type of Htrans at this time, if it is terminated in advance and the Htrans type is idle, the slave stops transmitting data and enters the waiting state, if Early termination and the Htrans type is nonseq, the slave continues to communicate with the new master.

其它步骤及参数与具体实施方式一至六之一相同。Other steps and parameters are the same as one of the specific embodiments 1 to 6.

具体实施方式八:本实施方式与具体实施方式一至七之一不同的是:所述分块传输处理模块对于具有分块传输能力的从机,若从机未准备好传输数据,则某主机与从机的通信被告知需要分块传输,则该主机被挂起,不再控制AHB总线;本模块的功能即是检测从机是否有能力对该主机进行一次分块传输,并通知主控制模块向AHB总线发送请求完成分块传输的信号,主机才能继续控制AHB总线;Embodiment 8: This embodiment is different from one of Embodiments 1 to 7 in that: for a slave with block transfer capability, if the slave is not ready to transmit data, a host and The communication of the slave is told that it needs to transfer in blocks, then the master is suspended and no longer controls the AHB bus; the function of this module is to detect whether the slave has the ability to perform a block transfer on the master, and notify the main control module The host can continue to control the AHB bus by sending a signal requesting to complete the block transfer to the AHB bus;

所述分块传输处理模块的输入为部分AHB总线控制信号(包括:Hmaster、Hwrite)、分块记录信号、Wr_FIFO模块与Rd_FIFO模块的空满信号,输出为分块准备好信号给主控制模块,若该信号有效,主控制模块向AHB总线发出请求完成分块传输的响应;当主机与从机进行传输的过程中,若从机不满足传输条件,则向主机发出分块响应,该主机不再进行通信,等待从机满足传输条件后发出请求完成分块传输;分块传输处理模块记录主控制模块发出的分块记录信号、AHB总线发出的读写信号及主机号,同时检测Wr_FIFO模块与Rd_FIFO模块的空满信号,当两FIFO满足主机需要的传输条件,则向主控制模块发送分块准备好信号,主控制模块接收到此信号后,即在适当的时刻主控制模块接收到此信号后,若从机此时正在进行数据传输则需要等待至传输结束后,向AHB总线发送请求完成分块传输响应,若从机在空闲状态则直接向AHB总线发送请求完成分块传输响应,该响应持续一个时钟周期向AHB总线发出请求完成分块传输的响应,该响应持续一个时钟周期。The input of the block transmission processing module is a part of the AHB bus control signal (comprising: Hmaster, Hwrite), block record signal, Wr_FIFO module and the empty and full signal of the Rd_FIFO module, and the output is a block ready signal to the main control module, If the signal is valid, the main control module sends a response to the AHB bus to request to complete the block transmission; when the master and the slave are in the process of transmitting, if the slave does not meet the transmission conditions, it sends a block response to the master, and the master does not Communicate again, wait for the slave to meet the transmission conditions and send a request to complete the block transmission; the block transmission processing module records the block record signal sent by the main control module, the read and write signal sent by the AHB bus and the host number, and simultaneously detects the Wr_FIFO module and The empty and full signal of the Rd_FIFO module, when the two FIFOs meet the transmission conditions required by the host, send a block ready signal to the main control module. After the main control module receives this signal, the main control module receives this signal at an appropriate time Finally, if the slave is transmitting data at this time, it needs to wait until the end of the transmission, and then send a request to the AHB bus to complete the block transfer response. If the slave is in an idle state, it will directly send a request to the AHB bus to complete the block transfer response. The response lasts for one clock cycle and sends a response to the AHB bus to request the completion of the block transfer, which lasts for one clock cycle.

其它步骤及参数与具体实施方式一至七之一相同。Other steps and parameters are the same as one of the specific embodiments 1 to 7.

Claims (8)

1.一种针对数据流传输的AHB总线接口系统,其特征在于它包括:1. a kind of AHB bus interface system for data flow transmission, it is characterized in that it comprises: 主控制模块、寄存器组模块、译码控制模块、异常检测模块、突发传输监控模块、提前终止判断模块、分块传输处理模块、Rd_FIFO模块即读FIFO模块和Wr_FIFO模块即写FIFO模块;Main control module, register group module, decoding control module, anomaly detection module, burst transmission monitoring module, early termination judgment module, block transmission processing module, Rd_FIFO module is read FIFO module and Wr_FIFO module is write FIFO module; 其中,所述主控制模块向各模块发送控制信号,协调各模块之间的通信及与AHB总线的通信;Wherein, the main control module sends control signals to each module, coordinates the communication between each module and the communication with the AHB bus; 其中,所述寄存器组模块是由一系列供AHB总线读写的寄存器构成,用于存储AHB总线传输所需的数据;Wherein, the register group module is composed of a series of registers for AHB bus to read and write, and is used to store the data required for AHB bus transmission; 其中,所述译码控制模块将主控制模块发出的读写请求及地址信息进行译码,控制寄存器组模块的数据存取;Wherein, the decoding control module decodes the read-write request and address information sent by the main control module, and controls the data access of the register group module; 其中,所述异常检测模块检测FIFO状态,判断从机是否满足传输要求,通过对Rd_FIFO模块、Wr_FIFO模块的状态及AHB总线的读写信号进行监控,指示目前的传输是否符合读写要求;Wherein, the abnormal detection module detects the FIFO state, judges whether the slave meets the transmission requirements, monitors the state of the Rd_FIFO module, the Wr_FIFO module and the read and write signals of the AHB bus, and indicates whether the current transmission meets the read and write requirements; 其中,所述突发传输监控模块记录每一次突发传输的数据个数,作为判断突发是否提前终止或突发传输完成的依据;Wherein, the burst transmission monitoring module records the number of data of each burst transmission as a basis for judging whether the burst is terminated in advance or the burst transmission is completed; 其中,所述提前终止判断模块检测突发传输是否被迫终止,主机未完成传输失去对AHB总线的占有,AHB总线交由其他主机使用时,根据提前终止判断模块的判断结果,从机停止传输数据或与其他主机建立通信;Wherein, the early termination judging module detects whether the burst transmission is forced to be terminated, the host loses the possession of the AHB bus if the transmission is not completed, and when the AHB bus is handed over to other masters for use, according to the judging result of the early termination judging module, the slave stops the transmission data or establish communications with other hosts; 其中,所述分块传输处理模块检测从机是否有能力对该主机进行一次分块传输,并通知主控制模块向AHB总线发送请求完成分块传输的信号,主机才能继续控制AHB总线。Wherein, the block transfer processing module detects whether the slave machine has the ability to perform a block transfer to the master, and notifies the master control module to send a signal requesting to complete the block transfer to the AHB bus, so that the master can continue to control the AHB bus. 2.根据权利要求1所述的一种针对数据流传输的AHB总线接口系统,其特征在于:2. a kind of AHB bus interface system for data flow transmission according to claim 1, is characterized in that: 所述主控制模块的输入是AHB总线向从机发送的控制信号及各模块的检测结果,输出为从机的响应及各模块的控制信号;The input of the main control module is the control signal sent by the AHB bus to the slave and the detection results of each module, and the output is the response of the slave and the control signal of each module; 所述主控制模块在idle状态,等待传输;若从机被选择进行传输且传输类型为nonseq且指明读/写且从机准备好,则跳转至trans状态;若从机准备好完成分块传输,则跳转至hsplit状态;若读传输时Rd_FIFO模块与Wr_FIFO模块均为空,或者,写传输时Wr_FIFO模块与Rd_FIFO模块均为满,则跳转至error状态;若读传输时Rd_FIFO模块空且Wr_FIFO模块未空,或者,写传输时Wr_FIFO模块满且Rd_FIFO模块未满,则跳转至split状态;The main control module is in the idle state, waiting for transmission; if the slave is selected for transmission and the transmission type is nonseq and indicates read/write and the slave is ready, then jump to the trans state; if the slave is ready to complete the block For transmission, jump to the hsplit state; if the Rd_FIFO module and the Wr_FIFO module are both empty during the read transmission, or if the Wr_FIFO module and the Rd_FIFO module are both full during the write transmission, then jump to the error state; if the Rd_FIFO module is empty during the read transmission And the Wr_FIFO module is not empty, or the Wr_FIFO module is full and the Rd_FIFO module is not full during the write transmission, then jump to the split state; 所述主控制模块在trans状态进行数据传输,读传输则读取Rd_FIFO模块中的数据,写传输则向Wr_FIFO模块中写入数据;若读传输的过程中,出现Rd_FIFO模块为空但Wr_FIFO模块非空,或者,写传输的过程中,出现Wr_FIFO模块为满且Rd_FIFO模块非满,则跳转至split状态;若读传输过程出现Rd_FIFO模块与Wr_FIFO模块均为空,或者,写传输的过程中,出现Wr_FIFO模块与Rd_FIFO模块均为满,则跳转至error状态;若一次锁定传输的控制信号发送完成,则跳转至wait状态;若传输完成,从机被放弃且非锁定传输,则跳转至idle状态;若传输完成,从机被放弃且从机准备好完成分块传输,则跳转至hsplit状态;Described master control module carries out data transmission in trans state, reads and transmits then reads the data in the Rd_FIFO module, and writes and transmits and then writes data in the Wr_FIFO module; If in the process of reading and transmitting, the Rd_FIFO module appears to be empty but the Wr_FIFO module is not Empty, or, during the write transmission process, if the Wr_FIFO module is full and the Rd_FIFO module is not full, then jump to the split state; if the read transmission process shows that both the Rd_FIFO module and the Wr_FIFO module are empty, or, during the write transmission process, If the Wr_FIFO module and the Rd_FIFO module are both full, jump to the error state; if the control signal of a locked transmission is sent, jump to the wait state; if the transmission is completed, the slave is abandoned and the non-locked transmission, then jump Go to the idle state; if the transmission is completed, the slave is abandoned and the slave is ready to complete the block transfer, then jump to the hsplit state; 所述主控制模块在wait状态中,等待从机准备好完成最后一个锁定传输的数据;若从机准备好,则跳转至idle;否则,继续在wait中等待;The main control module is in the wait state, waiting for the slave to be ready to complete the data of the last locked transmission; if the slave is ready, then jump to idle; otherwise, continue to wait in the wait; 所述主控制模块在hsplit状态中,向AHB总线发送完成分块请求的信号Hsplit,只持续一个周期后,即跳转至idle状态;In the hsplit state, the main control module sends a signal Hsplit that completes the block request to the AHB bus, and after only one cycle, it jumps to the idle state; 所述主控制模块在error状态中,向AHB总线发送Hresp为错误的响应,且Hready置低即从机没有准备好,该状态为一个周期,跳转至sec_error状态;In the error state, the main control module sends Hresp to the AHB bus as an error response, and Hready is set low, that is, the slave is not ready, this state is a cycle, and jumps to the sec_error state; 所述主控制模块sec_error状态保持向AHB总线发送Hresp为错误的响应,但Hready置高即从机准备好,该状态持续一个周期,完成错误信号的双周期响应,方便主机取消剩余的传输,跳转至idle状态;The sec_error state of the main control module keeps sending Hresp to the AHB bus as an error response, but Hready is set high to indicate that the slave is ready. This state lasts for one cycle and completes the double-cycle response of the error signal, which is convenient for the host to cancel the remaining transmission. Go to idle state; 所述主控制模块在split状态中,向AHB总线发送Hresp为分块的响应,且Hready置低即从机没有准备好,该信号将执行本次传输的主机挂起,不再控制AHB总线,直到该从机请求完成分块传输后继续进行剩余数据的传输,本状态持续一个周期,跳转至sec_split状态;In the split state, the main control module sends Hresp to the AHB bus as a block response, and Hready is set low, that is, the slave is not ready, and the signal will hang up the host that performs this transmission, and no longer controls the AHB bus. Continue to transmit the remaining data until the slave requests to complete the block transmission. This state lasts for one cycle and jumps to the sec_split state; 所述主控制模块在sec_split状态保持向AHB总线发送Hresp为分块的响应,且Hready置高即从机准备好,该状态持续一个周期,完成分块信号的双周期响应,方便主机取消剩余的传输,跳转至idle状态。The main control module keeps sending Hresp as a block response to the AHB bus in the sec_split state, and Hready is set high to indicate that the slave is ready. This state lasts for one cycle and completes the double-cycle response of the block signal, which is convenient for the host to cancel the remaining Transmit, jump to idle state. 3.根据权利要求1所述的一种针对数据流传输的AHB总线接口系统,其特征在于:3. a kind of AHB bus interface system for data stream transmission according to claim 1, is characterized in that: 所述寄存器组模块的输入为AHB总线向从机传输的数据、错误信息、寄存器读使能信号及Rd_FIFO模块发送的待读取数据,输出数据为从机向AHB总线发送的数据及寄存器组模块向Wr_FIFO模块发送的待写入数据;将控制信息定义为从机的error响应,以便主机根据error的类型做出正确的传输;The input of the register group module is the data to be read sent by the AHB bus to the slave, error information, register read enable signal and Rd_FIFO module, and the output data is the data and the register group module sent by the slave to the AHB bus The data to be written sent to the Wr_FIFO module; the control information is defined as the error response of the slave, so that the host can make correct transmission according to the type of error; 所述寄存器组模块根据地址信号控制寄存器组的读写操作:当进行写操作时,地址可作为寄存器组的使能信息,使相应寄存器写入数据;当进行读操作时,地址指明寄存器位置信息,是相应寄存器被读出;The register group module controls the read and write operations of the register group according to the address signal: when performing a write operation, the address can be used as the enable information of the register group, so that the corresponding register can be written into data; when performing a read operation, the address indicates the register location information , the corresponding register is read out; 所述寄存器组的大小根据从机的传输要求及具体数据位宽而定,若AHB总线传输数据位宽大于用户模块电路数据位宽,则在主机写操作时,需要对数据进行划分,划分为用户模块所需位宽再存储于寄存器组中,在主机读操作时,需要对数据进行拼接处理后,形成AHB总线所需位宽再存储于寄存器组中;反之亦然;在寄存器组中应划分为三部分,一部分存储AHB总线输入数据,一部分存储AHB总线读取数据,一部分存储信息数据。The size of the register group is determined according to the transmission requirements of the slave and the specific data bit width. If the AHB bus transmission data bit width is greater than the user module circuit data bit width, the data needs to be divided into The bit width required by the user module is then stored in the register group. When the host reads, the data needs to be spliced to form the required bit width of the AHB bus and then stored in the register group; vice versa; the register group should be Divided into three parts, one part stores AHB bus input data, one part stores AHB bus read data, and one part stores information data. 4.根据权利要求1所述的一种针对数据流传输的AHB总线接口系统,其特征在于:4. a kind of AHB bus interface system for data flow transmission according to claim 1, is characterized in that: 所述译码控制模块主要功能是将主控模块发出的读写请求及地址信息进行译码,控制寄存器组模块的数据存取;The main function of the decoding control module is to decode the read-write request and address information sent by the main control module to control the data access of the register group module; 所述译码控制模块的输入为主控模块的读写请求与地址信息,输出为寄存器组模块的读写地址信号;The input of the decoding control module is the read and write request and address information of the main control module, and the output is the read and write address signal of the register group module; 所述译码控制模块对主控模块的地址信息进行译码,对寄存器组模块发出读写地址信号,控制其中相应寄存器的读写操作。The decoding control module decodes the address information of the main control module, sends read and write address signals to the register group module, and controls the read and write operations of the corresponding registers. 5.根据权利要求1所述的一种针对数据流传输的AHB总线接口系统,其特征在于:5. a kind of AHB bus interface system for data flow transmission according to claim 1, is characterized in that: 所述异常检测模块检测从机状态,判断从机是否满足传输要求,通过对Rd_FIFO模块、Wr_FIFO模块的状态及AHB总线的读写信号进行监控,指示目前的传输是否符合读写要求;The abnormal detection module detects the state of the slave, judges whether the slave meets the transmission requirements, and monitors the state of the Rd_FIFO module, the Wr_FIFO module and the read and write signals of the AHB bus to indicate whether the current transmission meets the read and write requirements; 本模块的输入为Rd_FIFO模块、Wr_FIFO模块的状态,AHB总线控制的读写信号,输出为异常状态指示信号;The input of this module is the state of the Rd_FIFO module and Wr_FIFO module, the read and write signals controlled by the AHB bus, and the output is the abnormal state indication signal; 若AHB总线进行读传输时Rd_FIFO模块与Wr_FIFO模块均为空,或者,AHB总线进行写传输时Wr_FIFO模块与Rd_FIFO模块均为满,则异常检测模块检测为传输错误,并发送至主控制模块,主控制模块接收到此信号有效,则向AHB总线发送错误的响应,终止本次传输;若AHB总线进行读传输时Rd_FIFO模块空且Wr_FIFO模块未空,或者,写传输时Wr_FIFO模块满且Rd_FIFO模块未满,则本模块指示为分块传输,并发送至主控制模块,主控制模块接收到此信号有效,则向AHB总线发送分块的响应,终止本次传输,直到FIFO状态满足传输条件,再完成其余的传输,分块传输只针对具有分块传输能力的从机而言,若从机不具备分块传输的能力,则此信号无效。If the Rd_FIFO module and the Wr_FIFO module are both empty when the AHB bus is performing read transmission, or the Wr_FIFO module and the Rd_FIFO module are both full when the AHB bus is performing write transmission, the abnormal detection module detects a transmission error and sends it to the main control module. If the control module receives this signal and it is valid, it will send an error response to the AHB bus and terminate this transmission; if the AHB bus is reading and transmitting, the Rd_FIFO module is empty and the Wr_FIFO module is not empty, or the Wr_FIFO module is full and the Rd_FIFO module is not empty during the write transmission. If it is full, the module indicates block transmission and sends it to the main control module. The main control module sends a block response to the AHB bus when the signal is valid, and terminates the transmission until the FIFO status meets the transmission conditions. Complete the rest of the transmission, the block transfer is only for the slave with the block transfer capability, if the slave does not have the block transfer capability, this signal is invalid. 6.根据权利要求1所述的一种针对数据流传输的AHB总线接口系统,其特征在于:6. a kind of AHB bus interface system for data flow transmission according to claim 1, is characterized in that: 所述突发传输监控模块记录每一次突发传输的数据个数,作为判断突发是否提前终止或突发传输完成的依据;The burst transmission monitoring module records the number of data transmitted in each burst as a basis for judging whether the burst is terminated in advance or the burst transmission is completed; 所述突发传输监控模块的输入为部分AHB总线控制信号,输出为一次突发数据量记录的结果;The input of the burst transmission monitoring module is a part of the AHB bus control signal, and the output is the result of a burst data volume record; Hsel作为模块启动的信号,模块通过监控Htrans的类型判断新的传输是否开启,若Htrans的类型为idle或nonseq,则表示新的传输开始,上一次突发传输结束,对数据的记录在下一个周期重现开始,每一次传输的数据都要检测Hready是否置高,即从机准备好后才进行一次有效的数据记录,输出的结果给提前终止判断模块与主控制模块,主控制模块根据该信号向Wr_FIFO模块与Rd_FIFO模块发送读写信号。Hsel is used as the signal to start the module. The module judges whether the new transmission is started by monitoring the type of Htrans. If the type of Htrans is idle or nonseq, it means that the new transmission starts, the last burst transmission ends, and the data is recorded in the next cycle. At the beginning of reappearance, every time the transmitted data should be checked whether Hready is set high, that is, a valid data record is performed only after the slave is ready, and the output result is given to the early termination judgment module and the main control module, and the main control module is based on the signal Send read and write signals to the Wr_FIFO module and Rd_FIFO module. 7.根据权利要求1所述的一种针对数据流传输的AHB总线接口系统,其特征在于:7. a kind of AHB bus interface system for data stream transmission according to claim 1, is characterized in that: 所述提前终止判断模块检测突发传输是否被迫终止,主机未完成传输就失去对AHB总线的占有,AHB总线交由其他主机使用时,根据此模块的判断结果,从机停止传输数据或与其他主机建立通信;The early termination judging module detects whether the burst transmission is forced to terminate, and the master loses the possession of the AHB bus before completing the transmission. When the AHB bus is handed over to other masters, according to the judgment result of this module, the slave stops transmitting data or communicates with the AHB bus. Establish communication with other hosts; 所述提前终止判断模块的输入为部分AHB总线控制信号以及突发传输监控模块的输出结果,输出突发提前终止的判断结果给主控制模块;The input of the early termination judgment module is part of the AHB bus control signal and the output result of the burst transmission monitoring module, and the judgment result of the early termination of the output burst is given to the main control module; 根据Htrans的类型判断新的传输是否开启,并记录突发传输要求的数据量Hburst,当新的传输开始,比对数据量与计数模块记录的传输量是否一致,若一致,则表示未发生提前终止,否则,表示突发传输被提前终止;主控制模块此时根据Htrans的类型判断从机是否继续传输数据,若提前终止且Htrans类型为idle,则从机停止传输数据,进入等待状态,若提前终止且Htrans类型为nonseq,则从机继续与新的主机进行通信。Determine whether the new transmission is enabled according to the type of Htrans, and record the data volume Hburst required by the burst transmission. When the new transmission starts, compare whether the data volume is consistent with the transmission volume recorded by the counting module. If they are consistent, it means that there is no advance Termination, otherwise, it means that the burst transmission is terminated in advance; the main control module judges whether the slave continues to transmit data according to the type of Htrans at this time, if it is terminated in advance and the Htrans type is idle, the slave stops transmitting data and enters the waiting state, if Early termination and the Htrans type is nonseq, the slave continues to communicate with the new master. 8.根据权利要求1所述的一种针对数据流传输的AHB总线接口系统,其特征在于:8. a kind of AHB bus interface system for data flow transmission according to claim 1, is characterized in that: 所述分块传输处理模块对于具有分块传输能力的从机,若从机未准备好传输数据,则某主机与从机的通信被告知需要分块传输,则该主机被挂起,不再控制AHB总线;本模块的功能即是检测从机是否有能力对该主机进行一次分块传输,并通知主控制模块向AHB总线发送请求完成分块传输的信号,主机才能继续控制AHB总线;The block transmission processing module has block transfer capability for the slave, if the slave is not ready to transmit data, then the communication between a certain master and the slave is notified that block transmission is required, then the master is suspended, no longer Control the AHB bus; the function of this module is to detect whether the slave has the ability to perform a block transmission on the master, and notify the master control module to send a signal to the AHB bus to complete the block transfer, so that the master can continue to control the AHB bus; 所述分块传输处理模块的输入为部分AHB总线控制信号、分块记录信号、Wr_FIFO模块与Rd_FIFO模块的空满信号,输出为分块准备好信号给主控制模块,若该信号有效,主控制模块向AHB总线发出请求完成分块传输的响应;当主机与从机进行传输的过程中,若从机不满足传输条件,则向主机发出分块响应,该主机不再进行通信,等待从机满足传输条件后发出请求完成分块传输;分块传输处理模块记录主控制模块发出的分块记录信号、AHB总线发出的读写信号及主机号,同时检测Wr_FIFO模块与Rd_FIFO模块的空满信号,当两FIFO满足主机需要的传输条件,则向主控制模块发送分块准备好信号,主控制模块接收到此信号后,即在适当的时刻主控制模块接收到此信号后,若从机此时正在进行数据传输则需要等待至传输结束后,向AHB总线发送请求完成分块传输响应,若从机在空闲状态则直接向AHB总线发送请求完成分块传输响应,该响应持续一个时钟周期向AHB总线发出请求完成分块传输的响应,该响应持续一个时钟周期。The input of the block transmission processing module is part of the AHB bus control signal, the block recording signal, the empty and full signal of the Wr_FIFO module and the Rd_FIFO module, and the output is the block ready signal to the main control module. If the signal is valid, the main control The module sends a request to the AHB bus to complete the block transmission response; when the master and the slave are transmitting, if the slave does not meet the transmission conditions, it will send a block response to the master, and the master will no longer communicate and wait for the slave. After satisfying the transmission conditions, a request is sent to complete the block transmission; the block transmission processing module records the block record signal sent by the main control module, the read and write signal sent by the AHB bus and the host number, and simultaneously detects the empty and full signals of the Wr_FIFO module and the Rd_FIFO module, When the two FIFOs meet the transmission conditions required by the master, they will send a block ready signal to the master control module. After the master control module receives this signal, that is, after the master control module receives this signal at an appropriate time, if the slave In the process of data transmission, you need to wait until the end of the transmission, and send a request to the AHB bus to complete the block transfer response. If the slave is in an idle state, it will directly send a request to the AHB bus to complete the block transfer response. The response lasts for one clock cycle to the AHB The bus issues a response requesting the completion of the block transfer, which lasts for one clock cycle.
CN201510990127.7A 2015-12-24 2015-12-24 A kind of ahb bus interface system for data stream transmitting Expired - Fee Related CN105573951B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510990127.7A CN105573951B (en) 2015-12-24 2015-12-24 A kind of ahb bus interface system for data stream transmitting

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510990127.7A CN105573951B (en) 2015-12-24 2015-12-24 A kind of ahb bus interface system for data stream transmitting

Publications (2)

Publication Number Publication Date
CN105573951A true CN105573951A (en) 2016-05-11
CN105573951B CN105573951B (en) 2018-02-09

Family

ID=55884107

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510990127.7A Expired - Fee Related CN105573951B (en) 2015-12-24 2015-12-24 A kind of ahb bus interface system for data stream transmitting

Country Status (1)

Country Link
CN (1) CN105573951B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106649967A (en) * 2016-10-20 2017-05-10 浙江大华技术股份有限公司 SoC system and retransmission control socket circuit
CN108664333A (en) * 2017-04-01 2018-10-16 厦门鑫忆讯科技有限公司 The message system of system on chip
CN108664334A (en) * 2017-04-01 2018-10-16 厦门鑫忆讯科技有限公司 Message Agent and its method
CN108984442A (en) * 2018-08-14 2018-12-11 珠海市微半导体有限公司 A kind of acceleration-controlled system based on Binarization methods, chip and robot
CN109932963A (en) * 2019-01-29 2019-06-25 中国航空无线电电子研究所 ADS-B system level chip framework based on DSP core
CN111224852A (en) * 2018-11-27 2020-06-02 中车株洲电力机车研究所有限公司 Communication system and communication method for remote IO equipment
CN111625377A (en) * 2017-04-01 2020-09-04 北京忆芯科技有限公司 Agent and method for adding entries to a queue
CN112416823A (en) * 2020-11-15 2021-02-26 珠海市一微半导体有限公司 Sensor data read-write control method, system and chip in burst mode
CN113190400A (en) * 2021-04-19 2021-07-30 思澈科技(上海)有限公司 Bus monitoring module and monitoring method suitable for AHB protocol
CN116627877A (en) * 2023-07-21 2023-08-22 武汉凌久微电子有限公司 On-chip bus state recording system and method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1187031A3 (en) * 2000-09-08 2007-04-25 Texas Instruments Inc. Bus bridge interface system
CN103077141A (en) * 2012-12-26 2013-05-01 西安交通大学 AMBA (Advanced Microcontroller Bus Architecture) bus based self-adaption real-time weighting prior arbitration method and arbitrator
CN103198043A (en) * 2013-01-24 2013-07-10 杭州中科微电子有限公司 Improved AHB-to-APB bus bridge and control method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1187031A3 (en) * 2000-09-08 2007-04-25 Texas Instruments Inc. Bus bridge interface system
CN103077141A (en) * 2012-12-26 2013-05-01 西安交通大学 AMBA (Advanced Microcontroller Bus Architecture) bus based self-adaption real-time weighting prior arbitration method and arbitrator
CN103198043A (en) * 2013-01-24 2013-07-10 杭州中科微电子有限公司 Improved AHB-to-APB bus bridge and control method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李俊等: "基于AHB总线的USB2.0总线接口单元设计", 《电脑知识与技术》 *

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106649967A (en) * 2016-10-20 2017-05-10 浙江大华技术股份有限公司 SoC system and retransmission control socket circuit
CN106649967B (en) * 2016-10-20 2019-12-24 浙江大华技术股份有限公司 SoC system and retransmission control socket circuit
CN108664333A (en) * 2017-04-01 2018-10-16 厦门鑫忆讯科技有限公司 The message system of system on chip
CN108664334A (en) * 2017-04-01 2018-10-16 厦门鑫忆讯科技有限公司 Message Agent and its method
CN111625377A (en) * 2017-04-01 2020-09-04 北京忆芯科技有限公司 Agent and method for adding entries to a queue
CN111625377B (en) * 2017-04-01 2023-11-28 北京忆芯科技有限公司 Agent and method for adding items to queue
CN108664333B (en) * 2017-04-01 2021-11-30 厦门旌存半导体技术有限公司 Message system of system on chip
CN108664334B (en) * 2017-04-01 2021-12-28 厦门旌存半导体技术有限公司 Message broker and method thereof
CN108984442A (en) * 2018-08-14 2018-12-11 珠海市微半导体有限公司 A kind of acceleration-controlled system based on Binarization methods, chip and robot
CN108984442B (en) * 2018-08-14 2023-08-18 珠海一微半导体股份有限公司 Acceleration control system, chip and robot based on binarization algorithm
CN111224852B (en) * 2018-11-27 2022-09-23 中车株洲电力机车研究所有限公司 Communication system and communication method for remote IO equipment
CN111224852A (en) * 2018-11-27 2020-06-02 中车株洲电力机车研究所有限公司 Communication system and communication method for remote IO equipment
CN109932963A (en) * 2019-01-29 2019-06-25 中国航空无线电电子研究所 ADS-B system level chip framework based on DSP core
CN112416823A (en) * 2020-11-15 2021-02-26 珠海市一微半导体有限公司 Sensor data read-write control method, system and chip in burst mode
CN112416823B (en) * 2020-11-15 2024-05-03 珠海一微半导体股份有限公司 Sensor data read-write control method, system and chip in burst mode
CN113190400B (en) * 2021-04-19 2022-11-04 思澈科技(上海)有限公司 Bus monitoring module and monitoring method suitable for AHB protocol
CN113190400A (en) * 2021-04-19 2021-07-30 思澈科技(上海)有限公司 Bus monitoring module and monitoring method suitable for AHB protocol
CN116627877A (en) * 2023-07-21 2023-08-22 武汉凌久微电子有限公司 On-chip bus state recording system and method
CN116627877B (en) * 2023-07-21 2023-09-29 武汉凌久微电子有限公司 On-chip bus state recording system and method

Also Published As

Publication number Publication date
CN105573951B (en) 2018-02-09

Similar Documents

Publication Publication Date Title
CN105573951B (en) A kind of ahb bus interface system for data stream transmitting
CN109032973B (en) ICB bus system
US7275119B2 (en) Early detection and grant, an arbitration scheme for single transfers on AMBA advanced high-performance bus
KR102420530B1 (en) Alternative protocol selection
CN102231129B (en) Multi-layer advanced high-performance bus (AHB) architecture system on chip (SoC) monitoring and debugging system and method based on serial port
US11693813B2 (en) Alternative protocol over physical layer
EP1127318A1 (en) Method and apparatus for an improved interface between computer components
JP2005228311A (en) Bus system based on open core protocol
JP2005235197A (en) Bus system for linking a subsystem including multiple masters to a bus based on an open core protocol
US20070130409A1 (en) System-On-a-Chip mixed bus architecture
US5951667A (en) Method and apparatus for connecting expansion buses to a peripheral component interconnect bus
US9542251B2 (en) Error detection on a low pin count bus
CN116166581A (en) Queue type DMA controller circuit and data transmission method for PCIE bus
US7096290B2 (en) On-chip high speed data interface
CN100517283C (en) Advanced high-performance system bus connection device and advanced high-performance system bus device
CN107729278A (en) A kind of SPI controller and its control method based on AXI bus protocols
US5915103A (en) Method and system for an extensible on silicon bus supporting multiple functional blocks
CN102750254A (en) Bidirectional conversion bridge from high-speed and high-bandwidth AHB (Advanced High Performance Bus) to low-speed and low-bandwidth AHB
US9898358B2 (en) Error response circuit, semiconductor integrated circuit, and data transfer control method
CN117806999A (en) Bit width and channel adjustable on-chip bus
CN1326058C (en) Data transfer control device
US6311248B1 (en) Method and system for optimized data transfers in a mixed 64-bit/32-bit PCI environment
WO2001031460A9 (en) Method and apparatus for an improved interface between computer components
US8127108B2 (en) Apparatus, system and method for prefetching data in bus system
CN101071406A (en) Interface configurable universal series bus controller

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180209

Termination date: 20181224