WO2021259228A1 - Inter-module communication method and system - Google Patents

Inter-module communication method and system Download PDF

Info

Publication number
WO2021259228A1
WO2021259228A1 PCT/CN2021/101411 CN2021101411W WO2021259228A1 WO 2021259228 A1 WO2021259228 A1 WO 2021259228A1 CN 2021101411 W CN2021101411 W CN 2021101411W WO 2021259228 A1 WO2021259228 A1 WO 2021259228A1
Authority
WO
WIPO (PCT)
Prior art keywords
memory
register
data
valid
permission
Prior art date
Application number
PCT/CN2021/101411
Other languages
French (fr)
Chinese (zh)
Inventor
高嘉琪
李远超
蔡权雄
牛昕宇
Original Assignee
深圳鲲云信息科技有限公司
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 深圳鲲云信息科技有限公司 filed Critical 深圳鲲云信息科技有限公司
Publication of WO2021259228A1 publication Critical patent/WO2021259228A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1668Details of memory controller
    • G06F13/1673Details of memory controller using buffers

Definitions

  • the embodiments of the present application relate to communication technology, for example, to an inter-module communication method and system.
  • AXI AdvancedInterface
  • AMBA Advanced MicrocontrollerBusArchitecture
  • ARM Advanced MicrocontrollerBusArchitecture
  • the embodiments of the present application provide an inter-module communication method and system, so as to realize the flexibility of communication data transmission between the modules.
  • the embodiment of the application provides an inter-module communication method.
  • the inter-module communication method is used to control data transmission between a first memory, a second memory, and a register, and the register is connected between the first memory and the second memory.
  • the communication method between modules includes:
  • the first memory receives the first permission signal sent by the register
  • the first memory provides a first valid signal to the register to write the first piece of data into the register
  • the register receives the second permission signal sent by the second memory
  • the register provides a second valid signal to the second memory to write the first segment of data into the second memory.
  • the receiving, by the first memory, the first permission signal sent by the register includes:
  • the register pulls the first permission signal of its uplink permission end high
  • the first permission end of the first memory enters the readable state after receiving the high-level first permission signal sent by the uplink permission end of the register.
  • the providing, by the first memory, a first valid signal to the register to write the first piece of data into the register includes:
  • the first memory pulls the first valid signal of the first valid end of the first memory high
  • the upstream valid end of the register becomes a writable state after receiving the first valid signal of high level and stores the first segment of data.
  • the register receiving the second permission signal sent by the second memory includes:
  • the second memory pulls the second permission signal of its second permission terminal high
  • the downlink permitting end of the register receives the high-level second permitting signal sent by the second permitting end of the second memory.
  • the register providing a second valid signal to the second memory to write the first piece of data into the second memory includes:
  • the register pulls the second valid signal of its downstream valid end high
  • the second valid end of the second memory receives a high-level second valid signal and becomes a writable state and stores the first piece of data.
  • an embodiment of the present application also provides an inter-module communication system.
  • the inter-module communication system includes a first memory, a second memory, and a register, and the register is connected between the first memory and the second memory,
  • the first memory receives the first permission signal sent by the register
  • the first memory provides a first valid signal to the register to write the first piece of data into the register
  • the register receives the second permission signal sent by the second memory
  • the register provides a second valid signal to the second memory to write the first segment of data into the second memory.
  • the register pulls the first permission signal of its uplink permission end high
  • the first permission end of the first memory enters the readable state after receiving the high-level first permission signal sent by the uplink permission end of the register.
  • the first memory pulls the first valid signal of its first valid end high
  • the upstream valid end of the register becomes a writable state after receiving the first valid signal of high level and stores the first segment of data.
  • the second memory pulls the second permission signal of its second permission terminal high
  • the downlink permitting end of the register receives the high-level second permitting signal sent by the second permitting end of the second memory.
  • the register pulls the second valid signal of its downstream valid end high
  • the second valid end of the second memory receives a high-level second valid signal and becomes a writable state and stores the first piece of data.
  • the first memory receives the first permission signal sent by the register; the first memory provides the first valid signal to the register to write the first segment of data into the register; the register receives the second permission signal sent by the second memory; the register Provide the second valid signal to the second memory to write the first segment of data into the second memory, which solves the problem that the communication data transmission between the modules cannot be flexibly suspended at any time, and the flexibility of the communication data transmission between the modules is realized Effect.
  • FIG. 1 is a schematic flowchart of an inter-module communication method provided by Embodiment 1 of the present application;
  • FIG. 2 is a schematic flowchart of a communication method between modules provided in Embodiment 2 of the present application;
  • FIG. 3 is a schematic diagram of the working sequence of the inter-module communication method provided in the second embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of an inter-module communication system provided in Embodiment 3 of this application.
  • Some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowchart describes the steps as sequential processing, many of the steps can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the steps can be rearranged. The processing may be terminated when its operations are completed, but may also have additional steps not included in the drawings. Processing can correspond to methods, functions, procedures, subroutines, subroutines, and so on.
  • first”, “second”, etc. may be used herein to describe various directions, actions, steps or elements, etc., but these directions, actions, steps or elements are not limited by these terms. These terms are only used to distinguish a first direction, action, step or element from another direction, action, step or element.
  • the first memory may be referred to as the second memory, and similarly, the second memory may be referred to as the first memory. Both the first memory and the second memory are memories, but they are not the same memory.
  • the terms “first”, “second”, etc. cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features.
  • first and second may explicitly or implicitly include one or more of the features.
  • a plurality of means at least two, such as two, three, etc., unless otherwise specifically defined.
  • the first embodiment of the present application provides an inter-module communication method.
  • the inter-module communication method is used to control data transmission between a first memory, a second memory and a register, and the register is connected to the first memory. Between the memory and the second memory, the inter-module communication method includes:
  • the first memory receives a first permission signal sent by the register.
  • the first memory provides a first valid signal to the register to write the first segment of data into the register.
  • the first memory when the first memory receives the first permission signal sent by the register, it means that the register is ready to receive the data that needs to be written in the first memory. After the first memory receives the first permission signal sent by the register , The first memory can read the first piece of data. When the first memory provides the first valid signal to the register, it means that the first memory can write the first segment data into the register. After the register receives the first valid signal sent by the first memory, the register can write the first segment data.
  • the first memory When the first memory receives the first permission signal sent by the register and the register also receives the first valid signal sent by the first memory, the first piece of data starts to be written into the register from the first memory.
  • the transmission of the communication will stop immediately.
  • the register receives a second permission signal sent by the second memory.
  • the register provides a second valid signal to the second memory to write the first segment of data into the second memory.
  • step S120 the first piece of data has been written from the first memory into the register, and the first piece of data is stored in the register.
  • the register receives the first permission signal sent by the second memory, it means that the second memory is ready to receive the data that needs to be written in the register.
  • the register can be read The first paragraph of data.
  • the register provides the second valid signal to the second memory, it means that the register can write the first segment of data into the second memory.
  • the second memory receives the second valid signal sent by the register, the second memory can write to the second memory. A piece of data.
  • the register When the register receives the first permission signal sent by the second memory, and at the same time the second memory also receives the second valid signal sent by the register, the first piece of data starts to be written into the second memory from the register.
  • the transmission of the communication will stop immediately. This completes the transfer of the first piece of data from the first memory to the second memory.
  • the first piece of data does not refer to the first piece of data in order, and the first piece of data can be any piece of data in actual communication.
  • the embodiment of the application ensures the accuracy and stability of the data transmission between the modules by changing the transmission interface between the modules to the above-mentioned communication bus format. In addition, if the wiring distance between the modules is too long or the transmission data bit width is too large, it will cause There is a timing error in the data transmission between the modules.
  • the embodiment of the present application also optimizes the timing of the communication bus by adding a register between the first memory and the second memory, and solves the problem of timing errors.
  • the first memory receives the first permission signal sent by the register; the first memory provides the first valid signal to the register to write the first segment of data into the register; the register receives the second permission signal sent by the second memory; the register Provide the second valid signal to the second memory to write the first segment of data into the second memory, which solves the problem that the communication data transmission between the modules cannot be flexibly suspended at any time, and the flexibility of the communication data transmission between the modules is realized Effect.
  • the second embodiment of the present application provides an inter-module communication method.
  • the second embodiment of the present application is described on the basis of the first embodiment of the present application. Data transfer between a memory, a second memory and a register, the register being connected between the first memory and the second memory.
  • the signal is sent only when the clock cycle rises.
  • the first memory includes a first permission end, a first valid end, and a first data end
  • the second memory includes a second permission end, a second valid end, and a first data end.
  • the second data terminal, the register includes the upstream permit terminal, the upstream valid terminal, the upstream data terminal, the downstream permit terminal, the downstream valid terminal and the downstream data terminal.
  • the first memory transmits data to the upstream data terminal of the register through the first data terminal, and the register passes The downlink data terminal transmits the data to the second data terminal of the second memory.
  • the inter-module communication methods include:
  • the register pulls up the first permission signal of its uplink permission end.
  • S220 The first permitting terminal of the first memory enters the readable state after receiving the high-level first permitting signal sent by the uplink permitting terminal of the register.
  • the register when data is not stored in the register, or data can be stored, the register can pull the first permission signal of its uplink permission end from low to high, which means that the register is ready to receive the first permission signal.
  • the data to be written in the memory When the clock cycle is rising, the first permission end of the first memory will receive the high level first permission signal sent by the upstream permission end of the register, and then the first memory will enter the readable state, that is, the first segment can be read data.
  • the first memory pulls the first valid signal of the first valid end of the first memory high.
  • the upstream valid end of the register becomes a writable state after receiving the first valid signal of high level and stores the first piece of data.
  • the first memory can pull the first valid signal of its first valid end from low to high. Ping means that the first memory can write the first segment of data into the register.
  • the upstream valid end of the register will receive the high-level first valid signal sent by the first valid end of the first memory, after which the register enters a writable state, and the first segment of data can be written and stored.
  • the first permitting end of the first memory receives the first permit signal sent by the upstream permitting end of the register, and at the same time the upstream valid end of the register also receives the first valid signal sent by the first valid end of the first memory, the first The segment data starts to be written into the register from the first memory.
  • any signal stops sending that is, when the register stops sending the first permission signal to the first memory or the first memory stops sending the first valid signal to the register, the transmission of the communication will stop immediately.
  • the second memory pulls the second permission signal of its second permission terminal high.
  • the downlink permitting end of the register receives a high-level second permitting signal sent by the second permitting end of the second memory.
  • the first piece of data has been written from the first data end of the first memory into the upstream data end of the register, and the first piece of data is stored in the register.
  • the second memory can pull the second permission signal of its second permission terminal from low level to high level, which means that the second memory is ready to receive the data that needs to be written in the register.
  • the downstream permitting end of the register receives the high-level second permitting signal sent by the second permitting end of the second memory.
  • the register enters the readable state, that is, the second permitting end of the register can be read from the upstream data end. A piece of data is sent to the downstream data terminal.
  • the register pulls the second valid signal of its downstream valid end high.
  • the second valid end of the second memory receives a high-level second valid signal and becomes a writable state and stores the first piece of data.
  • the register can pull the second valid signal of its downstream valid end from low to high, which means that the register The first segment of data can be written into the second memory.
  • the second valid end of the second memory will receive the high-level second valid signal sent by the downstream valid end of the register. After that, the second memory becomes writable and can write and store all Describe the first paragraph of data.
  • the register When the register receives the first permission signal sent by the second memory and the second memory also receives the second valid signal, the first piece of data starts to be written from the register to the second memory.
  • the transmission of the communication will stop immediately. This completes the transfer of the first piece of data from the first memory to the second memory.
  • the first piece of data does not refer to the first piece of data in order, and the first piece of data can be any piece of data in actual communication.
  • the data transmission can be continuous, and the first data, the second data, the third data, and more data can be transmitted through the same method as described above.
  • the embodiment of the application ensures the accuracy and stability of the data transmission between the modules by changing the transmission interface between the modules to the above-mentioned communication bus format. In addition, if the wiring distance between the modules is too long or the transmission data bit width is too large, it will cause There is a timing error in the data transmission between the modules.
  • the embodiment of the present application also optimizes the timing of the communication bus by adding a register between the first memory and the second memory, and solves the problem of timing errors.
  • the first memory receives the first permission signal sent by the register; the first memory provides the first valid signal to the register to write the first segment of data into the register; the register receives the second permission signal sent by the second memory; the register Provide the second valid signal to the second memory to write the first segment of data into the second memory, which solves the problem that the communication data transmission between the modules cannot be flexibly suspended at any time, and the flexibility of the communication data transmission between the modules is realized Effect.
  • the third embodiment of the present application provides an inter-module communication system.
  • the inter-module communication system includes a first memory 100, a second memory 300, and a register 200.
  • the register 200 is connected to the first memory 100 and Between the second storage 300.
  • the first memory 100 receives the first permission signal sent by the register 200; the first memory 100 provides the first valid signal to the register 200 to write the first piece of data into the register 200;
  • the register 200 receives the second permission signal sent by the second memory 300; the register 200 provides a second valid signal to the second memory 300 to write the first piece of data into the second memory 300.
  • the first storage 100 includes a first license port 120, a first valid port 130, and a first data port 110
  • the second storage 300 includes a second license port 320, a second valid port 330, and a second data port 310.
  • the register 200 includes an upstream permit terminal 220, an upstream valid terminal 230, an upstream data terminal 210, a downstream permit terminal 250, a downstream valid terminal 260, and a downstream data terminal 240.
  • the first memory 100 transmits data to the register 200 through the first data terminal 110
  • the register 200 transmits data to the second data terminal 310 of the second memory 300 through the downstream data terminal 240.
  • the register 200 pulls the first permission signal of its upstream permitting terminal 220 high; the first permitting terminal 120 of the first memory 100 receives the upstream permitting terminal 220 of the register 200 to send a high-level first permit After the signal, it enters the readable state.
  • the first memory 100 pulls the first valid signal of its first valid end 130 high; the upstream valid end 230 of the register 200 becomes a writable state after receiving the first valid signal of high level and stores the first valid signal.
  • the second memory 300 pulls the second permission signal of its second permission terminal 320 high; the downlink permission terminal 250 of the register 200 receives the high level first permission signal sent by the second permission terminal 320 of the second memory 300 2.
  • Permission signal The register 200 pulls the second valid signal of its downstream valid end 260 high; the second valid end 330 of the second memory 300 receives a high-level second valid signal and becomes a writable state and stores the first valid signal.
  • the signal is sent only when the clock cycle rises.
  • the register 200 can change the first permission signal of the uplink permission terminal 220 from low. Pulling the level high to a high level means that the register 200 is ready to receive the data that needs to be written in the first memory 100.
  • the first permitting terminal 120 of the first memory 100 will receive the high-level first permitting signal sent by the upstream permitting terminal 220 of the register 200, and then the first memory 100 will enter the readable state, that is, Read the first piece of data.
  • the first memory 100 can pull the first valid signal of its first valid end 130 from low to high. , which means that the first memory 100 can write the first segment of data into the register 200.
  • the upstream valid end 230 of the register 200 will receive the high-level first valid signal sent by the first valid end 130 of the first memory 100, after which the register 200 enters the writable state, which can be written and stored The first paragraph of data.
  • the upstream valid end 230 of the register 200 also receives the first valid end 130 of the first storage 100.
  • the first valid signal occurs, the first segment of data starts to be written from the first memory 100 to the register 200.
  • any signal stops sending that is, when the register 200 stops sending the first permission signal to the first memory 100 or the first memory 100 stops sending the first valid signal to the register 200, the transmission of the communication will stop immediately.
  • the first piece of data has been written from the first data terminal 110 of the first memory 100 into the upstream data terminal 210 of the register 200, and the first piece of data is stored in the register 200.
  • the second memory 300 can pull the second permission signal of the second permission terminal 320 from the low level to the high level, which means that the second memory 300 is ready to receive the data to be written in the register 200.
  • the downstream permitting terminal 250 of the register 200 receives the high-level second permitting signal sent by the second permitting terminal 320 of the second memory 300, and then the register 200 enters the readable state, that is, it can start from the upstream
  • the data terminal 210 reads the first piece of data to the downstream data terminal 240.
  • the register 200 can pull the second valid signal of its downstream valid end 260 from low to high, which means that the register 200 The first piece of data can be written into the second memory 300.
  • the second valid end 330 of the second memory 300 will receive the high-level second valid signal sent by the downstream valid end 260 of the register 200, and then the second memory 300 becomes a writable state. Write and store the first piece of data.
  • the register 200 When the register 200 receives the first permission signal sent by the second memory 300 and the second memory 300 also receives the second valid signal, the first piece of data starts to be written from the register 200 to the second memory 300.
  • the transmission of the communication will stop immediately.
  • the transfer of the first piece of data from the first memory 100 to the second memory 300 is completed.
  • the first piece of data does not refer to the first piece of data in order, and the first piece of data can be any piece of data in actual communication.
  • the embodiment of the application ensures the accuracy and stability of the data transmission between the modules by changing the transmission interface between the modules to the above-mentioned communication bus format. In addition, if the wiring distance between the modules is too long or the transmission data bit width is too large, it will cause There is a timing error in data transmission between modules.
  • the embodiment of the present application also optimizes the timing of the communication bus by adding a register 200 between the first memory 100 and the second memory 300, and solves the problem of timing errors.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Systems (AREA)

Abstract

Disclosed in embodiments of the present application are an inter-module communication method and system. The communication method is used for controlling data transmission among a first memory, a second memory, and a register, and the register is connected between the first memory and the second memory. The communication method comprises: the first memory receives a first permission signal sent by the register; the first memory provides a first valid signal to the register so as to write a first piece of data into the register; the register receives a second permission signal sent by the second memory; the register provides a second valid signal to the second memory to write the first piece of data into the second memory.

Description

模块间通信方法及系统Communication method and system between modules
本申请要求在2020年06月22日提交中国专利局、申请号为202010575497.5的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office with an application number of 202010575497.5 on June 22, 2020, and the entire content of this application is incorporated into this application by reference.
技术领域Technical field
本申请实施例涉及通信技术,例如涉及一种模块间通信方法及系统。The embodiments of the present application relate to communication technology, for example, to an inter-module communication method and system.
背景技术Background technique
AXI(AdvancedeXtensibleInterface)是一种总线协议,该协议是ARM公司提出的AMBA(AdvancedMicrocontrollerBusArchitecture)3.0协议中最重要的部分,是一种面向高性能、高带宽、低延迟的片内总线。它的地址/控制和数据相位是分离的,支持不对齐的数据传输,同时在突发传输中,只需要首地址,同时分离的读写数据通道、并支持Outstanding传输访问和乱序访问,并更加容易进行时序收敛。AXI (AdvancedeXtensibleInterface) is a bus protocol, which is the most important part of the AMBA (Advanced MicrocontrollerBusArchitecture) 3.0 protocol proposed by ARM. It is a high-performance, high-bandwidth, low-latency on-chip bus. Its address/control and data phases are separated to support unaligned data transmission. At the same time, in burst transmission, only the first address is needed, and the read and write data channels are separated at the same time, and it supports Outstanding transmission access and out-of-order access, and It is easier to perform timing closure.
但采用AXI总线协议进行通信,其数据是按帧或包的方式传输的,存在4K边界,还需要地址等大量的控制信号,无法灵活的做到随时暂停模块间的通信数据传输。However, when the AXI bus protocol is used for communication, the data is transmitted in frames or packets. There is a 4K boundary, and a large number of control signals such as addresses are required. It is impossible to flexibly suspend the communication data transmission between modules at any time.
发明内容Summary of the invention
本申请实施例提供一种模块间通信方法及系统,以实现模块间的通信数据传输的灵活性。The embodiments of the present application provide an inter-module communication method and system, so as to realize the flexibility of communication data transmission between the modules.
本申请实施例提供了一种模块间通信方法,该模块间通信方法用于控制第一存储器、第二存储器和寄存器之间的数据传输,所述寄存器连接在第一存储器和第二存储器之间,该模块间通信方法包括:The embodiment of the application provides an inter-module communication method. The inter-module communication method is used to control data transmission between a first memory, a second memory, and a register, and the register is connected between the first memory and the second memory. , The communication method between modules includes:
所述第一存储器接收所述寄存器发送的第一许可信号;The first memory receives the first permission signal sent by the register;
所述第一存储器提供第一有效信号给所述寄存器以将第一段数据写入所述寄存器;The first memory provides a first valid signal to the register to write the first piece of data into the register;
所述寄存器接收所述第二存储器发送的第二许可信号;The register receives the second permission signal sent by the second memory;
所述寄存器提供第二有效信号给所述第二存储器以将所述第一段数据写入所述第二存储器。The register provides a second valid signal to the second memory to write the first segment of data into the second memory.
可选的,所述第一存储器接收所述寄存器发送的第一许可信号包括:Optionally, the receiving, by the first memory, the first permission signal sent by the register includes:
所述寄存器将其上行许可端的所述第一许可信号拉高;The register pulls the first permission signal of its uplink permission end high;
所述第一存储器的第一许可端接收所述寄存器的上行许可端发送高电平的第一许可信号后进入可读状态。The first permission end of the first memory enters the readable state after receiving the high-level first permission signal sent by the uplink permission end of the register.
可选的,所述第一存储器提供第一有效信号给所述寄存器以将第一段数据写入所述寄存器包括:Optionally, the providing, by the first memory, a first valid signal to the register to write the first piece of data into the register includes:
所述第一存储器将其第一有效端的第一有效信号拉高;The first memory pulls the first valid signal of the first valid end of the first memory high;
所述寄存器的上行有效端接收高电平的第一有效信号后变为可写状态并存储所述第一段数据。The upstream valid end of the register becomes a writable state after receiving the first valid signal of high level and stores the first segment of data.
可选的,所述寄存器接收所述第二存储器发送的第二许可信号包括:Optionally, the register receiving the second permission signal sent by the second memory includes:
所述第二存储器将其第二许可端的第二许可信号拉高;The second memory pulls the second permission signal of its second permission terminal high;
所述寄存器的下行许可端接收所述第二存储器的第二许可端发送的高电平的第二许可信号。The downlink permitting end of the register receives the high-level second permitting signal sent by the second permitting end of the second memory.
可选的,所述寄存器提供第二有效信号给所述第二存储器以将所述第一段数据写入所述第二存储器包括:Optionally, that the register providing a second valid signal to the second memory to write the first piece of data into the second memory includes:
所述寄存器将其下行有效端的第二有效信号拉高;The register pulls the second valid signal of its downstream valid end high;
所述第二存储器的第二有效端接收高电平的第二有效信号后变为可写状态并存储所述第一段数据。The second valid end of the second memory receives a high-level second valid signal and becomes a writable state and stores the first piece of data.
一方面,本申请实施例还提供一种模块间通信系统,该模块间通信系统包括第一存储器、第二存储器和寄存器,所述寄存器连接在第一存储器和第二存储器之间,On the one hand, an embodiment of the present application also provides an inter-module communication system. The inter-module communication system includes a first memory, a second memory, and a register, and the register is connected between the first memory and the second memory,
所述第一存储器接收所述寄存器发送的第一许可信号;The first memory receives the first permission signal sent by the register;
所述第一存储器提供第一有效信号给所述寄存器以将第一段数据写入所述寄存器;The first memory provides a first valid signal to the register to write the first piece of data into the register;
所述寄存器接收所述第二存储器发送的第二许可信号;The register receives the second permission signal sent by the second memory;
所述寄存器提供第二有效信号给所述第二存储器以将所述第一段数据写入所述第二存储器。The register provides a second valid signal to the second memory to write the first segment of data into the second memory.
可选的,所述寄存器将其上行许可端的所述第一许可信号拉高;Optionally, the register pulls the first permission signal of its uplink permission end high;
所述第一存储器的第一许可端接收所述寄存器的上行许可端发送高电平的第一许可信号后进入可读状态。The first permission end of the first memory enters the readable state after receiving the high-level first permission signal sent by the uplink permission end of the register.
可选的,所述第一存储器将其第一有效端的第一有效信号拉高;Optionally, the first memory pulls the first valid signal of its first valid end high;
所述寄存器的上行有效端接收高电平的第一有效信号后变为可写状态并存储所述第一段数据。The upstream valid end of the register becomes a writable state after receiving the first valid signal of high level and stores the first segment of data.
可选的,所述第二存储器将其第二许可端的第二许可信号拉高;Optionally, the second memory pulls the second permission signal of its second permission terminal high;
所述寄存器的下行许可端接收所述第二存储器的第二许可端发送的高电平的第二许可信号。The downlink permitting end of the register receives the high-level second permitting signal sent by the second permitting end of the second memory.
可选的,所述寄存器将其下行有效端的第二有效信号拉高;Optionally, the register pulls the second valid signal of its downstream valid end high;
所述第二存储器的第二有效端接收高电平的第二有效信号后变为可写状态并存储所述第一段数据。The second valid end of the second memory receives a high-level second valid signal and becomes a writable state and stores the first piece of data.
本申请实施例通过第一存储器接收寄存器发送的第一许可信号;第一存储器提供第一有效信号给寄存器以将第一段数据写入寄存器;寄存器接收第二存储器发送的第二许可信号;寄存器提供第二有效信号给第二存储器以将第一段数据写入第二存储器,解决了无法灵活的做到随时暂停模块间的通信数据传输的问题,实现了模块间的通信数据传输的灵活性的效果。In this embodiment of the application, the first memory receives the first permission signal sent by the register; the first memory provides the first valid signal to the register to write the first segment of data into the register; the register receives the second permission signal sent by the second memory; the register Provide the second valid signal to the second memory to write the first segment of data into the second memory, which solves the problem that the communication data transmission between the modules cannot be flexibly suspended at any time, and the flexibility of the communication data transmission between the modules is realized Effect.
附图说明Description of the drawings
图1是本申请实施例一提供的模块间通信方法的流程示意图;FIG. 1 is a schematic flowchart of an inter-module communication method provided by Embodiment 1 of the present application;
图2是本申请实施例二提供的模块间通信方法的流程示意图;2 is a schematic flowchart of a communication method between modules provided in Embodiment 2 of the present application;
图3是本申请实施例二提供的模块间通信方法的工作时序的示意图;3 is a schematic diagram of the working sequence of the inter-module communication method provided in the second embodiment of the present application;
图4为本申请实施例三提供的模块间通信系统的结构示意图。FIG. 4 is a schematic structural diagram of an inter-module communication system provided in Embodiment 3 of this application.
具体实施方式detailed description
下面结合附图和实施例对本申请进行说明。可以理解的是,此处所描述的具体实施例用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。The application will be described below with reference to the drawings and embodiments. It is understandable that the specific embodiments described here are used to explain the application, but not to limit the application. In addition, it should be noted that, for ease of description, the drawings only show a part of the structure related to the present application, but not all of the structure.
一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将各步骤描述成顺序的处理,但是其中的许多步骤可以被并行地、并发地或者同时实施。此外,各步骤的顺序可以被重新安排。当其操作完成时处理可以被终止,但是还可以具有未包括在附图中的附加步骤。处理可以对应于方法、函数、规程、子例程、子程序等等。Some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowchart describes the steps as sequential processing, many of the steps can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the steps can be rearranged. The processing may be terminated when its operations are completed, but may also have additional steps not included in the drawings. Processing can correspond to methods, functions, procedures, subroutines, subroutines, and so on.
此外,术语“第一”、“第二”等可在本文中用于描述各种方向、动作、步骤或元件等,但这些方向、动作、步骤或元件不受这些术语限制。这些术语仅用于将第一个方向、动作、步骤或元件与另一个方向、动作、步骤或元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一存储器称为第二存储器,且类似地,可将第二存储器称为第一存储器。第一存储器和第二存储器两者都是存储器,但其不是同一存储器。术语“第一”、“第二”等不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个所述特征。在本申请实施例的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。In addition, the terms "first", "second", etc. may be used herein to describe various directions, actions, steps or elements, etc., but these directions, actions, steps or elements are not limited by these terms. These terms are only used to distinguish a first direction, action, step or element from another direction, action, step or element. For example, without departing from the scope of the present application, the first memory may be referred to as the second memory, and similarly, the second memory may be referred to as the first memory. Both the first memory and the second memory are memories, but they are not the same memory. The terms "first", "second", etc. cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with “first” and “second” may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, "a plurality of" means at least two, such as two, three, etc., unless otherwise specifically defined.
实施例一Example one
如图1所示,本申请实施例一提供了一种模块间通信方法,该模块间通信方法用于控制第一存储器、第二存储器和寄存器之间的数据传输,所述寄存器连接在第一存储器和第二存储器之间,该模块间通信方法包括:As shown in Figure 1, the first embodiment of the present application provides an inter-module communication method. The inter-module communication method is used to control data transmission between a first memory, a second memory and a register, and the register is connected to the first memory. Between the memory and the second memory, the inter-module communication method includes:
S110、所述第一存储器接收所述寄存器发送的第一许可信号。S110. The first memory receives a first permission signal sent by the register.
S120、所述第一存储器提供第一有效信号给所述寄存器以将第一段数据写入所述寄存器。S120. The first memory provides a first valid signal to the register to write the first segment of data into the register.
本实施例中,当第一存储器接收到寄存器发送的第一许可信号,即表示寄存器已准备好接收第一存储器中需要写入的数据,在第一存储器接收到寄存器发送的第一许可信号后,第一存储器可以读取第一段数据。当第一存储器给寄存器提供第一有效信号,即表示第一存储器可以将第一段数据写入寄存器中,在寄存器接收到第一存储器发送的第一有效信号后,寄存器可以写入第一段数据。In this embodiment, when the first memory receives the first permission signal sent by the register, it means that the register is ready to receive the data that needs to be written in the first memory. After the first memory receives the first permission signal sent by the register , The first memory can read the first piece of data. When the first memory provides the first valid signal to the register, it means that the first memory can write the first segment data into the register. After the register receives the first valid signal sent by the first memory, the register can write the first segment data.
当第一存储器接收到寄存器发送的第一许可信号,同时寄存器也接收到第一存储器发送的第一有效信号时,第一段数据便开始从第一存储器中写入寄存器。其中,当任一信号停止发送时,即寄存器停止给第一存储器发送第一许可信号或第一存储器停止给寄存器发送第一有效信号时,该通信的传输将会立即停止。When the first memory receives the first permission signal sent by the register and the register also receives the first valid signal sent by the first memory, the first piece of data starts to be written into the register from the first memory. Wherein, when any signal stops sending, that is, when the register stops sending the first permission signal to the first memory or the first memory stops sending the first valid signal to the register, the transmission of the communication will stop immediately.
S130、所述寄存器接收所述第二存储器发送的第二许可信号。S130. The register receives a second permission signal sent by the second memory.
S140、所述寄存器提供第二有效信号给所述第二存储器以将所述第一段数据写入所述第二存储器。S140. The register provides a second valid signal to the second memory to write the first segment of data into the second memory.
本实施例中,执行步骤S120后,第一段数据已经从第一存储器中写入寄存 器内,寄存器中存储有第一段数据。当寄存器接收到第二存储器发送的第一许可信号,即表示第二存储器已准备好接收寄存器中需要写入的数据,在寄存器接收到第二存储器发送的第二许可信号后,寄存器可以读取第一段数据。当寄存器提供第二有效信号给第二存储器,即表示寄存器可以将第一段数据写入第二存储器中,在第二存储器接收到寄存器发送的第二有效信号后,第二存储器可以写入第一段数据。In this embodiment, after step S120 is executed, the first piece of data has been written from the first memory into the register, and the first piece of data is stored in the register. When the register receives the first permission signal sent by the second memory, it means that the second memory is ready to receive the data that needs to be written in the register. After the register receives the second permission signal sent by the second memory, the register can be read The first paragraph of data. When the register provides the second valid signal to the second memory, it means that the register can write the first segment of data into the second memory. After the second memory receives the second valid signal sent by the register, the second memory can write to the second memory. A piece of data.
当寄存器接收到第二存储器发送的第一许可信号,同时第二存储器也接收到寄存器发送的第二有效信号时,第一段数据便开始从寄存器中写入第二存储器。其中,当任一信号停止发送时,即第二存储器停止给寄存器发送第二许可信号或寄存器停止给第二存储器发送第二有效信号时,该通信的传输将会立即停止。由此完成第一段数据从第一存储器到第二存储器的传输。另外需要说明的是,第一段数据并非指按顺序的第一段数据,该第一段数据可以为实际通信中的任意一段数据。When the register receives the first permission signal sent by the second memory, and at the same time the second memory also receives the second valid signal sent by the register, the first piece of data starts to be written into the second memory from the register. Wherein, when any signal stops sending, that is, when the second memory stops sending the second permission signal to the register or the register stops sending the second valid signal to the second memory, the transmission of the communication will stop immediately. This completes the transfer of the first piece of data from the first memory to the second memory. In addition, it should be noted that the first piece of data does not refer to the first piece of data in order, and the first piece of data can be any piece of data in actual communication.
本申请实施例通过将模块间的传输接口改为上述通信总线格式后,保证模块之间数据传输的正确性和稳定性,此外若模块间布线距离太远或传输数据位宽较大,会导致模块间的数据传输存在时序错误,本申请实施例还通过在第一存储器和第二存储器之间加入寄存器,优化了该通信总线的时序,解决了时序错误的问题。The embodiment of the application ensures the accuracy and stability of the data transmission between the modules by changing the transmission interface between the modules to the above-mentioned communication bus format. In addition, if the wiring distance between the modules is too long or the transmission data bit width is too large, it will cause There is a timing error in the data transmission between the modules. The embodiment of the present application also optimizes the timing of the communication bus by adding a register between the first memory and the second memory, and solves the problem of timing errors.
本申请实施例通过第一存储器接收寄存器发送的第一许可信号;第一存储器提供第一有效信号给寄存器以将第一段数据写入寄存器;寄存器接收第二存储器发送的第二许可信号;寄存器提供第二有效信号给第二存储器以将第一段数据写入第二存储器,解决了无法灵活的做到随时暂停模块间的通信数据传输的问题,实现了模块间的通信数据传输的灵活性的效果。In this embodiment of the application, the first memory receives the first permission signal sent by the register; the first memory provides the first valid signal to the register to write the first segment of data into the register; the register receives the second permission signal sent by the second memory; the register Provide the second valid signal to the second memory to write the first segment of data into the second memory, which solves the problem that the communication data transmission between the modules cannot be flexibly suspended at any time, and the flexibility of the communication data transmission between the modules is realized Effect.
实施例二Example two
如图2和图3所示,本申请实施例二提供了一种模块间通信方法,本申请实施例二是在本申请实施例一的基础上进行说明,该模块间通信方法用于控制第一存储器、第二存储器和寄存器之间的数据传输,所述寄存器连接在第一存储器和第二存储器之间。As shown in Figures 2 and 3, the second embodiment of the present application provides an inter-module communication method. The second embodiment of the present application is described on the basis of the first embodiment of the present application. Data transfer between a memory, a second memory and a register, the register being connected between the first memory and the second memory.
本实施例中,在时钟周期上升时才执行信号的发送,第一存储器包括第一许可端、第一有效端和第一数据端,第二存储器包括第二许可端、第二有效端和第二数据端,寄存器包括上行许可端、上行有效端、上行数据端、下行许可端、下行有效端和下行数据端,第一存储器通过第一数据端将数据传输到寄存 器的上行数据端,寄存器通过下行数据端将数据传输到第二存储器的第二数据端。In this embodiment, the signal is sent only when the clock cycle rises. The first memory includes a first permission end, a first valid end, and a first data end, and the second memory includes a second permission end, a second valid end, and a first data end. The second data terminal, the register includes the upstream permit terminal, the upstream valid terminal, the upstream data terminal, the downstream permit terminal, the downstream valid terminal and the downstream data terminal. The first memory transmits data to the upstream data terminal of the register through the first data terminal, and the register passes The downlink data terminal transmits the data to the second data terminal of the second memory.
该模块间通信方法包括:The inter-module communication methods include:
S210、所述寄存器将其上行许可端的所述第一许可信号拉高。S210. The register pulls up the first permission signal of its uplink permission end.
S220、所述第一存储器的第一许可端接收所述寄存器的上行许可端发送高电平的第一许可信号后进入可读状态。S220: The first permitting terminal of the first memory enters the readable state after receiving the high-level first permitting signal sent by the uplink permitting terminal of the register.
本实施例中,当寄存器中没有存储数据,或者还可以存储数据时,寄存器可以将其上行许可端的第一许可信号从低电平拉高为高电平,即表示寄存器已准备好接收第一存储器中需要写入的数据。在时钟周期为上升时,第一存储器的第一许可端将接收到寄存器的上行许可端发送的高电平的第一许可信号,之后第一存储器进入可读状态,即可以读取第一段数据。In this embodiment, when data is not stored in the register, or data can be stored, the register can pull the first permission signal of its uplink permission end from low to high, which means that the register is ready to receive the first permission signal. The data to be written in the memory. When the clock cycle is rising, the first permission end of the first memory will receive the high level first permission signal sent by the upstream permission end of the register, and then the first memory will enter the readable state, that is, the first segment can be read data.
S230、所述第一存储器将其第一有效端的第一有效信号拉高。S230. The first memory pulls the first valid signal of the first valid end of the first memory high.
S240、所述寄存器的上行有效端接收高电平的第一有效信号后变为可写状态并存储所述第一段数据。S240. The upstream valid end of the register becomes a writable state after receiving the first valid signal of high level and stores the first piece of data.
本实施例中,当第一存储器存储的第一段数据被读取后,在之后的任一时刻,第一存储器可以将其第一有效端的第一有效信号从低电平拉高为高电平,即表示第一存储器可以将第一段数据写入寄存器中。在时钟周期为上升时,寄存器的上行有效端将接收到第一存储器的第一有效端发送的高电平第一有效信号,之后寄存器进入可写状态,可以写入并存储第一段数据。In this embodiment, after the first piece of data stored in the first memory is read, at any time thereafter, the first memory can pull the first valid signal of its first valid end from low to high. Ping means that the first memory can write the first segment of data into the register. When the clock cycle is rising, the upstream valid end of the register will receive the high-level first valid signal sent by the first valid end of the first memory, after which the register enters a writable state, and the first segment of data can be written and stored.
当第一存储器的第一许可端接收到寄存器的上行许可端发送的第一许可信号,同时寄存器的上行有效端也接收到第一存储器的第一有效端发送的第一有效信号时,第一段数据便开始从第一存储器中写入寄存器。其中,当任一信号停止发送时,即寄存器停止给第一存储器发送第一许可信号或第一存储器停止给寄存器发送第一有效信号时,该通信的传输将会立即停止。When the first permitting end of the first memory receives the first permit signal sent by the upstream permitting end of the register, and at the same time the upstream valid end of the register also receives the first valid signal sent by the first valid end of the first memory, the first The segment data starts to be written into the register from the first memory. Wherein, when any signal stops sending, that is, when the register stops sending the first permission signal to the first memory or the first memory stops sending the first valid signal to the register, the transmission of the communication will stop immediately.
S250、所述第二存储器将其第二许可端的第二许可信号拉高。S250. The second memory pulls the second permission signal of its second permission terminal high.
S260、所述寄存器的下行许可端接收所述第二存储器的第二许可端发送的高电平的第二许可信号。S260. The downlink permitting end of the register receives a high-level second permitting signal sent by the second permitting end of the second memory.
本实施例中,此时第一段数据已经从第一存储器的第一数据端中写入寄存器的上行数据端内,寄存器中存储有第一段数据。此时第二存储器可以将其第二许可端的第二许可信号从低电平拉高为高电平,即表示第二存储器已准备好接收寄存器中需要写入的数据。在时钟周期为上升时,寄存器的下行许可端接收所述第二存储器的第二许可端发送的高电平的第二许可信号,之后寄存器进 入可读状态,即可以从上行数据端读取第一段数据至下行数据端。In this embodiment, at this time, the first piece of data has been written from the first data end of the first memory into the upstream data end of the register, and the first piece of data is stored in the register. At this time, the second memory can pull the second permission signal of its second permission terminal from low level to high level, which means that the second memory is ready to receive the data that needs to be written in the register. When the clock cycle is rising, the downstream permitting end of the register receives the high-level second permitting signal sent by the second permitting end of the second memory. After that, the register enters the readable state, that is, the second permitting end of the register can be read from the upstream data end. A piece of data is sent to the downstream data terminal.
S270、所述寄存器将其下行有效端的第二有效信号拉高。S270. The register pulls the second valid signal of its downstream valid end high.
S280、所述第二存储器的第二有效端接收高电平的第二有效信号后变为可写状态并存储所述第一段数据。S280: The second valid end of the second memory receives a high-level second valid signal and becomes a writable state and stores the first piece of data.
本实施例中,当寄存器存储的第一段数据被读取后,在之后的任一时刻,寄存器可以将其下行有效端的第二有效信号从低电平拉高为高电平,即表示寄存器可以将第一段数据写入第二存储器中。在时钟周期为上升时,第二存储器的第二有效端将接收到寄存器的下行有效端发送的高电平的第二有效信号,之后第二存储器变为可写状态,可以写入并存储所述第一段数据。In this embodiment, after the first piece of data stored in the register is read, at any time thereafter, the register can pull the second valid signal of its downstream valid end from low to high, which means that the register The first segment of data can be written into the second memory. When the clock cycle is rising, the second valid end of the second memory will receive the high-level second valid signal sent by the downstream valid end of the register. After that, the second memory becomes writable and can write and store all Describe the first paragraph of data.
当寄存器接收到第二存储器发送的第一许可信号,同时第二存储器也接收到第二有效信号时,第一段数据便开始从寄存器中写入第二存储器。其中,当任一信号停止发送时,即第二存储器停止给寄存器发送第二许可信号或寄存器停止给第二存储器发送第二有效信号时,该通信的传输将会立即停止。由此完成第一段数据从第一存储器到第二存储器的传输。另外需要说明的是,第一段数据并非指按顺序的第一段数据,该第一段数据可以为实际通信中的任意一段数据。When the register receives the first permission signal sent by the second memory and the second memory also receives the second valid signal, the first piece of data starts to be written from the register to the second memory. Wherein, when any signal stops sending, that is, when the second memory stops sending the second permission signal to the register or the register stops sending the second valid signal to the second memory, the transmission of the communication will stop immediately. This completes the transfer of the first piece of data from the first memory to the second memory. In addition, it should be noted that the first piece of data does not refer to the first piece of data in order, and the first piece of data can be any piece of data in actual communication.
同理可知,如图3所示,数据的传输可以是连续的,通过上述相同的方法,可以完成第一段数据、第二段数据和第三段数据以及更多的数据传输。In the same way, as shown in FIG. 3, the data transmission can be continuous, and the first data, the second data, the third data, and more data can be transmitted through the same method as described above.
本申请实施例通过将模块间的传输接口改为上述通信总线格式后,保证模块之间数据传输的正确性和稳定性,此外若模块间布线距离太远或传输数据位宽较大,会导致模块间的数据传输存在时序错误,本申请实施例还通过在第一存储器和第二存储器之间加入寄存器,优化了该通信总线的时序,解决了时序错误的问题。The embodiment of the application ensures the accuracy and stability of the data transmission between the modules by changing the transmission interface between the modules to the above-mentioned communication bus format. In addition, if the wiring distance between the modules is too long or the transmission data bit width is too large, it will cause There is a timing error in the data transmission between the modules. The embodiment of the present application also optimizes the timing of the communication bus by adding a register between the first memory and the second memory, and solves the problem of timing errors.
本申请实施例通过第一存储器接收寄存器发送的第一许可信号;第一存储器提供第一有效信号给寄存器以将第一段数据写入寄存器;寄存器接收第二存储器发送的第二许可信号;寄存器提供第二有效信号给第二存储器以将第一段数据写入第二存储器,解决了无法灵活的做到随时暂停模块间的通信数据传输的问题,实现了模块间的通信数据传输的灵活性的效果。In this embodiment of the application, the first memory receives the first permission signal sent by the register; the first memory provides the first valid signal to the register to write the first segment of data into the register; the register receives the second permission signal sent by the second memory; the register Provide the second valid signal to the second memory to write the first segment of data into the second memory, which solves the problem that the communication data transmission between the modules cannot be flexibly suspended at any time, and the flexibility of the communication data transmission between the modules is realized Effect.
实施例三Example three
如图4所示,本申请实施例三提供了一种模块间通信系统,该模块间通信系统包括第一存储器100、第二存储器300和寄存器200,所述寄存器200连接在第一存储器100和第二存储器300之间。As shown in FIG. 4, the third embodiment of the present application provides an inter-module communication system. The inter-module communication system includes a first memory 100, a second memory 300, and a register 200. The register 200 is connected to the first memory 100 and Between the second storage 300.
其中,所述第一存储器100接收所述寄存器200发送的第一许可信号;所述第一存储器100提供第一有效信号给所述寄存器200以将第一段数据写入所述寄存器200;所述寄存器200接收所述第二存储器300发送的第二许可信号;所述寄存器200提供第二有效信号给所述第二存储器300以将所述第一段数据写入所述第二存储器300。Wherein, the first memory 100 receives the first permission signal sent by the register 200; the first memory 100 provides the first valid signal to the register 200 to write the first piece of data into the register 200; The register 200 receives the second permission signal sent by the second memory 300; the register 200 provides a second valid signal to the second memory 300 to write the first piece of data into the second memory 300.
本实施例中,第一存储器100包括第一许可端120、第一有效端130和第一数据端110,第二存储器300包括第二许可端320、第二有效端330和第二数据端310,寄存器200包括上行许可端220、上行有效端230、上行数据端210、下行许可端250、下行有效端260和下行数据端240,第一存储器100通过第一数据端110将数据传输到寄存器200的上行数据端210,寄存器200通过下行数据端240将数据传输到第二存储器300的第二数据端310。In this embodiment, the first storage 100 includes a first license port 120, a first valid port 130, and a first data port 110, and the second storage 300 includes a second license port 320, a second valid port 330, and a second data port 310. , The register 200 includes an upstream permit terminal 220, an upstream valid terminal 230, an upstream data terminal 210, a downstream permit terminal 250, a downstream valid terminal 260, and a downstream data terminal 240. The first memory 100 transmits data to the register 200 through the first data terminal 110 The register 200 transmits data to the second data terminal 310 of the second memory 300 through the downstream data terminal 240.
所述寄存器200将其上行许可端220的所述第一许可信号拉高;所述第一存储器100的第一许可端120接收所述寄存器200的上行许可端220发送高电平的第一许可信号后进入可读状态。所述第一存储器100将其第一有效端130的第一有效信号拉高;所述寄存器200的上行有效端230接收高电平的第一有效信号后变为可写状态并存储所述第一段数据。所述第二存储器300将其第二许可端320的第二许可信号拉高;所述寄存器200的下行许可端250接收所述第二存储器300的第二许可端320发送的高电平的第二许可信号。所述寄存器200将其下行有效端260的第二有效信号拉高;所述第二存储器300的第二有效端330接收高电平的第二有效信号后变为可写状态并存储所述第一段数据。The register 200 pulls the first permission signal of its upstream permitting terminal 220 high; the first permitting terminal 120 of the first memory 100 receives the upstream permitting terminal 220 of the register 200 to send a high-level first permit After the signal, it enters the readable state. The first memory 100 pulls the first valid signal of its first valid end 130 high; the upstream valid end 230 of the register 200 becomes a writable state after receiving the first valid signal of high level and stores the first valid signal. A piece of data. The second memory 300 pulls the second permission signal of its second permission terminal 320 high; the downlink permission terminal 250 of the register 200 receives the high level first permission signal sent by the second permission terminal 320 of the second memory 300 2. Permission signal. The register 200 pulls the second valid signal of its downstream valid end 260 high; the second valid end 330 of the second memory 300 receives a high-level second valid signal and becomes a writable state and stores the first valid signal. A piece of data.
具体的,本实施例中,在时钟周期上升时才执行信号的发送,当寄存器200中没有存储数据,或者还可以存储数据时,寄存器200可以将其上行许可端220的第一许可信号从低电平拉高为高电平,即表示寄存器200已准备好接收第一存储器100中需要写入的数据。在时钟周期为上升时,第一存储器100的第一许可端120将接收到寄存器200的上行许可端220发送的高电平的第一许可信号,之后第一存储器100进入可读状态,即可以读取第一段数据。Specifically, in this embodiment, the signal is sent only when the clock cycle rises. When no data is stored in the register 200, or when data can be stored, the register 200 can change the first permission signal of the uplink permission terminal 220 from low. Pulling the level high to a high level means that the register 200 is ready to receive the data that needs to be written in the first memory 100. When the clock cycle is rising, the first permitting terminal 120 of the first memory 100 will receive the high-level first permitting signal sent by the upstream permitting terminal 220 of the register 200, and then the first memory 100 will enter the readable state, that is, Read the first piece of data.
当第一存储器100存储的第一段数据被读取后,在之后的任一时刻,第一存储器100可以将其第一有效端130的第一有效信号从低电平拉高为高电平,即表示第一存储器100可以将第一段数据写入寄存器200中。在时钟周期为上升时,寄存器200的上行有效端230将接收到第一存储器100的第一有效端130发送的高电平第一有效信号,之后寄存器200进入可写状态,可以写入并存储第一段数据。After the first piece of data stored in the first memory 100 is read, at any time thereafter, the first memory 100 can pull the first valid signal of its first valid end 130 from low to high. , Which means that the first memory 100 can write the first segment of data into the register 200. When the clock cycle is rising, the upstream valid end 230 of the register 200 will receive the high-level first valid signal sent by the first valid end 130 of the first memory 100, after which the register 200 enters the writable state, which can be written and stored The first paragraph of data.
当第一存储器100的第一许可端120接收到寄存器200的上行许可端220发送的第一许可信号,同时寄存器200的上行有效端230也接收到第一存储器 100的第一有效端130发送的第一有效信号时,第一段数据便开始从第一存储器100中写入寄存器200。其中,当任一信号停止发送时,即寄存器200停止给第一存储器100发送第一许可信号或第一存储器100停止给寄存器200发送第一有效信号时,该通信的传输将会立即停止。When the first permitting end 120 of the first storage 100 receives the first permitting signal sent by the upstream permitting end 220 of the register 200, at the same time, the upstream valid end 230 of the register 200 also receives the first valid end 130 of the first storage 100. When the first valid signal occurs, the first segment of data starts to be written from the first memory 100 to the register 200. Wherein, when any signal stops sending, that is, when the register 200 stops sending the first permission signal to the first memory 100 or the first memory 100 stops sending the first valid signal to the register 200, the transmission of the communication will stop immediately.
此时第一段数据已经从第一存储器100的第一数据端110中写入寄存器200的上行数据端210内,寄存器200中存储有第一段数据。此时第二存储器300可以将其第二许可端320的第二许可信号从低电平拉高为高电平,即表示第二存储器300已准备好接收寄存器200中需要写入的数据。在时钟周期为上升时,寄存器200的下行许可端250接收所述第二存储器300的第二许可端320发送的高电平的第二许可信号,之后寄存器200进入可读状态,即可以从上行数据端210读取第一段数据至下行数据端240。At this time, the first piece of data has been written from the first data terminal 110 of the first memory 100 into the upstream data terminal 210 of the register 200, and the first piece of data is stored in the register 200. At this time, the second memory 300 can pull the second permission signal of the second permission terminal 320 from the low level to the high level, which means that the second memory 300 is ready to receive the data to be written in the register 200. When the clock cycle is rising, the downstream permitting terminal 250 of the register 200 receives the high-level second permitting signal sent by the second permitting terminal 320 of the second memory 300, and then the register 200 enters the readable state, that is, it can start from the upstream The data terminal 210 reads the first piece of data to the downstream data terminal 240.
当寄存器200存储的第一段数据被读取后,在之后的任一时刻,寄存器200可以将其下行有效端260的第二有效信号从低电平拉高为高电平,即表示寄存器200可以将第一段数据写入第二存储器300中。在时钟周期为上升时,第二存储器300的第二有效端330将接收到寄存器200的下行有效端260发送的高电平的第二有效信号,之后第二存储器300变为可写状态,可以写入并存储所述第一段数据。When the first piece of data stored in the register 200 is read, at any time thereafter, the register 200 can pull the second valid signal of its downstream valid end 260 from low to high, which means that the register 200 The first piece of data can be written into the second memory 300. When the clock cycle is rising, the second valid end 330 of the second memory 300 will receive the high-level second valid signal sent by the downstream valid end 260 of the register 200, and then the second memory 300 becomes a writable state. Write and store the first piece of data.
当寄存器200接收到第二存储器300发送的第一许可信号,同时第二存储器300也接收到第二有效信号时,第一段数据便开始从寄存器200中写入第二存储器300。其中,当任一信号停止发送时,即第二存储器300停止给寄存器200发送第二许可信号或寄存器200停止给第二存储器300发送第二有效信号时,该通信的传输将会立即停止。由此完成第一段数据从第一存储器100到第二存储器300的传输。另外需要说明的是,第一段数据并非指按顺序的第一段数据,该第一段数据可以为实际通信中的任意一段数据。When the register 200 receives the first permission signal sent by the second memory 300 and the second memory 300 also receives the second valid signal, the first piece of data starts to be written from the register 200 to the second memory 300. Wherein, when any signal stops sending, that is, when the second memory 300 stops sending the second permission signal to the register 200 or the register 200 stops sending the second valid signal to the second memory 300, the transmission of the communication will stop immediately. Thus, the transfer of the first piece of data from the first memory 100 to the second memory 300 is completed. In addition, it should be noted that the first piece of data does not refer to the first piece of data in order, and the first piece of data can be any piece of data in actual communication.
本申请实施例通过将模块间的传输接口改为上述通信总线格式后,保证模块之间数据传输的正确性和稳定性,此外若模块间布线距离太远或传输数据位宽较大,会导致模块间的数据传输存在时序错误,本申请实施例还通过在第一存储器100和第二存储器300之间加入寄存器200,优化了该通信总线的时序,解决了时序错误的问题。The embodiment of the application ensures the accuracy and stability of the data transmission between the modules by changing the transmission interface between the modules to the above-mentioned communication bus format. In addition, if the wiring distance between the modules is too long or the transmission data bit width is too large, it will cause There is a timing error in data transmission between modules. The embodiment of the present application also optimizes the timing of the communication bus by adding a register 200 between the first memory 100 and the second memory 300, and solves the problem of timing errors.

Claims (10)

  1. 一种模块间通信方法,用于控制第一存储器、第二存储器和寄存器之间的数据传输,所述寄存器连接在第一存储器和第二存储器之间,所述方法包括:An inter-module communication method for controlling data transmission between a first memory, a second memory and a register, the register being connected between the first memory and the second memory, the method comprising:
    所述第一存储器接收所述寄存器发送的第一许可信号;The first memory receives the first permission signal sent by the register;
    所述第一存储器提供第一有效信号给所述寄存器以将第一段数据写入所述寄存器;The first memory provides a first valid signal to the register to write the first piece of data into the register;
    所述寄存器接收所述第二存储器发送的第二许可信号;The register receives the second permission signal sent by the second memory;
    所述寄存器提供第二有效信号给所述第二存储器以将所述第一段数据写入所述第二存储器。The register provides a second valid signal to the second memory to write the first segment of data into the second memory.
  2. 根据权利要求1所述的模块间通信方法,其中,所述第一存储器接收所述寄存器发送的第一许可信号包括:4. The inter-module communication method according to claim 1, wherein the receiving, by the first memory, the first permission signal sent by the register comprises:
    所述寄存器将其上行许可端的所述第一许可信号拉高;The register pulls the first permission signal of its uplink permission end high;
    所述第一存储器的第一许可端接收所述寄存器的上行许可端发送高电平的第一许可信号后进入可读状态。The first permission end of the first memory enters the readable state after receiving the high-level first permission signal sent by the uplink permission end of the register.
  3. 根据权利要求1所述的模块间通信方法,其中,所述第一存储器提供第一有效信号给所述寄存器以将第一段数据写入所述寄存器包括:The inter-module communication method according to claim 1, wherein the providing the first valid signal to the register by the first memory to write the first piece of data into the register comprises:
    所述第一存储器将其第一有效端的第一有效信号拉高;The first memory pulls the first valid signal of the first valid end of the first memory high;
    所述寄存器的上行有效端接收高电平的第一有效信号后变为可写状态并存储所述第一段数据。The upstream valid end of the register becomes a writable state after receiving the first valid signal of high level and stores the first segment of data.
  4. 根据权利要求1所述的模块间通信方法,其中,所述寄存器接收所述第二存储器发送的第二许可信号包括:4. The inter-module communication method according to claim 1, wherein the register receiving the second permission signal sent by the second memory comprises:
    所述第二存储器将其第二许可端的第二许可信号拉高;The second memory pulls the second permission signal of its second permission terminal high;
    所述寄存器的下行许可端接收所述第二存储器的第二许可端发送的高电平的第二许可信号。The downlink permitting end of the register receives the high-level second permitting signal sent by the second permitting end of the second memory.
  5. 根据权利要求1所述的模块间通信方法,其中,所述寄存器提供第二有效信号给所述第二存储器以将所述第一段数据写入所述第二存储器包括:The inter-module communication method according to claim 1, wherein the register providing a second valid signal to the second memory to write the first piece of data into the second memory comprises:
    所述寄存器将其下行有效端的第二有效信号拉高;The register pulls the second valid signal of its downstream valid end high;
    所述第二存储器的第二有效端接收高电平的第二有效信号后变为可写状态并存储所述第一段数据。The second valid end of the second memory receives a high-level second valid signal and becomes a writable state and stores the first piece of data.
  6. 一种模块间通信系统,包括第一存储器、第二存储器和寄存器,所述寄存器连接在第一存储器和第二存储器之间,其中,An inter-module communication system includes a first memory, a second memory and a register, the register is connected between the first memory and the second memory, wherein,
    所述第一存储器接收所述寄存器发送的第一许可信号;The first memory receives the first permission signal sent by the register;
    所述第一存储器提供第一有效信号给所述寄存器以将第一段数据写入所述寄存器;The first memory provides a first valid signal to the register to write the first piece of data into the register;
    所述寄存器接收所述第二存储器发送的第二许可信号;The register receives the second permission signal sent by the second memory;
    所述寄存器提供第二有效信号给所述第二存储器以将所述第一段数据写入所述第二存储器。The register provides a second valid signal to the second memory to write the first segment of data into the second memory.
  7. 根据权利要求6所述的模块间通信系统,其中,The inter-module communication system according to claim 6, wherein:
    所述寄存器将其上行许可端的所述第一许可信号拉高;The register pulls the first permission signal of its uplink permission end high;
    所述第一存储器的第一许可端接收所述寄存器的上行许可端发送高电平的第一许可信号后进入可读状态。The first permission end of the first memory enters the readable state after receiving the high-level first permission signal sent by the uplink permission end of the register.
  8. 根据权利要求6所述的模块间通信系统,其中,The inter-module communication system according to claim 6, wherein:
    所述第一存储器将其第一有效端的第一有效信号拉高;The first memory pulls the first valid signal of the first valid end of the first memory high;
    所述寄存器的上行有效端接收高电平的第一有效信号后变为可写状态并存储所述第一段数据。The upstream valid end of the register becomes a writable state after receiving the first valid signal of high level and stores the first segment of data.
  9. 根据权利要求6所述的模块间通信系统,其中,The inter-module communication system according to claim 6, wherein:
    所述第二存储器将其第二许可端的第二许可信号拉高;The second memory pulls the second permission signal of its second permission terminal high;
    所述寄存器的下行许可端接收所述第二存储器的第二许可端发送的高电平的第二许可信号。The downlink permitting end of the register receives the high-level second permitting signal sent by the second permitting end of the second memory.
  10. 根据权利要求6所述的模块间通信系统,其中,The inter-module communication system according to claim 6, wherein:
    所述寄存器将其下行有效端的第二有效信号拉高;The register pulls the second valid signal of its downstream valid end high;
    所述第二存储器的第二有效端接收高电平的第二有效信号后变为可写状态并存储所述第一段数据。The second valid end of the second memory receives a high-level second valid signal and becomes a writable state and stores the first piece of data.
PCT/CN2021/101411 2020-06-22 2021-06-22 Inter-module communication method and system WO2021259228A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010575497.5A CN111752875A (en) 2020-06-22 2020-06-22 Inter-module communication method and system
CN202010575497.5 2020-06-22

Publications (1)

Publication Number Publication Date
WO2021259228A1 true WO2021259228A1 (en) 2021-12-30

Family

ID=72675671

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/101411 WO2021259228A1 (en) 2020-06-22 2021-06-22 Inter-module communication method and system

Country Status (2)

Country Link
CN (1) CN111752875A (en)
WO (1) WO2021259228A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111752875A (en) * 2020-06-22 2020-10-09 深圳鲲云信息科技有限公司 Inter-module communication method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1731529A (en) * 2005-07-13 2006-02-08 北京中星微电子有限公司 FIFO data buffering method and full up space accessing FIFO memory
CN105320490A (en) * 2014-07-31 2016-02-10 德克萨斯仪器股份有限公司 Method and apparatus for asynchronous FIFO circuit
CN111752875A (en) * 2020-06-22 2020-10-09 深圳鲲云信息科技有限公司 Inter-module communication method and system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101477505B (en) * 2008-12-23 2012-11-21 无锡中星微电子有限公司 Data transmission method between master and slave equipments through bus
US20130318285A1 (en) * 2012-05-23 2013-11-28 Violin Memory Inc Flash memory controller
CN104008076B (en) * 2013-02-25 2018-04-10 中兴通讯股份有限公司 The method and device that a kind of data signal bus for supporting DVFS transmits
CN109643391B (en) * 2018-01-15 2023-06-13 深圳鲲云信息科技有限公司 Pipeline processing interface structure, electronic device and electronic device
US10515047B1 (en) * 2018-05-17 2019-12-24 Xilnx, Inc. Pipelined data channel with ready/valid handshaking
JP7401050B2 (en) * 2018-09-18 2023-12-19 キヤノン株式会社 bus control circuit

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1731529A (en) * 2005-07-13 2006-02-08 北京中星微电子有限公司 FIFO data buffering method and full up space accessing FIFO memory
CN105320490A (en) * 2014-07-31 2016-02-10 德克萨斯仪器股份有限公司 Method and apparatus for asynchronous FIFO circuit
CN111752875A (en) * 2020-06-22 2020-10-09 深圳鲲云信息科技有限公司 Inter-module communication method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LIGHTMAN1234588: "Verilog design Valid-Ready handshake protocol", BLOG CSDN, CN, 25 August 2019 (2019-08-25), CN, pages 1 - 7, XP055882653, Retrieved from the Internet <URL:https://blog.csdn.net/maowang1234588/article/details/100065072> *

Also Published As

Publication number Publication date
CN111752875A (en) 2020-10-09

Similar Documents

Publication Publication Date Title
US6532525B1 (en) Method and apparatus for accessing memory
US7649795B2 (en) Memory with flexible serial interfaces and method for accessing memory thereof
US7555625B2 (en) Multi-memory chip and data transfer method capable of directly transferring data between internal memory devices
US8938578B2 (en) Memory device with multi-mode deserializer
WO2021259229A1 (en) Inter-module communication method and system
WO2021259228A1 (en) Inter-module communication method and system
TWI685259B (en) Data communicating and processing method of master device and slave device, and data processing method of slave device
US7934043B2 (en) Data processing apparatus for controlling access to a memory based upon detection of completion of a DMA bus cycle
CN111722827B (en) Efficient DDR access method
WO2021259230A1 (en) Inter-module communication method and system
US5926828A (en) Method and apparatus for controlling data transfer between a synchronous DRAM-type memory and a system bus
WO2018039855A1 (en) Memory device, memory controller, data caching device, and computer system
WO2019000456A1 (en) Data mask transmission method, memory controller, memory chip, and computer system
US8988953B2 (en) Memories and methods for sharing a signal node for the receipt and provision of non-data signals
KR100438736B1 (en) Memory control apparatus of performing data writing on address line
US8074096B2 (en) Semiconductor integrated circuit, memory system, memory controller and memory control method
US20020188771A1 (en) Direct memory access controller for carrying out data transfer by determining whether or not burst access can be utilized in an external bus and access control method thereof
US20240212743A1 (en) Integrated circuit memory devices with unidirectional ports for concurrent interface operations
US11626149B2 (en) SPI NOR memory with optimized read and program operation
US20080168206A1 (en) Methods and Apparatus for Interfacing a Processor and a Memory
US20070094460A1 (en) DRAM control circuit
US20070005834A1 (en) Memory chips with buffer circuitry
JPS5936773B2 (en) Local burst transfer control method
CN118093465A (en) Data word alignment method for DDR PHY
JP2006092077A (en) Bus system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21829241

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21829241

Country of ref document: EP

Kind code of ref document: A1