WO2015169054A1 - Method and device for realizing data consistency, and computer storage medium - Google Patents

Method and device for realizing data consistency, and computer storage medium Download PDF

Info

Publication number
WO2015169054A1
WO2015169054A1 PCT/CN2014/088637 CN2014088637W WO2015169054A1 WO 2015169054 A1 WO2015169054 A1 WO 2015169054A1 CN 2014088637 W CN2014088637 W CN 2014088637W WO 2015169054 A1 WO2015169054 A1 WO 2015169054A1
Authority
WO
WIPO (PCT)
Prior art keywords
request
data consistency
data
unit
read
Prior art date
Application number
PCT/CN2014/088637
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 WO2015169054A1 publication Critical patent/WO2015169054A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems

Definitions

  • the present invention relates to the technical field of data storage consistency, and in particular, to a method, an apparatus, and a computer storage medium for implementing data consistency.
  • embodiments of the present invention provide a method and apparatus for implementing data consistency.
  • An embodiment of the present invention provides an apparatus for implementing data consistency, where the apparatus includes: a slave interface unit and a listening control unit;
  • the slave interface unit configured to determine a protocol corresponding to the received data consistency request, performs protocol conversion processing on the received data consistency request, and sends the data conversion request processed by the protocol conversion to the monitoring control unit;
  • the monitoring control unit is configured to determine, according to the data consistency request sent by the slave interface unit, a corresponding data consistency operation device, and perform data consistency operation on the data consistency operation device.
  • the interception control unit is further configured to perform execution of two or more data consistency requests received when the received data consistency request is more than two data consistency requests. Arbitration is performed to determine a corresponding data consistency operation device according to the data consistency request after the arbitration, and perform data consistency operation on the data consistency operation device.
  • the slave interface unit is further configured to send the received data consistency request to the interception control unit when determining that the protocol corresponding to the received data consistency request is supported.
  • the slave interface unit includes: a first slave interface unit and a second slave interface unit;
  • the first slave interface unit is configured to send the received first read data consistency request from the first master unit to the intercept control unit;
  • the second slave interface unit is configured to perform a protocol conversion process on the received data consistency request from the second master device unit, and send the protocol conversion processed data consistency request to the interception control unit.
  • the second slave interface unit is configured to: convert the data consistency request sent by the received second master unit to the Advanced Entity Interface (AXI) protocol into data supporting the ACE_Lite protocol. Consistency request; converts the number of bytes of the data-consistent request after the protocol conversion into the full cache data line Full Cache Line bytes.
  • AXI Advanced Entity Interface
  • the second slave interface unit includes: a protocol conversion subunit, a read operation conversion subunit, a read interface subunit, a write operation conversion subunit, and a write interface subunit;
  • the protocol conversion subunit is configured to convert a data consistency request sent by the received second master unit to support the AXI protocol into a data consistency request supporting the ACE_Lite protocol;
  • the read operation conversion subunit is configured to convert, when the data consistency request sent by the second master device unit is the second read data consistency request, the number of bytes of the second read data consistency request after the protocol conversion is converted into Full cache data line Full Cache Line bytes;
  • the read interface sub-unit is configured to distribute a second read data consistency request channel for the second read data consistency request after the byte number conversion, and multiplex the read data channel;
  • the write operation conversion subunit is configured to convert, when the data consistency request sent by the second master device unit is the second write data consistency request, the number of bytes of the second write data consistency request after the protocol conversion is converted into Full cache data line Full Cache Line bytes;
  • the write interface sub-unit is configured to distribute a second write data consistency request channel for the second write data consistency request after the byte number conversion, and cache the write data response channel.
  • the second slave interface unit further includes: an arbitration subunit configured to: when receiving the data consistency request sent by the read interface subunit and the write interface subunit simultaneously, the byte Arbitration of the second read data consistency request after the number conversion and the execution of the second write data consistency request after the byte number conversion, and according to the second read data consistency request or the second write data after the arbitration
  • the sexual request sends a corresponding data consistency request to the interception control unit.
  • the read interface sub-unit is further configured to block the transmission inter-transaction sequence.
  • the write interface sub-unit is further configured to block the transmission inter-transaction sequence, handle the write-before-write WAW, and the post-write RAW conflict.
  • the first slave interface unit is further configured to send a first write data consistency request from the first master unit to the interconnect unit, and directly initiate a write operation to the interconnect unit.
  • the interception control unit includes a mark control subunit and a data exchange subunit;
  • the tag control subunit is configured to receive a first read and/or first write data consistency request sent by the first slave interface unit, a second read and/or a second write consistency request sent by the second slave interface unit And the invalidation request invalidate sent by the data exchange subunit, and arbitrate the execution of the requests; when the arbitrated request is the first read data consistency request or the second read data consistency request, according to the first read data consistency
  • the request or the second read data consistency request looks up the tag memory.
  • the hit result is generated according to the full cache data line in the tag memory; if the full cache data line in the hit result is Full Cache Line If the status is valid, the monitoring request is sent to the data exchange sub-unit to obtain the read data; if the full cache data line in the hit result is a valid Cache Line, the full cache data line does not exist in the full cache data line, Then using the interconnection unit to obtain read data;
  • the data exchange sub-unit is configured to send the interception request to the first main device unit according to the hit information, receive the intercept response and the intercept data returned by the first main unit, and send the intercept data to the first slave interface unit. Or after the second slave interface unit, send a data consistency request operation completion indication to the first slave interface unit or the second slave interface unit.
  • the tag control subunit is further configured to acquire read data by using the interconnect unit when the snoop request is unresponsive.
  • the data exchange sub-unit is further configured to: after receiving the invalid request sent by the second slave interface unit, return an invalid request response to the second slave interface unit; and send corresponding tag storage to the tag control sub-unit Invalid request;
  • the tag control subunit is further configured to: after receiving the invalid request of the data exchange subunit, set the corresponding tag memory to an invalid state, and update the tag memory according to the update message in the received writeback request;
  • the second slave interface unit is further configured to initiate a write operation to the interconnect unit after receiving the response of the data exchange subunit.
  • the intercept control unit further includes an arbitration subunit configured to: arbitrate the read external memory memory request sent by the mark control subunit and the execution of the read external memory request sent by the data exchange subunit, and The read request after arbitration is sent to the interconnect unit to receive the read data returned by the interconnect unit.
  • the embodiment of the invention further provides a method for implementing data consistency, the method further comprising:
  • the device performs data consistency operations on the data consistency operating device.
  • the performing a protocol conversion process on the received data consistency request includes:
  • the received data consistency request supporting the AXI protocol is converted into a data consistency request supporting the ACE_Lite protocol; and the number of bytes of the data-consistent request after the protocol conversion is converted into the full cache data line Full Cache Line byte number.
  • the data consistency request device when the received data consistency request is a read consistency request, the data consistency request device according to the protocol conversion process determines a corresponding data consistency operation device, and performs data on the data consistency operation device.
  • Consistent operations including:
  • the tag memory is searched, the tag memory is found, the main device unit corresponding to the tag memory is found to be monitored to obtain the read data, and the tag memory is not found.
  • the interconnect unit acquires read data.
  • the method further includes:
  • the read unit is used to acquire the read data.
  • the data consistency request device when the received data consistency request is a write consistency request, the data consistency request device according to the protocol conversion process determines a corresponding data consistency operation device, and performs data on the data consistency operation device.
  • Consistent operations including:
  • the interception control unit returns an invalid request response
  • a write operation is initiated to the interconnect unit of the device implementing data consistency based on the invalid request response.
  • the method further includes:
  • the embodiment of the present invention further provides a computer storage medium, the computer storage medium comprising a set of instructions, when executed, causing at least one processor to execute the implementation number According to the method of consistency.
  • the device, the method, and the computer storage medium for implementing data consistency determine a protocol corresponding to the received data consistency request, perform protocol conversion processing on the received data consistency request, and perform conversion processing according to the protocol.
  • the data consistency request determines the corresponding data consistency operation device, performs data consistency operation on the data consistency operation device, and thus can solve the problem that the ACE_Lite protocol is incompatible in most systems through protocol conversion processing, thereby Effectively solve the problem of shared data consistency in the on-chip multiprocessor system.
  • FIG. 1 is a schematic structural diagram of an apparatus for implementing data consistency according to Embodiment 1 of the present invention
  • FIG. 2 is a schematic structural diagram of another apparatus for implementing data consistency according to Embodiment 1 of the present invention.
  • FIG. 3 is a schematic structural diagram of an apparatus for implementing data consistency according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a second slave interface unit according to Embodiment 1 of the present invention.
  • FIG. 5 is a schematic diagram of an interface sequence when a read data consistency request is provided according to Embodiments 1 and 2 of the present invention.
  • FIG. 6 is a schematic diagram of an interface timing when a write data consistency request is converted according to Embodiment 1 of the present invention.
  • FIG. 7 is a schematic structural diagram of a snoop control unit according to Embodiment 1 of the present invention.
  • FIG. 8 is a schematic flowchart of a method for implementing data consistency according to Embodiment 2 of the present invention.
  • the method for maintaining data consistency commonly used in the prior art is first introduced; the prior art generally includes a method for maintaining software consistency and a method for maintaining consistency of hardware; Although the method of maintaining consistency is easier to implement, the accuracy is not high, and the system performance is degraded during the maintenance process.
  • the hardware maintenance consistency method is complicated in design, it can improve system performance; for example, a type released by ARM
  • the architecture of hardware maintenance consistency is implemented based on the bus monitoring and ACE (AXI Coherency Extensions) protocol of Advanced Microcontroller Bus Architecture (AMBA); among them, the ACE protocol is extended in terms of AXI protocol consistency.
  • the ACE_Lite protocol is a subset of the ACE protocol. In general, a processor with its own cache can support the ACE protocol, while a processor or other device that does not have a cache supports the ACE_Lite protocol.
  • the ACE_Lite protocol is not supported. Therefore, in most of the on-chip multiprocessor systems, the ACE_Lite protocol is not compatible, resulting in the problem of shared data consistency in the on-chip multiprocessor system.
  • the embodiment provides a device for implementing data consistency.
  • the device includes: a slave interface unit 11 and a monitoring control unit 12;
  • the slave interface unit 11 is configured to determine a protocol corresponding to the received data consistency request, perform protocol conversion processing on the received data consistency request, and send the protocol conversion processed data consistency request to the Monitoring control unit 12;
  • the monitoring control unit 12 is configured to determine a corresponding data consistency operation device according to the data consistency request sent from the interface unit 11, and perform data consistency operation on the data consistency operation device.
  • the slave interface unit 11 is further configured to directly send the received data consistency request to the intercept control unit 12 when the protocol corresponding to the received data consistency request is determined, so that the intercept control unit 12 is configured according to
  • the data consistency request sent from the interface unit 11 determines a corresponding data consistency operation device, and performs data consistency operation on the data consistency operation device.
  • the data consistency request includes a read data consistency request and a write data consistency request.
  • the protocol conversion processing is performed on the received data consistency request, specifically:
  • the intercept control unit 12 is further configured to, when the received data consistency request is more than two data consistency requests, arbitrate the execution of the received two or more data consistency requests, according to the data after the arbitration.
  • the data request determines a corresponding data consistency operation device, and performs data consistency operation on the data consistency operation device.
  • the slave interface unit 11 includes a first slave interface unit 111 and a second slave interface unit 112;
  • the first slave interface unit 111 is configured to send the received first read data consistency request from the first master unit 21 to the intercept control unit 12;
  • the second slave interface unit 112 is configured to receive the received from the second master unit 22
  • the second read data consistency request ReadOnce performs protocol conversion processing, and sends the protocol conversion processed second read data consistency request ReadOnce to the interception control unit 12;
  • the intercept control unit 12 is configured to arbitrate the execution of the first read data consistency request and the second read data consistency request ReadOnce, according to the first read data consistency request or the second read data after the arbitration
  • the request ReadOnce determines that the corresponding tag memory tag_ram is not found
  • the read data operation instruction is sent to the interconnect unit 23 to acquire the read data; when it is determined that the corresponding tag memory tag_ram is found, the tag memory tag_ram is found.
  • the corresponding master device unit initiates monitoring to obtain read data; here, since the intercept control unit 12 can only process one consistency request at the same time, the intercept control unit 12 needs to send the first slave interface unit 111.
  • the first read data consistency request and the execution of the second read data consistency request ReadOnce sent by the second slave interface unit 112 are arbitrated.
  • the request after the arbitration control unit 12 is arbitrated is the first read data consistency request, after the first read data consistency request is processed, the second read data consistency request ReadOnce is also performed. Processing; or, if the request after the arbitration control unit 12 arbitrates is the second read data consistency request ReadOnce, after the second read data consistency request ReadOnce is processed, the first read is still required. Data consistency requests are processed.
  • the interception control unit 12 can arbitrate the execution of the first read data consistency request and the second read data consistency request ReadOnce.
  • the method can be based on polling arbitration.
  • the first read data consistency request and the second read data consistency request ReadOnce are performed for arbitration, and may be arbitrated according to the least recently accessed or pseudo-random arbitration method.
  • the interconnection unit 23 may include five main interface units and six slave interface units; wherein the six slave interface units respectively connect the first slave corresponding to the first master unit 21
  • the element is connected as an output to the slave device unit 31; wherein the registers include: an invalid tag memory tag_ram register, an early wresp control register, a timeout threshold register, an interrupt status register, a debug debug control register, and an interrupt mask register;
  • the apparatus provided in this embodiment is operated under the enable of each register; for example, when the apparatus is initialized, the invalid tag memory tag_ram register provides an invalid enable signal to the intercept control unit 12, so that the The monitoring control unit presets the corresponding tag memory tag_ram to an invalid state according to the invalid enable signal; the early wresp control register provides a control signal to the first slave interface unit 111, so that the first slave interface unit 111 The control signal selects a write response to return an early response or a write response to return a normal response normally; the timeout threshold register provides a count threshold period to the first slave interface unit 111 to pass the first slave interface unit 111 Counting detection to determine whether each stage of data transmission is timed out; when it is determined to be timeout, the first slave interface unit 111 generates a timeout interrupt according to the timeout interrupt signal provided by the interrupt status register; the debug debug control register is configured to be Status letter of the corresponding module in the device that implements data consistency The number is debugged; the interrupt mask register
  • the specific function of the debug debug control register is not the content of the embodiment of the present invention.
  • the first main unit unit 21 may include at least two equipment units cluster, and the cluster may be an ACE master supporting the ACE protocol; for example, it may be ARM Cortex A15 and ARM Cortex A7 of ARM.
  • the second master unit 22 may include at least one master device, and may be a master device ACE_Lite master supporting the ACE_Lite protocol, or a master device AXI master supporting the AXI protocol; for example, an IO master device and a graphics processor (GPU). Graphic Processing Unit), Direct Memory Access (DMA), and AXI subsystem.
  • a master device ACE_Lite master supporting the ACE_Lite protocol or a master device AXI master supporting the AXI protocol; for example, an IO master device and a graphics processor (GPU). Graphic Processing Unit), Direct Memory Access (DMA), and AXI subsystem.
  • GPU Graphic Processing Unit
  • DMA Direct Memory Access
  • the slave device unit 31 may include at least one slave device, which may be a slave device AXI slave supporting the AXI protocol, and the slave device may also include an external memory memory.
  • the number of the second main unit unit 22 and the slave unit 31 may be expanded or cut according to system requirements.
  • the second slave interface unit 112 is further configured to: perform protocol conversion processing on the received second write data consistency request WriteUnique from the second master unit 22, and write the second write data consistency request according to the protocol.
  • the invalidation request invalidate is sent to the snoop control unit 12, and after receiving the invalid request response returned by the snoop control unit 12, a write operation is initiated to the interconnect unit 23.
  • the second slave interface unit 112 includes: a protocol conversion subunit 1121, a read operation conversion subunit 1122, a read interface subunit 1123, a write operation conversion subunit 1124, a write interface subunit 1125, and arbitration. Subunit 1126; wherein
  • the protocol conversion sub-unit 1121 is configured to convert the received data consistency request sent by the second main device unit 22 to support the AXI protocol into a data consistency request supporting the ACE_Lite protocol;
  • the read operation conversion subunit 1122 is configured to: when the data consistency request sent by the second master device unit is the second read data consistency request, the protocol read converted second read data consistency request Read Once bytes Convert the number to the full cache data line Full Cache Line bytes;
  • the read interface sub-unit 1123 is configured to distribute a second read data consistency request ReadOnce channel for the second read data consistency request ReadOnce after the byte number conversion, multiplex the read data channel, and convert the byte number
  • the second read data consistency request ReadOnce is sent to the arbitration sub-unit 1126;
  • the write operation conversion subunit 1124 is configured to: when the data consistency request sent by the second master unit is the second write data consistency request WriteUnique, the second write data consistency request WriteUnique byte after the protocol conversion Convert the number to a full cache data row Full Cache Line number of bytes;
  • the write interface sub-unit 1125 is configured to distribute a second write data consistency request WriteUnique channel for the second write data consistency request WriteUnique after the byte number conversion, buffer the write data response channel, and convert according to the number of bytes
  • the second write data consistency request WriteUnique sends an invalid request invalidate to the arbitration sub-unit 1126;
  • the arbitration sub-unit 1126 is configured to, when receiving the data consistency request sent by the read interface sub-unit 1123 and the write interface sub-unit 1125, consistent with the second read data after the byte number conversion
  • the ReadOnce request and the execution of the second write data consistency request WriteUnique after the byte number conversion are arbitrated, and the ReadOnce or the second write data consistency request WriteUnique is requested according to the second read data consistency after arbitration.
  • the intercept control unit 12 sends a corresponding data consistency request; specifically, when the arbitrated data consistency request is the second read data consistency request ReadOnce, the second read data consistency request ReadOnce is sent after the byte number conversion
  • the intercept control unit 12 is configured to send an invalidation request invalidate to the intercept control unit 12 when the arbitrated data consistency request is the second write data consistency request WriteUnique.
  • the second read data consistency request ReadOnce after the byte number conversion refers to a request to read the shared data and the read shared data is not cached.
  • the arbitration subunit 1126 simultaneously receives the data consistency request sent by the read interface subunit 1123 and the write interface subunit 1125, if the arbitration subunit 1126 arbitrates the request is the second read After the data consistency request ReadOnce, after the second read data consistency request ReadOnce is sent to the intercept control unit 12, the invalid write request invalidate is sent to the intercept control unit 12 according to the second write data consistency request WriteUnique. ;or,
  • the Second read data consistency request ReadOnce is sent to the snoop control unit 12.
  • the protocol conversion subunit 1121 is specifically configured to: generate different ACE_Lite transmission types according to different AXI addresses in the AXI master, and support the AXI protocol.
  • the second read or write data consistency request is converted into a second read or write data consistency request supporting the ACE_Lite protocol, so that the second read or write data consistency request sent by the AXI master can be effectively sent, in other words, to enable AXI
  • the second read or write data consistency request sent by the master obtains a corresponding response of the intercept control unit 12; wherein the transport type includes: a listen request AWSNOOP of the write address channel, a listen request ARSNOOP of the read address channel; the AXI
  • the mapping between addresses and ACE_Lite transport types can be pre-configured.
  • the read operation conversion subunit 1121 is specifically configured to: use the content addressed memory (CAM, Content)
  • CAM content addressed memory
  • the addressable memory, the splitting algorithm, and the control logic convert the number of bytes of the second read data consistency request ReadOnce of the protocol conversion into a full cache data line Full Cache Line byte number; specifically, the read operation conversion subunit 1122, the received second protocol read data consistency request ReadOnce is byte-combined, and the extra bytes are filtered to meet the requirement of the original command data volume burst; here, because the intercept control unit 12 requires reading data.
  • the number of bytes of the consistency request is the same as the number of bytes of the full cache data row of the cache data row, and the number of bytes of the second read data consistency request ReadOnce after the protocol conversion has no similar limitation, so Perform a conversion of the number of bytes;
  • the number of bytes of the Full Cache Line of the full cache data line is usually 32 bytes or 64 bytes;
  • the original command data volume burst includes: a data bit width, a data type, and a data length, and the data bit width is generally 32 bits, 64 bits or 128 bit;
  • the data type includes: fixed type, increased type incr and wrap-around wrap;
  • the data length includes at least one piece of data, and the number of storage units of the CAM can be configured according to system requirements.
  • the byte-converted second read data consistency request ReadOnce has a lower address of 12'h18, a data bit width of 64 bits, and a data type of incr4 is split into a lower address of 12'h10.
  • the data bit width is 128 bit
  • the wrap2 and the lower address are 12'h20
  • the data bit width is 128 bit
  • the wrap2 is the two original command data volume burst; wherein, when the first original command data volume burst data is not needed, the second data is not needed.
  • the first data of the second original command data volume burst is held for two periods, corresponding to the data of the addresses s side of 12'h20 and 12'h28 respectively;
  • the s side pulls rlast_s high when receiving the fourth data;
  • the byte-converted second read data consistency request ReadOnce low-order address is 12'h18
  • data bit width is 64bit
  • wrap4 burst is split into two low-order addresses are 12'h10
  • data bit width The 128-bit, wrap2 original command data volume burst.
  • the second data of the first original command data volume burst is held for two periods, corresponding to the data of the 12'h00 and 12'h08 addresses on the s side, and the rlast_s is pulled when the s side receives the fourth data.
  • the s side refers to the interface signal of the slave device
  • the m side refers to The interface signal of the second master unit 22
  • the information on the s side corresponds to the information on the m side of the output after the read operation conversion subunit 1122 converts.
  • the information on the s side includes: araddr_s, arvalid_s, arready_s, rdata_s, rlast_s, rvalid_s, and rready_s;
  • the araddr_s refers to an address of the s-side read address channel; and the arvalid_s refers to a request of the s-side read address channel;
  • the arready_s refers to the s-side read address channel request response;
  • the rdata_s refers to the read data of the s-side read data channel;
  • the rlast_s refers to the last s-side
  • the rvalid_s refers to the request of the s side read data channel;
  • the rready_s refers to the request response of the s side read data channel;
  • the information on the m side includes: araddr_m, arvalid_m, arready_m, rdata_m, rlast_m, rvalid_m, and rready_m; the araddr_m is an address of an m-side read address channel; and the arvalid_m is a request of an m-side read address channel; Arready_m refers to the request response of the m-side read address channel; the rdata_m refers to the read data of the m-side read data channel; the rlast_m refers to the indication signal of the last read data of the m side; the rvalid_m refers to the m-side read The request of the data channel; the roughy_m refers to the request response of the m-side read data channel; the beat_complete refers to the end of the current data; the last_match refers to the last data; the above araddr_s, arvalid_s, arready_s, rvalid_s, rlast_s Rdata_
  • the read interface subunit 1123 is specifically configured to: use the buffer buffer cache.
  • the read operation conversion subunit 1122 converts the second read data consistency request ReadOnce, and distributes the read data for the read operation conversion subunit 1122 byte number converted second read data consistency request ReadOnce a consistency request channel, the multiplexed read data channel; wherein the multiplexed read data channel is: when the snoop control unit 12 and the interconnect unit 23 simultaneously return read data, return to the snoop control unit 12 first Reading data.
  • the read interface sub-unit 1123 is further configured to block transmission inter-transaction ordering; the blocking transmission inter-transaction ordering includes: after all the consistent transmission data requests are completed, the current non-consistent transmission data request Can be issued; or, after all non-consistent transmission data requests are completed, the current request to transmit data consistently can be issued.
  • the write operation conversion subunit 1124 is specifically configured to: convert the byte number of the second write data consistency request WriteUnique after the protocol conversion into the full cache data by using the CAM, the split algorithm, and the control logic.
  • the number of bytes of the Full Cache Line is set; here, because the snoop control unit 12 designed in the embodiment of the present invention requires the number of bytes of the write data consistency request WriteUnique to be the same as the number of bytes of the full cache data line Full Cache Line, and the protocol conversion After the second write data consistency request WriteUnique has no similar limit on the number of bytes, so the number of bytes needs to be converted, and the second write data consistency request WriteUnique after the protocol conversion is split, after splitting.
  • the total number of bytes of each raw command data volume burst is less than or equal to the full cache data line Full Cache Line bytes, and the received write responses are merged to meet the requirements of the original command data volume burst;
  • the original command data volume burst of the second write data consistency request WriteUnique of the byte conversion is 12'h18
  • the data bit width is 64 bit
  • the data type is incr4 can be separately divided into
  • the lower address is 12'h18
  • the data bit width is 64bit
  • the incr1 and the lower address are 12'h20
  • the data bit width is 64bit
  • the intr3 is the original data volume burst
  • the two write channel data responses returned by the m side are Bresp merges into a write channel data response bresp and sends it from the s side
  • the byte-converted second write data consistency request WriteUnique has a lower address of 12'h10 and a data bit width of 128 bits, and the original command data amount burst of the wrap4 is split into a lower address of 12'h10.
  • the data bit width is 128bit, the burst of incr1, the lower address is 12'h20, the data bit width is 128bit, the burst and lower address of incr2 are 12'h00, the data bit width is 128bit, the burst of incr1; and the m side is returned Three write channel data response bresp And a write channel data response bresp is sent from the s side; wherein the m side is the interface of the main device unit; the awaddr_s refers to the address of the s side write address channel; the awvalid_s refers to the s side write address channel The awready_s refers to the request response of the s side write address channel; the wdata_s refers
  • the write interface sub-unit 1125 is specifically configured to: first use the buffer buffer to buffer the byte-converted second Write a data consistency request WriteUnique, and distribute a write data consistency request channel for the second write data consistency request WriteUnique; and then adjust the number of bytes of the invalid request invalidate to be consistent with the second write data after the byte conversion Requesting the WriteUnique byte number is equal, sending the invalid request invalidate to the intercept control unit 12, receiving the invalid request response inv_done returned by the snoop control unit 12, initiating a write operation to the interconnect unit 23, buffering the write data response channel;
  • the invalid request response inv_done returned by the snoop control unit 12 may be out of order, in order to ensure the second write data consistency request and the second master unit 22 after the byte conversion of the write operation conversion subunit 1124
  • the second write data consistency request sent is consistent with the WriteUnique order, and the write interface subunit 1125 identifies the invalid inv_id of the invalid request invalidate
  • a buffer number is added to the second write data consistency request WriteUnique after the byte number conversion, and is saved in the buffer; if the returned inv_id
  • the second write data consistency request WriteUnique converted by the byte conversion of the write operation conversion subunit 1124 is sent to the interconnection unit 23 in accordance with the saved buffer number.
  • the write interface sub-unit 1125 is further configured to block the transfer order sequential ordering, the write-before-write WAW, and the post-write RAW conflict;
  • the ordering ordering of the blocking transmission transaction includes: after all the consistent transmission data requests are completed, the current non-consistent transmission data request can be sent; or, after all the unconsistent transmission data requests are completed, the current consistency transmission data is The request can be issued.
  • the write interface sub-unit 1125 sends the byte-converted second write data consistency request WriteUnique address to the first slave interface unit 11, if it is between the first write data consistency request If there is a conflict, the write interface sub-unit 1125 blocks the byte-converted second write data consistency request WriteUnique until the first write data consistency request after the byte conversion of the first slave interface unit 111 completes the operation;
  • the WAW conflict refers to that after the first master device unit 21 performs a write operation on the address region, the second master device unit 22 performs a write operation on the address region; or the second master device unit 22 performs a write operation on the address region. Thereafter, the first master device unit 21 performs a write operation on the address region.
  • the write interface sub-unit 1125 uses the CAM to save the write address channel identifier awid and the write address channel address of the unprocessed second write data consistency request, and the snoop control unit 12 will read the data consistency request miss The address is sent to the write interface sub-unit 1125.
  • the write interface sub-unit 1125 determines whether the miss address of the read data consistency request is the same as the pending address. If they are the same, the conflict control signal hazard is returned to the intercept control unit 12 to ensure the word.
  • the element 12 initiates a read data consistency operation to the interconnect unit 23; wherein the miss address refers to an address without a hit result; the write address channel identifier awid is used to look up the write response channel identifier bid and read from the CAM
  • the RAW means that after the first master unit 21 performs a write operation on the address area by the first slave interface unit 111, the second master unit 22 reads the address area through the second slave interface unit 112. Or after the first master device unit 21 performs a write operation on the address region, the second master device unit 22 performs a read operation on the address region.
  • the arbitration subunit 1126 is specifically configured to convert the byte The second read data consistency request ReadOnce and the byte-converted second write data consistency request WriteUnique are arbitrated; here, because the consistency request interface between the second slave interface unit 112 and the snoop control unit 12 has only one Therefore, the arbitration sub-unit 1126 needs to arbitrate the second read data consistency request ReadOnce and the second write data consistency request WriteUnique, and then send the second read data consistency request ReadOnce or the second write data to the intercept control unit 12. Consistency request WriteUnique.
  • the slave interface unit 11 determines the protocol corresponding to the data consistency request received, the protocol conversion processing of the received data consistency request is not required, and the received data consistency request is directly sent to the listener. Control unit 12.
  • the first slave interface unit 11 is specifically configured to: according to a first in first out (FIFO) cache transfer type, a data address conflict, and a transfer transaction.
  • FIFO first in first out
  • the first read data consistency request of the first master unit 21 is sent to the snoop control unit 12, or the first write data consistency request of the first master unit 21 is sent to the interconnect unit 23 Directly initiating a write operation to the interconnect unit 23;
  • the first slave interface unit 111 supports a write response provided by the early wresp register to select a write response to return an early response or a write response to return normally. The way of response. Returning the early response mode to the write response, returning the write response after completing the write operation according to the write data consistency request; if the actual write response has an error error, the first slave interface unit 111 records the address and the ID of the error transmission. The normal write response is returned to the first master unit 21 for the write response to return to the normal response mode.
  • the first slave interface unit 111 is further configured to: update the rewritten dirty data to the memory and keep the copy.
  • the only CleanUnique request or the CleanInvalid request for the CleanShared request or the invalid copy shared by the duplicate is sent to the snoop control unit 12 to clean the copy; and only the copy of the unique MakeUnique request or only the invalid copy is retained.
  • the MakeInvalid request is sent to the snoop control unit 12 to perform a make operation on the replica.
  • the first slave interface unit 111 further has a data transmission timeout detection function.
  • the data transmission process it is determined by counting detection whether each phase of the data transmission is timed out; specifically, the first master device unit 21 moves to the slave through the handshake mechanism.
  • the device unit 31 sends a valid signal, and when the first slave interface unit 111 determines that the read signal returned by the slave device unit 31 is not received within the timeout threshold period, the data transmission is considered to be timed out, and a timeout interrupt is generated; the timeout threshold period may be Pre-configured according to actual conditions.
  • the first slave interface unit 111 sends the first read sent by the first master unit 21 according to the FIFO buffer transmission type, the data address conflict, and the order of the order between the transmission transactions. Or a write data consistency request is sent to the interconnect unit 23; the second slave interface unit 112 sends the second read or write data consistency request of the second master unit 22 directly to the interconnect unit 23 for access A corresponding slave unit 31; wherein the slave unit 31 includes at least one.
  • the intercept control unit 12 specifically Configured as: according to the first read data consistency request or the number of bytes converted
  • the second read data consistency request ReadOnce determines that the tag memory tag_ram is found, sends a snoop request to the hit target first main device unit 21, and acquires access data; if the first main device unit 21 does not respond to the snoop request, the snoop control unit 12 Then, the read data operation is sent to the interconnect unit 23 to obtain the read data; if it is determined that the tag memory tag_ram is not found, the read data operation is sent to the interconnect unit 23; or
  • the second slave interface unit 112 In response to the invalid request invalidate sent by the second slave interface unit 112, the second slave interface unit 112 initiates a write operation to the interconnect unit 23.
  • the interception control unit 12 includes: a flag control subunit snoop_tag_ctl 121, a data exchange subunit snoop_ddi 122, and an arbitration subunit snoop_arb123;
  • the tag control sub-unit 121 is configured to receive a first read or write data consistency request sent by the first slave interface unit 111, a second read or write consistency request sent by the second slave interface unit 112, and a data exchange.
  • the invalid request invalidate sent by unit 121, and arbitrate the execution of these requests;
  • the mark control sub-unit 121 is specifically configured to: according to the first read data consistency request or the second read data consistent The request ReadOnce finds the tag memory tag_ram. If the tag memory tag_ram is found, the hit result is generated according to the full cache data line in the tag memory tag_ram; wherein, if the full cache data line in the hit result is Full Cache Line is valid Status, the interception request is sent to the data exchange sub-unit 122 to obtain the read data; if the full cache data line in the hit result is Full Cache Line is invalid or the complete cache data line Full Cache Line does not exist in the hit result, the mark The control sub-unit 121 then uses the interconnection unit 23 to send a read memory request to the external memory memory; the operation type is ReadClean, the ReadClean refers to reading the shared data and the read shared data is not cached, the tag memory tag_ram Recorded full cached data accessed Whether the Full Cache Line
  • the flag control sub-unit 121 is further configured to ensure the order consistency of processing the requests.
  • the marking control sub-unit 121 is specifically configured to: according to the duplicate unique CleanUnique request or the duplicate, the CleanShared request or the complex
  • the invalid CleanInvalid request finds the tag memory tag_ram, and if the tag memory tag_ram is found, the hit result is generated according to the full cache data line in the tag memory tag_ram; wherein, if the full cache data line in the hit result is Full Cache Line In the active state, a snoop request is sent to the data exchange sub-unit 122 to obtain read data and data status. Wherein, for the ditry data that needs to be written back, the snoop control unit 12 sends a write operation to the interconnect unit 23.
  • the data exchange sub-unit 122 is configured to: send the snoop request to the first main device unit 21 according to the hit information, and receive The listener response cresponse and the monitor data cdata returned by the first master unit 21, and send the monitor data cdata to the first slave interface unit 111 or the second slave interface unit 112, to the first slave interface unit 111 or the second slave interface
  • the unit 112 sends a data consistency request operation completion indication; when the monitoring request is not responding, the label control sub-unit 121 is further configured to use the interconnection unit 23 to send a read external memory memory request to the external memory memory; the hit information includes : Hit result and operation type.
  • the switching subunit 122 is further configured to, after returning the invalid request response inv_done to the write operation conversion subunit 1124, send an invalid request corresponding to the tag memory tag_ram to the tag control subunit 121, so that the tag control subunit 121 sets the corresponding tag memory tag_ram Invalid state, while updating the tag memory tag_ram according to the update message written back to the WriteBack request; wherein the write back WriteBack request refers to the request sent by the first slave interface unit 111 to the snoop control unit 12 to write data back to the memory.
  • the tag control unit 121 is also required to reset the required tag memory tag_ram to the inactive state.
  • the mark control sub-unit 121 is further configured to use the interconnect unit 23 to send a write operation to the external memory memory to write the dirty data into the external memory memory.
  • the arbitration sub-unit 123 is specifically configured to: read the external memory memory request sent by the tag control sub-unit 121 and the data exchange.
  • the execution of the read external memory memory request sent by the subunit 122 is arbitrated, and the arbitrated read memory request is sent to the interconnect unit 23 to receive the read data returned by the interconnect unit 23;
  • the arbitration sub-unit 123 When the arbitration sub-unit 123 receives the read data sent by the data exchange sub-unit 122 and the read data returned by the interconnection unit 23, the arbitration sub-unit 123 is further configured as the intercept data sent to the data exchange sub-unit 122. After the read data returned by the interconnection unit 23 is arbitrated, the read data is transmitted to the first slave interface unit 111 or the second slave interface unit 112.
  • the snoop control unit 12 since the snoop control unit 12 is configured to maintain data consistency between the two clusters in the first main unit unit 21, to record the method of recording the full cache data line Full Cache Line state in the prior art, The Full Cache Line state of each full cache data line needs to consume a very large resource, and the method is complicated and difficult to implement; therefore, in this embodiment, the snoop control unit 12 uses a segment address counting method to record each cluster. Medium The existence status of the Full Cache Line of the full cache data line is not only easy to implement, but also can accurately record the state of the Full Cache Line of the full cache data line.
  • the method includes two basic characteristics: (1) if the record in the snoop control unit 12 indicates that a full cache data line Full Cache Line exists in a certain cluster, but in reality, due to the inaccuracy of the interception algorithm, the method The full cache data line Full Cache Line is likely to be in an invalid state in the cluster; (2) If the record in the snoop control unit 12 indicates that there is no full cache data line Full Cache Line in the cluster, then the cluster certainly does not The full cache data line Full Cache Line is included, that is, the full cache data line Full Cache Line is definitely in an invalid state in the cluster; therefore, the state of the full cache data line FullCache Line can be accurately recorded.
  • the slave interface unit 11 can provide a physical interface and an ASIC (Application Specific Intercrated Circuit) or a programmable logic array (FPGA) in the device for implementing data consistency.
  • the snoop control unit 12 can be implemented by an ASIC or FPGA in a device that implements data consistency.
  • This embodiment is based on the AMBA4ACE protocol, combined with the function of interconnect unit and data consistency, solves the problem of shared storage data consistency in multi-processor systems from hardware, reduces software intervention and external memory access times, and improves the system. Access efficiency reduces power consumption from memory access.
  • the device of the embodiment of the invention has a monitoring filtering function, which reduces unnecessary monitoring operations and further improves system performance.
  • the embodiment of the present invention further provides a method for implementing data consistency. As shown in FIG. 8, the method mainly includes the following steps:
  • Step 801 When it is determined that the protocol corresponding to the received data consistency request is not supported, perform protocol conversion processing on the received data consistency request.
  • the received data consistency request is not subjected to protocol conversion processing.
  • the method also includes:
  • Reading data consistency request ReadOnce for the byte number conversion to read the read data consistency request ReadOnce channel, multiplexing the read data channel;
  • the master device corresponding to the data consistency request includes the AXI master
  • different ACE_Lite transmission types are generated according to different AXI addresses in the AXI master, and the AXI protocol is supported.
  • the read or write data consistency request is converted to a read or write data consistency request that supports the ACE_Lite protocol so that the read or write data consistency request sent by the AXI master can be effectively sent, in other words, to enable the AXI master to send a read or The write data consistency request is correspondingly responded; wherein the transmission type includes: a write address
  • the listener of the channel requests AWSNOOP, the listen request ARSNOOP of the read address channel; the mapping relationship between the AXI address and the ACE_Lite transport type can be pre-configured.
  • the CAM when the transmitted data consistency request is a read data consistency request ReadOnce, the CAM, the split algorithm, and the control logic convert the byte number of the read data consistency request ReadOnce of the protocol conversion into a full cache data line Full Cache Line number; specifically, the read data consistency request ReadOnce of the received protocol conversion is byte-merged, and the extra bytes are filtered to meet the requirement of the original command data volume burst; here, because the interception control
  • the number of bytes required by the unit to read the data consistency request is the same as the number of bytes of the full cache data line of the cache data row, and the number of bytes of the read data consistency request ReadOnce after the protocol conversion has no similar limit, so Need to convert the number of bytes;
  • the number of bytes of the Full Cache Line of the full cache data line is usually 32 bytes or 64 bytes;
  • the original command data volume burst includes: a data bit width, a data type, and a data length, and the data bit width is generally 32 bits, 64 bits or 128 bit;
  • the data type includes: fixed type, increased type incr and wrap-around wrap;
  • the data length includes at least one piece of data, and the number of storage units of the CAM can be configured according to system requirements.
  • the lower address of the read data consistency request after the byte number conversion is 12'h18
  • the data bit width is 64 bit
  • the burst of the data type incr4 is split into the lower address of 12'h10
  • the data is The bit width is 128bit
  • the wrap2 and the lower address are 12'h20
  • the data bit width is 128bit
  • the wrap2 is the original two command data volume burst; wherein, the first original command data volume burst data does not need to be returned.
  • the second data of skip is skipped, and the first data of the second original command data volume burst is kept for two periods, corresponding to the addresses in the s side. 12'h20 and 12'h28 data; and, the s side pulls rlast_s high when receiving the fourth data;
  • the read data consistency request in the byte number conversion can be read as the lower address of 12'h18, the data bit width is 64 bit, and the original command data volume of wrap4 is burst into two low-order addresses, which are 12'. H10, the data bit width is 128bit, and the wrap2 burst.
  • the second data of the first original command data volume burst is held for two periods, corresponding to the data of the 12'h00 and 12'h08 addresses on the s side, and the rlast_s is pulled when the s side receives the fourth data.
  • the s side refers to an interface signal of the slave device
  • the m side Refers to the interface signal of the master device unit
  • the information on the s side is the information on the m side that is output after being converted from the interface unit
  • the s-side information includes: araddr_s, arvalid_s, arready_s, rdata_s, rlast_s, rvalid_s, and rready_s;
  • the araddr_s refers to an address of the s-side read address channel; and the arvalid_s refers to a request of the s-side read address channel;
  • Arready_s refers to the s-side read address channel request response;
  • the rdata_s refers to the read data of the s-side read data channel;
  • the rlast_s refers to the indication signal of the last read data on the s side; and
  • the rvalid_s refers to the s-side read data.
  • the request of the channel; the ready_s refers to the request response of the s-side read data channel;
  • the information on the m side includes: araddr_m, arvalid_m, arready_m, rdata_m, rlast_m, rvalid_m, and rready_m; the araddr_m is an address of an m-side read address channel; and the arvalid_m is a request of an m-side read address channel; Arready_m refers to the request response of the m-side read address channel; the rdata_m refers to the read data of the m-side read data channel; the rlast_m refers to the last read data consistency request signal of the m side, and the rvalid_m refers to the m side
  • the request for reading the data channel; the ready_m refers to the request response of the m-side read data channel; the beat_complete refers to the end of the current data; the last_match refers to the last data; the above araddr_s, arvalid_s, arready_s, rvalid_s, Rlast_s, rdata
  • the read data consistency request ReadOnce is converted by the buffer buffer byte number conversion, and the ReadOnce is distributed for the read data consistency request after the byte number conversion.
  • a consistency request channel the multiplexed read data channel; wherein the multiplexed read data channel is: when the monitoring control unit of the device implementing data consistency and the interconnecting unit of the device implementing the data consistency simultaneously return the read data At the same time, the read data of the interception control unit is returned first.
  • the ordering of the blocking transmission transactions includes: after all the consistent transmission data requests are completed, the current non-consistent transmission data request can be issued; or, all the non-uniform After the sexual transmission data request is completed, the current request for consistent data transmission can be issued.
  • the data consistency request sent is a write data consistency request WriteUnique
  • the number of bytes of the write data consistency request WriteUnique converted by the protocol is converted into a full cache data line Full Cache by using CAM, split algorithm and control logic. Line number of bytes;
  • the interception control unit designed by the embodiment of the present invention requires that the number of bytes of the write data consistency request WriteUnique be the same as the number of bytes of the full cache data line Full Cache Line, and the write data consistency request after the protocol conversion
  • the number of bytes in WriteUnique has no similar restrictions, so the number of bytes needs to be converted, and the write data consistency request WriteUnique after the protocol conversion is split.
  • the original command data volume is the total word of the burst.
  • the number of sections is less than or equal to the full cache data line Full Cache Line bytes, and the received write response is merged to meet the requirements of the original command data volume burst;
  • the read data consistency request ReadOnce is similar to the read data consistency request ReadOnce. For example, if the full cache data line requires a full Cache Line byte number of 32 bytes and a data bit width of 128 bits, the corresponding burst data bit width is also 128 bits.
  • the data type is rewind type, and the wrap length is 2 (wrap2); then the interface timing of the write data consistency request WriteUnique conversion is as shown in FIG. 6.
  • the lower address of WriteUnique is 12'h18
  • the data bit width is 64bit
  • the original command data volume burst of data type incr4 is split into low-order address of 12'h18, data bit width of 64bit, incr1 and low-order address of 12'h20.
  • the data bit width is 64 bit, incr3 two original command data volume burst; and the two bresp returned from the m side are merged into one bresp and then sent from the s side;
  • the byte address conversion write data consistency request WriteUnique low address is 12'h10
  • data bit width is 128bit
  • wrap4 original command data volume burst is split into low address 12'h10
  • data The bit width is 128bit, the burst of incr1, the lower address is 12'h20
  • the data bit width is 128bit
  • the burst and lower address of incr2 are 12'h00
  • the data bit width is 128bit, the burst of incr1
  • the m side returns three
  • the write data consistency request WriteUnique is converted by the buffer buffer byte number conversion, and the WriteUnique distribution is requested for the byte data conversion write data consistency request.
  • Write data consistency request And then adjusting the number of bytes of the invalid request invalidate to be equal to the number of WriteUnique bytes of the write data consistency request after the byte conversion, sending an invalid request invalidate to the intercept control unit, and receiving the returned invalid request response inv_done, A write operation is initiated to the interconnect unit to buffer the write data response channel.
  • the invalid request response inv_done returned by the snoop control unit may be out of order, in order to ensure the consistency of the write data consistency request WriteUnique and the sent write data consistency request WriteUnique order after the byte number conversion, the invalid request invalidate
  • the identifier inv_id also adds a buffer number in the write data consistency request WriteUnique after the byte number conversion, and saves it in the buffer; if the returned identifier The inv_id is the same as the saved buffer number, and the corresponding write data consistency request WriteUnique is sent to the interconnect unit.
  • Step 702 Determine, according to the data consistency request processed by the protocol conversion, the corresponding data consistency operation device, and perform data consistency operation on the data consistency operation device.
  • the read data consistency request ReadOnce and the write data consistency request WriteUnique are simultaneously received, the read data consistency request ReadOnce and the byte number converted write data are consistent with the byte number conversion.
  • the execution of the write request WriteUnique is arbitrated, and the ReadOnce or Write Data Consistency Request WriteUnique is sent to the intercept control unit according to the read data consistency request after the arbitration; here, because the data consistency is achieved There is only one consistency request interface between the second slave interface unit and the snoop control unit of the device, so the second slave interface unit needs to arbitrate the execution of the read data consistency request ReadOnce and the write data consistency request WriteUnique. Sending a read data consistency request ReadOnce to the snoop control unit, or sending an invalid request invalidate to the snoop control unit according to the write data consistency request WriteUnique.
  • the request after the arbitration is a read data consistency request ReadOnce
  • the read data consistency request ReadOnce is sent to the interception control unit, it is also required to be consistent according to the write data.
  • the sexual request WriteUnique sends an invalidation request to the interception control unit; or,
  • the read data consistency request ReadOnce is also sent to the intercept control. unit.
  • the method arbitrates the execution of the read data consistency request ReadOnce and the write data consistency request WriteUnique, and may also perform arbitration according to the least recently accessed or pseudo-random arbitration mode.
  • the determining, according to the data consistency request after the protocol conversion processing, the corresponding data consistency operation device, performing data consistency operation on the data consistency operation device including:
  • searching for the tag memory determining to find the tag memory, initiating the monitoring to the main device unit corresponding to the tag memory to obtain the read data; determining that the tag memory is not found, The unit gets the read data.
  • the read data consistency request ReadOnce is determined according to the protocol conversion, and when the tag memory tag_ram is found, the first corresponding to the tag memory tag_ram is found.
  • the master device unit sends a listening request to obtain the access data; if the first master device unit does not respond to the monitoring request, sends a read data operation instruction to the interconnect unit to acquire the read data; if it is determined that the tag memory tag_ram is not found, The interconnect unit sends a read data operation instruction to acquire read data; or,
  • the data consistency request device determines a corresponding data consistency operation device, and performs data consistency operation on the data consistency operation device.
  • the read data consistency request ReadOnce looks up the tag memory tag_ram according to the protocol conversion, and if the tag memory tag_ram is found, sends a snoop request to the sending first master device unit, which specifically includes:
  • ReadOce looks up the tag memory tag_ram according to the read data consistency after the protocol conversion, and if the tag memory tag_ram is found, generates a hit result according to the full cache data line in the tag memory tag_ram; wherein, if the hit result is The full cache data line Full Cache Line is valid, then send a listen request to the first master unit to obtain read data; if the full cache data line in the hit result is Full Cache Line is invalid or the hit result does not exist intact Cache the data line Full Cache Line, then use the interconnection unit to send a read external memory memory request to the external memory memory; the operation type is ReadClean, the ReadClean refers to reading the shared data and the read shared data is not cached,
  • the tag memory tag_ram records whether the accessed full cache data line FullCache Line exists in the cache of the first master unit; the second slave interface unit can also listen to the first corresponding to the first master unit Determine from the interface unit whether the number of accesses can be obtained. According to the data; if the data
  • the intercept control unit When the intercept control unit receives the invalid request invalidate, the invalid request response inv_done is returned, and the second slave interface unit sends a write operation indication to the interconnect unit according to the invalid request response inv_done, and the intercept control unit responds according to the invalid request of the corresponding tag memory tag_ram.
  • the tag memory tag_ram is set to an invalid state, and the tag_ram is updated according to the update message written back to the WriteBack request; wherein the write back WriteBack request refers to writing the data back to the external slave interface unit to the intercept control unit Memory memory request.
  • a read data consistency request that does not require protocol conversion is sent to the interception control unit according to the first-in first-out FIFO buffer transfer type, the data address conflict, and the order of the transfer transaction ordering.
  • the processing flow of the read data consistency request for the interception control unit to the protocol conversion is the same as the processing flow of the read data consistency request after the protocol conversion.
  • the intercept control unit simultaneously receives the read data consistency request without protocol conversion and the read data consistency request ReadOnce after the protocol conversion, the read data consistency request and the protocol are not required for protocol conversion.
  • the read data consistency request of the converted read data is arbitrated by the execution of the ReadOnce, and if the request after the arbitration control unit arbitrates is the read data consistency request that does not need to perform protocol conversion, the read data that does not need to be converted by the protocol is After the consistency request is processed, the read data consistency request ReadOnce is also processed; or if the interception control unit arbitrates the request is the protocol converted read data consistency request ReadOnce Then, after the ReadOnce processing of the protocol-converted read data consistency request is completed, a read data consistency request that does not need to perform protocol conversion needs to be processed.
  • the intercept control unit needs to ensure Handle the order consistency of these requests.
  • the first interface slave unit supports a manner of selecting a write response to return an early response or a write response to return a normal response by a control signal provided by an early wresp register. Returning the early response method to the write response in advance, when there is no need to perform protocol transfer After the write data consistency request completes the write operation, the write response is returned; if the actual write response has an error error, the first interface slave unit records the address and ID of the error transmission; for the write response, the normal response mode is returned. The actual write response is returned to the first master unit.
  • the first interface slave unit further has a data transmission timeout detection function, and during the data transmission process, it is determined by counting detection whether each phase of the data transmission times out. Specifically, the first master device unit sends a valid signal to the slave device unit by using a handshake mechanism, and when the first slave interface unit determines that the read signal returned by the slave device unit is not received within the timeout threshold period, the data transmission is considered to be timed out. A timeout interrupt is generated; the timeout threshold period can be pre-configured according to actual conditions.
  • the intercept control unit searches for the tag memory tag_ram according to the duplicate unique CleanUnique request or the duplicate CommonShared request or the duplicate invalid CleanInvalid request. If the tag memory tag_ram is found, a hit result is generated according to the full cache data line Full Cache Line information in the tag memory tag_ram; wherein, if the full cache data line Full Cache Line in the hit result is in a valid state, then the first master device is The unit sends a listening request, and receives the listening response cresponse and the listening data cdata returned by the first main device unit. When the dirty data needs to be written into the external memory memory, the monitoring control unit uses the interconnect unit to send a write operation to the external memory memory to Write dirty data to the external memory memory.
  • the interception control unit uses a segment address counting method to record complete in each cluster.
  • Cache data line The existence status of Full Cache Line is not only easy to implement, but also can accurately record the status of the full cache data line Full Cache Line.
  • the method includes two basic characteristics: (1) if the record in the intercept control unit indicates that a full cache data line Full Cache Line exists in a certain cluster, but in fact, due to the inaccuracy of the interception algorithm, the complete cache is caused.
  • the data line Full Cache Line is likely to be in an invalid state in the cluster; (2) if the record in the intercept control unit indicates that there is no full cache data line Full Cache Line in the cluster, the cluster definitely does not contain the complete Cache data line Full Cache Line, that is, the full cache data line Full Cache Line is definitely in an invalid state in this cluster; therefore, the state of the full cache data line Full Cache Line can be accurately recorded.
  • the ordering ordering of the blocking transmission transaction includes: after all the consistent transmission data requests are completed, the current non-consistent transmission data request can be sent; or, after all the unconsistent transmission data requests are completed, the current consistency transmission data is The request can be issued.
  • the write data consistency request WriteUnique address of the byte number conversion is sent to the first slave interface unit, and if there is a conflict with the other write data consistency request, the other write data consistency is blocked.
  • CAM For RAW conflicts, use CAM to save the write address channel identifier awid and write address channel address of the unprocessed data consistency request, read the miss address of the data consistency request, and determine whether the miss address and the pending address of the read data consistency request are the same.
  • the conflict signal hazard is returned to ensure that the write data consistency request after the byte number conversion request WriteUnique completes the operation, and only after the byte data conversion write data consistency request WriteUnique completes the operation, Initiating a read data operation to the interconnect unit; wherein the write address channel identifier awid is used to find the write response channel identifier bid and read data from the CAM; the RAW means that the first master device unit writes the address region After the operation, the second master device unit performs a read operation on the address region; or after the first master device unit performs a write operation on the address region, the second master device unit performs a read operation on the address region.
  • the protocol conversion processing of the received data consistency request is not required, and the received data consistency request is sent to the interception control unit.
  • the monitoring control unit determines, according to the data consistency request, a corresponding data consistency operation device, and performs data consistency operation on the data consistency operation device.
  • the data consistency request is directly sent to the interconnect unit according to the FIFO buffer transmission type, the data address conflict, and the order of the transmission transaction, to access the corresponding slave unit.
  • the solution provided by the embodiment of the invention solves the problem of shared storage data consistency in the multi-processor system from hardware, reduces software intervention and external memory access times, improves system access efficiency, and reduces work brought by memory access. Consumption.
  • the device corresponding to the solution of the embodiment of the present invention has a monitoring filtering function, which reduces unnecessary monitoring operations and further improves system performance.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Abstract

Disclosed are a device and method for realizing data consistency, and a computer storage medium. The method comprises: when it is determined that a protocol corresponding to a received data consistency request is not supported, conducting protocol conversion processing on the received data consistency request; according to the data consistency request after the protocol conversion processing, determining a corresponding data consistency operation apparatus, and conducting a data consistency operation on the data consistency operation apparatus.

Description

一种实现数据一致性的方法、装置及计算机存储介质Method, device and computer storage medium for realizing data consistency 技术领域Technical field
本发明涉及数据存储一致性的技术领域,尤其涉及一种实现数据一致性的方法、装置及计算机存储介质。The present invention relates to the technical field of data storage consistency, and in particular, to a method, an apparatus, and a computer storage medium for implementing data consistency.
背景技术Background technique
目前,片内多处理器系统中的多个处理器都具有各自的高速缓冲存储器(cache),在保证多个cache之间以及cache与共享存储器之间的数据一致性时,会影响系统的性能和系统的精确性,因此,如何更有效地保证片内多处理器系统中数据存储的一致性是急需解决的重要问题。Currently, multiple processors in an on-chip multiprocessor system have their own caches that affect system performance when guaranteeing data consistency between multiple caches and between cache and shared memory. And the accuracy of the system, therefore, how to more effectively ensure the consistency of data storage in the on-chip multiprocessor system is an important issue that needs to be solved urgently.
发明内容Summary of the invention
针对现有技术存在的问题,本发明实施例提供了一种实现数据一致性的方法及装置。In view of the problems existing in the prior art, embodiments of the present invention provide a method and apparatus for implementing data consistency.
本发明实施例提供了一种实现数据一致性的装置,所述装置包括:从接口单元及监听控制单元;其中,An embodiment of the present invention provides an apparatus for implementing data consistency, where the apparatus includes: a slave interface unit and a listening control unit;
所述从接口单元,配置为确定不支持接收的数据一致性请求对应的协议时,对接收的数据一致性请求进行协议转换处理,并将协议转换处理后的数据一致性请求发送至所述监听控制单元;The slave interface unit, configured to determine a protocol corresponding to the received data consistency request, performs protocol conversion processing on the received data consistency request, and sends the data conversion request processed by the protocol conversion to the monitoring control unit;
所述监听控制单元,配置为根据所述从接口单元发送的数据一致性请求,确定对应的数据一致性操作设备,对所述数据一致性操作设备进行数据一致性操作。The monitoring control unit is configured to determine, according to the data consistency request sent by the slave interface unit, a corresponding data consistency operation device, and perform data consistency operation on the data consistency operation device.
上述方案中,所述监听控制单元,还配置为当收到的数据一致性请求为两个以上数据一致性请求时,对收到的两个以上数据一致性请求的执行 进行仲裁,根据仲裁后的数据一致性请求,确定对应的数据一致性操作设备,对所述数据一致性操作设备进行数据一致性操作。In the above solution, the interception control unit is further configured to perform execution of two or more data consistency requests received when the received data consistency request is more than two data consistency requests. Arbitration is performed to determine a corresponding data consistency operation device according to the data consistency request after the arbitration, and perform data consistency operation on the data consistency operation device.
上述方案中,所述从接口单元,还配置为确定支持接收的数据一致性请求对应的协议时,将接收的数据一致性请求发送至所述监听控制单元。In the above solution, the slave interface unit is further configured to send the received data consistency request to the interception control unit when determining that the protocol corresponding to the received data consistency request is supported.
上述方案中,所述从接口单元包括:第一从接口单元及第二从接口单元;其中,In the above solution, the slave interface unit includes: a first slave interface unit and a second slave interface unit; wherein
所述第一从接口单元,配置为将接收的来自第一主设备单元的第一读数据一致性请求发送至所述监听控制单元;The first slave interface unit is configured to send the received first read data consistency request from the first master unit to the intercept control unit;
所述第二从接口单元,配置为将接收的来自第二主设备单元的数据一致性请求进行协议转换处理,并将协议转换处理后的数据一致性请求发送至所述监听控制单元。The second slave interface unit is configured to perform a protocol conversion process on the received data consistency request from the second master device unit, and send the protocol conversion processed data consistency request to the interception control unit.
上述方案中,所述第二从接口单元,配置为:将接收的第二主设备单元发送的支持高级可扩展接口(AXI,Advanced eXtensible Interface)协议的数据一致性请求转换成支持ACE_Lite协议的数据一致性请求;并将协议转换后的数据一致性请求的字节数转换成完整缓存数据行Full Cache Line字节数。In the above solution, the second slave interface unit is configured to: convert the data consistency request sent by the received second master unit to the Advanced Entity Interface (AXI) protocol into data supporting the ACE_Lite protocol. Consistency request; converts the number of bytes of the data-consistent request after the protocol conversion into the full cache data line Full Cache Line bytes.
上述方案中,所述第二从接口单元包括:协议转换子单元、读操作转换子单元、读接口子单元、写操作转换子单元、以及写接口子单元;其中,In the above solution, the second slave interface unit includes: a protocol conversion subunit, a read operation conversion subunit, a read interface subunit, a write operation conversion subunit, and a write interface subunit; wherein
所述协议转换子单元,配置为将接收的第二主设备单元发送的支持AXI协议的数据一致性请求转换成支持ACE_Lite协议的数据一致性请求;The protocol conversion subunit is configured to convert a data consistency request sent by the received second master unit to support the AXI protocol into a data consistency request supporting the ACE_Lite protocol;
所述读操作转换子单元,配置为当第二主设备单元发送的数据一致性请求为第二读数据一致性请求时,将协议转换后的第二读数据一致性请求的字节数转换成完整缓存数据行Full Cache Line字节数;The read operation conversion subunit is configured to convert, when the data consistency request sent by the second master device unit is the second read data consistency request, the number of bytes of the second read data consistency request after the protocol conversion is converted into Full cache data line Full Cache Line bytes;
所述读接口子单元,配置为为所述字节数转换后的第二读数据一致性请求分发第二读数据一致性请求通道,复用读数据通道; The read interface sub-unit is configured to distribute a second read data consistency request channel for the second read data consistency request after the byte number conversion, and multiplex the read data channel;
所述写操作转换子单元,配置为当第二主设备单元发送的数据一致性请求为第二写数据一致性请求时,将协议转换后的第二写数据一致性请求的字节数转换成完整缓存数据行Full Cache Line字节数;The write operation conversion subunit is configured to convert, when the data consistency request sent by the second master device unit is the second write data consistency request, the number of bytes of the second write data consistency request after the protocol conversion is converted into Full cache data line Full Cache Line bytes;
所述写接口子单元,配置为为所述字节数转换后的第二写数据一致性请求分发第二写数据一致性请求通道,缓存写数据响应通道。The write interface sub-unit is configured to distribute a second write data consistency request channel for the second write data consistency request after the byte number conversion, and cache the write data response channel.
上述方案中,所述第二从接口单元还包括:仲裁子单元,配置为当同时收到所述读接口子单元与所述写接口子单元发送的数据一致性请求时,对所述字节数转换后的第二读数据一致性请求及所述字节数转换后的第二写数据一致性请求的执行进行仲裁,并根据仲裁后的第二读数据一致性请求或第二写数据一致性请求向所述监听控制单元发送相应的数据一致性请求。In the above solution, the second slave interface unit further includes: an arbitration subunit configured to: when receiving the data consistency request sent by the read interface subunit and the write interface subunit simultaneously, the byte Arbitration of the second read data consistency request after the number conversion and the execution of the second write data consistency request after the byte number conversion, and according to the second read data consistency request or the second write data after the arbitration The sexual request sends a corresponding data consistency request to the interception control unit.
上述方案中,所述读接口子单元还配置为阻塞传输事务间顺序。In the above solution, the read interface sub-unit is further configured to block the transmission inter-transaction sequence.
上述方案中,写接口子单元还配置为阻塞传输事务间顺序、处理写后写WAW和读后写RAW冲突。In the above solution, the write interface sub-unit is further configured to block the transmission inter-transaction sequence, handle the write-before-write WAW, and the post-write RAW conflict.
上述方案中,所述第一从接口单元,还配置为将来自第一主设备单元的第一写数据一致性请求发送至互连单元,直接向互连单元发起写操作。In the above solution, the first slave interface unit is further configured to send a first write data consistency request from the first master unit to the interconnect unit, and directly initiate a write operation to the interconnect unit.
上述方案中,所述监听控制单元包括标记控制子单元及数据交换子单元;其中,In the above solution, the interception control unit includes a mark control subunit and a data exchange subunit; wherein
所述标记控制子单元,配置为接收第一从接口单元发送的第一读和/或第一写数据一致性请求、第二从接口单元发送的第二读和/或第二写一致性请求及数据交换子单元发送的无效请求invalidate,并对这些请求的执行进仲裁;当仲裁后的请求是第一读数据一致性请求或第二读数据一致性请求时,根据第一读数据一致性请求或第二读数据一致性请求查找标记存储器,如果查找到标记存储器,则根据标记存储器中的完整缓存数据行Full Cache Line信息生成命中结果;若命中结果中的完整缓存数据行Full Cache Line 是有效状态,则向所述数据交换子单元发送监听请求,以获取读数据;若命中结果中的完整缓存数据行Full Cache Line是无效状态或命中结果中不存在完整缓存数据行Full Cache Line,则利用互连单元获取读数据;The tag control subunit is configured to receive a first read and/or first write data consistency request sent by the first slave interface unit, a second read and/or a second write consistency request sent by the second slave interface unit And the invalidation request invalidate sent by the data exchange subunit, and arbitrate the execution of the requests; when the arbitrated request is the first read data consistency request or the second read data consistency request, according to the first read data consistency The request or the second read data consistency request looks up the tag memory. If the tag memory is found, the hit result is generated according to the full cache data line in the tag memory; if the full cache data line in the hit result is Full Cache Line If the status is valid, the monitoring request is sent to the data exchange sub-unit to obtain the read data; if the full cache data line in the hit result is a valid Cache Line, the full cache data line does not exist in the full cache data line, Then using the interconnection unit to obtain read data;
所述数据交换子单元,配置为根据命中信息将所述监听请求发送至第一主设备单元,接收第一主设备单元返回的监听响应和监听数据,并将监听数据发送至第一从接口单元或第二从接口单元后,向第一从接口单元或第二从接口单元发送数据一致性请求操作完成指示。The data exchange sub-unit is configured to send the interception request to the first main device unit according to the hit information, receive the intercept response and the intercept data returned by the first main unit, and send the intercept data to the first slave interface unit. Or after the second slave interface unit, send a data consistency request operation completion indication to the first slave interface unit or the second slave interface unit.
上述方案中,所述标记控制子单元,还配置为当监听请求无响应时,利用互连单元获取读数据。In the above solution, the tag control subunit is further configured to acquire read data by using the interconnect unit when the snoop request is unresponsive.
上述方案中,所述数据交换子单元,还配置为收到第二从接口单元发送的无效请求后,向第二从接口单元返回无效请求响应;并向所述标记控制子单元发送对应标记存储的无效请求;In the above solution, the data exchange sub-unit is further configured to: after receiving the invalid request sent by the second slave interface unit, return an invalid request response to the second slave interface unit; and send corresponding tag storage to the tag control sub-unit Invalid request;
相应地,所述标记控制子单元,还配置为收到数据交换子单元的无效请求后,将相应标记存储器设置成无效状态,同时根据收到的写回请求中的更新消息更新标记存储器;Correspondingly, the tag control subunit is further configured to: after receiving the invalid request of the data exchange subunit, set the corresponding tag memory to an invalid state, and update the tag memory according to the update message in the received writeback request;
第二从接口单元,还配置为收到数据交换子单元的响应后,向互连单元发起写操作。The second slave interface unit is further configured to initiate a write operation to the interconnect unit after receiving the response of the data exchange subunit.
上述方案中,所述监听控制单元还包括仲裁子单元,配置为:对标记控制子单元发送的读外部存储器memory请求及所述数据交换子单元发送的读外部存储器请求的执行进行仲裁,并将仲裁后的读请求发送至互连单元,接收互连单元返回的读数据。In the above solution, the intercept control unit further includes an arbitration subunit configured to: arbitrate the read external memory memory request sent by the mark control subunit and the execution of the read external memory request sent by the data exchange subunit, and The read request after arbitration is sent to the interconnect unit to receive the read data returned by the interconnect unit.
本发明实施例还提供了一种实现数据一致性的方法,所述方法还包括:The embodiment of the invention further provides a method for implementing data consistency, the method further comprising:
确定不支持接收的数据一致性请求对应的协议时,对接收的数据一致性请求进行协议转换处理;When determining that the protocol corresponding to the received data consistency request is not supported, performing protocol conversion processing on the received data consistency request;
根据协议转换处理后的数据一致性请求,确定对应的数据一致性操作 设备,对所述数据一致性操作设备进行数据一致性操作。Determine the corresponding data consistency operation according to the data consistency request after the protocol conversion process The device performs data consistency operations on the data consistency operating device.
上述方案中,所述对接收的数据一致性请求进行协议转换处理,包括:In the foregoing solution, the performing a protocol conversion process on the received data consistency request includes:
将接收的支持AXI协议的数据一致性请求转换成支持ACE_Lite协议的数据一致性请求;并将协议转换后的数据一致性请求的字节数转换成完整缓存数据行Full Cache Line字节数。The received data consistency request supporting the AXI protocol is converted into a data consistency request supporting the ACE_Lite protocol; and the number of bytes of the data-consistent request after the protocol conversion is converted into the full cache data line Full Cache Line byte number.
上述方案中,当接收的数据一致性请求为读一致性请求时,所述根据协议转换处理后的数据一致性请求,确定对应的数据一致性操作设备,对所述数据一致性操作设备进行数据一致性操作,包括:In the above solution, when the received data consistency request is a read consistency request, the data consistency request device according to the protocol conversion process determines a corresponding data consistency operation device, and performs data on the data consistency operation device. Consistent operations, including:
根据协议转换处理后的读数据一致性请求,查找标记存储器,确定查找到标记存储器,向查找到的标记存储器对应的主设备单元发起监听,以获取读数据;确定未查找到标记存储器时,利用互连单元获取读数据。According to the read data consistency request after the protocol conversion process, the tag memory is searched, the tag memory is found, the main device unit corresponding to the tag memory is found to be monitored to obtain the read data, and the tag memory is not found. The interconnect unit acquires read data.
上述方案中,所述方法还包括:In the above solution, the method further includes:
当监听无响应时,利用互连单元获取读数据。When the listener is not responding, the read unit is used to acquire the read data.
上述方案中,当接收的数据一致性请求为写一致性请求时,所述根据协议转换处理后的数据一致性请求,确定对应的数据一致性操作设备,对所述数据一致性操作设备进行数据一致性操作,包括:In the above solution, when the received data consistency request is a write consistency request, the data consistency request device according to the protocol conversion process determines a corresponding data consistency operation device, and performs data on the data consistency operation device. Consistent operations, including:
根据字节数转换后的写数据一致性请求向实现数据一致性的装置的监听控制单元发送无效请求;Sending an invalidation request to the interception control unit of the device implementing data consistency according to the write data consistency request after the byte number conversion;
所述监听控制单元返回无效请求响应;The interception control unit returns an invalid request response;
根据无效请求响应,向实现数据一致性的装置的互连单元发起写操作。A write operation is initiated to the interconnect unit of the device implementing data consistency based on the invalid request response.
上述方案中,所述方法还包括:In the above solution, the method further includes:
阻塞传输事务间顺序;和/或,Blocking the order of transmission transactions; and/or,
处理WAW和RAW冲突。Handles WAW and RAW conflicts.
本发明实施例又提供了一种计算机存储介质,所述计算机存储介质包括一组指令,当执行所述指令时,引起至少一个处理器执行上述的实现数 据一致性的方法。The embodiment of the present invention further provides a computer storage medium, the computer storage medium comprising a set of instructions, when executed, causing at least one processor to execute the implementation number According to the method of consistency.
本发明实施例提供的实现数据一致性的装置、方法及计算机存储介质,确定不支持接收的数据一致性请求对应的协议时,对接收的数据一致性请求进行协议转换处理,根据协议转换处理后的数据一致性请求,确定对应的数据一致性操作设备,对所述数据一致性操作设备进行数据一致性操作,如此,可通过协议转换处理,解决大多数系统中不兼容ACE_Lite协议的问题,从而有效的解决了片内多处理器系统中存在的共享数据一致性问题。The device, the method, and the computer storage medium for implementing data consistency provided by the embodiment of the present invention determine a protocol corresponding to the received data consistency request, perform protocol conversion processing on the received data consistency request, and perform conversion processing according to the protocol. The data consistency request determines the corresponding data consistency operation device, performs data consistency operation on the data consistency operation device, and thus can solve the problem that the ACE_Lite protocol is incompatible in most systems through protocol conversion processing, thereby Effectively solve the problem of shared data consistency in the on-chip multiprocessor system.
附图说明DRAWINGS
在附图(其不一定是按比例绘制的)中,相似的附图标记可在不同的视图中描述相似的部件。具有不同字母后缀的相似附图标记可表示相似部件的不同示例。附图以示例而非限制的方式大体示出了本文中所讨论的各个实施例。In the drawings, which are not necessarily to scale, the Like reference numerals with different letter suffixes may indicate different examples of similar components. The drawings generally illustrate the various embodiments discussed herein by way of example and not limitation.
图1为本发明实施例一提供的实现数据一致性的一种装置结构示意图;1 is a schematic structural diagram of an apparatus for implementing data consistency according to Embodiment 1 of the present invention;
图2为本发明实施例一提供的实现数据一致性的另一种装置结构示意图;2 is a schematic structural diagram of another apparatus for implementing data consistency according to Embodiment 1 of the present invention;
图3为本发明一具体实施例的实现数据一致性的装置结构示意图;3 is a schematic structural diagram of an apparatus for implementing data consistency according to an embodiment of the present invention;
图4为本发明实施例一提供的第二从接口单元结构示意图;4 is a schematic structural diagram of a second slave interface unit according to Embodiment 1 of the present invention;
图5为本发明实施例一、二提供的读数据一致性请求转换时的接口时序示意图;FIG. 5 is a schematic diagram of an interface sequence when a read data consistency request is provided according to Embodiments 1 and 2 of the present invention;
图6为本发明实施例一提供的写数据一致性请求转换时的接口时序示意图;6 is a schematic diagram of an interface timing when a write data consistency request is converted according to Embodiment 1 of the present invention;
图7为本发明实施例一提供的监听控制单元结构示意图;FIG. 7 is a schematic structural diagram of a snoop control unit according to Embodiment 1 of the present invention;
图8为本发明实施例二提供的实现数据一致性的方法流程示意图。 FIG. 8 is a schematic flowchart of a method for implementing data consistency according to Embodiment 2 of the present invention.
具体实施方式detailed description
为了能更好的理解本发明实施例的内容,本文先介绍现有技术中常用的维护数据一致性的方法;现有技术中一般包括软件维护一致性的方法和硬件维护一致性的方法;软件维护一致性的方法虽然较容易实现,但精确性不高,并且在维护过程中会降低系统性能;硬件维护一致性的方法虽然设计复杂,但能够提高系统性能;例如,ARM公司发布的一种硬件维护一致性的架构,是基于高级微控制器总线架构(AMBA,Advanced Microcontroller Bus Architecture)的总线监听及ACE(AXI Coherency Extensions)协议来实现的;其中,ACE协议是在AXI协议一致性方面扩展的协议,ACE_Lite协议是ACE协议的子集,一般来讲,自身有cache的处理器可以支持ACE协议,而自身没有cache的处理器或其它设备则支持ACE_Lite协议。In order to better understand the content of the embodiments of the present invention, the method for maintaining data consistency commonly used in the prior art is first introduced; the prior art generally includes a method for maintaining software consistency and a method for maintaining consistency of hardware; Although the method of maintaining consistency is easier to implement, the accuracy is not high, and the system performance is degraded during the maintenance process. Although the hardware maintenance consistency method is complicated in design, it can improve system performance; for example, a type released by ARM The architecture of hardware maintenance consistency is implemented based on the bus monitoring and ACE (AXI Coherency Extensions) protocol of Advanced Microcontroller Bus Architecture (AMBA); among them, the ACE protocol is extended in terms of AXI protocol consistency. The ACE_Lite protocol is a subset of the ACE protocol. In general, a processor with its own cache can support the ACE protocol, while a processor or other device that does not have a cache supports the ACE_Lite protocol.
但是,由于目前支持ACE协议的处理器较少,并且大部分输入输出(IO,Input Output)设备只支持AXI协议,不支持ACE_Lite协议。因此在绝大部分的片内多处理器系统中,是不能兼容ACE_Lite协议的,从而导致片内多处理器系统中存在共享数据一致性的问题。However, since there are currently few processors supporting the ACE protocol, and most of the input and output (IO, Input Output) devices only support the AXI protocol, the ACE_Lite protocol is not supported. Therefore, in most of the on-chip multiprocessor systems, the ACE_Lite protocol is not compatible, resulting in the problem of shared data consistency in the on-chip multiprocessor system.
基于此,在本发明的各种实施例中:确定不支持接收的数据一致性请求对应的协议时,对接收的数据一致性请求进行协议转换处理,根据协议转换处理后的数据一致性请求,确定对应的数据一致性操作设备,对所述数据一致性操作设备进行数据一致性操作。Based on this, in various embodiments of the present invention, when determining that the protocol corresponding to the received data consistency request is not supported, performing protocol conversion processing on the received data consistency request, and converting the processed data consistency request according to the protocol, Determining a corresponding data consistency operation device, and performing data consistency operation on the data consistency operation device.
下面通过附图及具体实施例对本发明的技术方案做进一步地详细说明。The technical solution of the present invention will be further described in detail below through the accompanying drawings and specific embodiments.
实施例一 Embodiment 1
本实施例提供一种实现数据一致性的装置,如图1所示,所述装置包括:从接口单元11及监听控制单元12;其中, The embodiment provides a device for implementing data consistency. As shown in FIG. 1 , the device includes: a slave interface unit 11 and a monitoring control unit 12;
所述从接口单元11,配置为确定不支持接收的数据一致性请求对应的协议时,对接收的数据一致性请求进行协议转换处理,并将协议转换处理后的数据一致性请求发送至所述监听控制单元12;The slave interface unit 11 is configured to determine a protocol corresponding to the received data consistency request, perform protocol conversion processing on the received data consistency request, and send the protocol conversion processed data consistency request to the Monitoring control unit 12;
所述监听控制单元12,配置为根据所述从接口单元11发送的数据一致性请求,确定对应的数据一致性操作设备,对所述数据一致性操作设备进行数据一致性操作。The monitoring control unit 12 is configured to determine a corresponding data consistency operation device according to the data consistency request sent from the interface unit 11, and perform data consistency operation on the data consistency operation device.
这里,所述从接口单元11,还配置为确定支持接收的数据一致性请求对应的协议时,直接将接收的数据一致性请求发送至所述监听控制单元12,以便所述监听控制单元12根据所述从接口单元11发送的数据一致性请求,确定对应的数据一致性操作设备,对所述数据一致性操作设备进行数据一致性操作。其中,所述数据一致性请求包括读数据一致性请求及写数据一致性请求。Here, the slave interface unit 11 is further configured to directly send the received data consistency request to the intercept control unit 12 when the protocol corresponding to the received data consistency request is determined, so that the intercept control unit 12 is configured according to The data consistency request sent from the interface unit 11 determines a corresponding data consistency operation device, and performs data consistency operation on the data consistency operation device. The data consistency request includes a read data consistency request and a write data consistency request.
实际应用时,所述对接收的数据一致性请求进行协议转换处理,具体为:In actual application, the protocol conversion processing is performed on the received data consistency request, specifically:
对所述接收的数据一致性请求进行AXI协议到ACE_Lite协议的转换处理。Performing conversion processing of the AXI protocol to the ACE_Lite protocol on the received data consistency request.
所述监听控制单元12,还配置为当收到的数据一致性请求为两个以上数据一致性请求时,对收到的两个以上数据一致性请求的执行进行仲裁,根据仲裁后的数据一致性请求,确定对应的数据一致性操作设备,对所述数据一致性操作设备进行数据一致性操作。The intercept control unit 12 is further configured to, when the received data consistency request is more than two data consistency requests, arbitrate the execution of the received two or more data consistency requests, according to the data after the arbitration. The data request determines a corresponding data consistency operation device, and performs data consistency operation on the data consistency operation device.
具体地,如图2所示,所述从接口单元11包括第一从接口单元111、第二从接口单元112;其中,Specifically, as shown in FIG. 2, the slave interface unit 11 includes a first slave interface unit 111 and a second slave interface unit 112;
所述第一从接口单元111,配置为将接收的来自第一主设备单元21的第一读数据一致性请求发送至所述监听控制单元12;The first slave interface unit 111 is configured to send the received first read data consistency request from the first master unit 21 to the intercept control unit 12;
所述第二从接口单元112,配置为将接收的来自第二主设备单元22的 第二读数据一致性请求ReadOnce进行协议转换处理,并将协议转换处理后的第二读数据一致性请求ReadOnce发送至所述监听控制单元12;The second slave interface unit 112 is configured to receive the received from the second master unit 22 The second read data consistency request ReadOnce performs protocol conversion processing, and sends the protocol conversion processed second read data consistency request ReadOnce to the interception control unit 12;
所述监听控制单元12,配置为对所述第一读数据一致性请求及第二读数据一致性请求ReadOnce的执行进行仲裁,根据仲裁后的第一读数据一致性请求或第二读数据一致性请求ReadOnce确定未查找到对应的标记存储器tag_ram时,向所述互连单元23发送读数据操作指示,以获取读数据;确定查找到对应的标记存储器tag_ram时,向查找到的标记存储器tag_ram所对应的主设备单元发起监听,以获取读数据;这里,因为所述监听控制单元12在同一时刻只能处理一个一致性请求,所以所述监听控制单元12需要对第一从接口单元111发送的第一读数据一致性请求和第二从接口单元112发送的第二读数据一致性请求ReadOnce的执行进行仲裁。The intercept control unit 12 is configured to arbitrate the execution of the first read data consistency request and the second read data consistency request ReadOnce, according to the first read data consistency request or the second read data after the arbitration When the request ReadOnce determines that the corresponding tag memory tag_ram is not found, the read data operation instruction is sent to the interconnect unit 23 to acquire the read data; when it is determined that the corresponding tag memory tag_ram is found, the tag memory tag_ram is found. The corresponding master device unit initiates monitoring to obtain read data; here, since the intercept control unit 12 can only process one consistency request at the same time, the intercept control unit 12 needs to send the first slave interface unit 111. The first read data consistency request and the execution of the second read data consistency request ReadOnce sent by the second slave interface unit 112 are arbitrated.
如果所述监听控制单元12仲裁后的请求是所述第一读数据一致性请求时,则对所述第一读数据一致性请求处理完毕之后,还需对第二读数据一致性请求ReadOnce进行处理;或者,如果所述监听控制单元12仲裁后的请求是所述第二读数据一致性请求ReadOnce时,则对所述第二读数据一致性请求ReadOnce处理完毕之后,还需对第一读数据一致性请求进行处理。If the request after the arbitration control unit 12 is arbitrated is the first read data consistency request, after the first read data consistency request is processed, the second read data consistency request ReadOnce is also performed. Processing; or, if the request after the arbitration control unit 12 arbitrates is the second read data consistency request ReadOnce, after the second read data consistency request ReadOnce is processed, the first read is still required. Data consistency requests are processed.
这里,所述监听控制单元12对所述第一读数据一致性请求及第二读数据一致性请求ReadOnce的执行进行仲裁的具体实现方式有很多种,比如:可以根据轮询仲裁的方式对所述第一读数据一致性请求及第二读数据一致性请求ReadOnce的执行进行仲裁,还可以根据最近最少访问或伪随机的仲裁方式进行仲裁等等。Here, the interception control unit 12 can arbitrate the execution of the first read data consistency request and the second read data consistency request ReadOnce. For example, the method can be based on polling arbitration. The first read data consistency request and the second read data consistency request ReadOnce are performed for arbitration, and may be arbitrated according to the least recently accessed or pseudo-random arbitration method.
实际应用时,如图3所示,所述互连单元23可以包括五个主接口单元,六个从接口单元;其中,六个从接口单元分别连接第一主设备单元21对应的第一从接口单元111、第二主设备单元22对应的第二从接口单元112及监听控制单元12;一个主接口单元用于连接各寄存器,其余四个主接口单 元作为输出,连接从设备单元31;其中,所述各寄存器包括:无效标记存储器tag_ram寄存器、early wresp控制寄存器、超时阈值寄存器、中断状态寄存器、调试debug控制寄存器及中断屏蔽寄存器;In practical application, as shown in FIG. 3, the interconnection unit 23 may include five main interface units and six slave interface units; wherein the six slave interface units respectively connect the first slave corresponding to the first master unit 21 The interface unit 111, the second slave interface unit 112 corresponding to the second master unit 22, and the interception control unit 12; one main interface unit is used to connect each register, and the other four main interface lists The element is connected as an output to the slave device unit 31; wherein the registers include: an invalid tag memory tag_ram register, an early wresp control register, a timeout threshold register, an interrupt status register, a debug debug control register, and an interrupt mask register;
实际应用时,本实施例提供的装置是在各个寄存器的使能下进行工作的;比如:在装置初始化时,所述无效标记存储器tag_ram寄存器向监听控制单元12提供无效使能信号,以便所述监听控制单元根据无效使能信号将相应标记存储器tag_ram预设成无效状态;所述early wresp控制寄存器向所述第一从接口单元111提供控制信号,以使所述第一从接口单元111根据所述控制信号选择写响应提前返回early response或写响应正常返回normal response的方式;所述超时阈值寄存器向所述第一从接口单元111提供计数阈值周期,以使所述第一从接口单元111通过计数检测来判断数据传输的各阶段是否超时;当判断为超时时,所述第一从接口单元111根据所述中断状态寄存器提供的超时中断信号产生超时中断;所述调试debug控制寄存器配置为对实现数据一致性的装置中的相应模块的状态信号进行调试;所述中断屏蔽寄存器配置为屏蔽掉实现数据一致性的装置中相应模块的中断状态信号。In practical applications, the apparatus provided in this embodiment is operated under the enable of each register; for example, when the apparatus is initialized, the invalid tag memory tag_ram register provides an invalid enable signal to the intercept control unit 12, so that the The monitoring control unit presets the corresponding tag memory tag_ram to an invalid state according to the invalid enable signal; the early wresp control register provides a control signal to the first slave interface unit 111, so that the first slave interface unit 111 The control signal selects a write response to return an early response or a write response to return a normal response normally; the timeout threshold register provides a count threshold period to the first slave interface unit 111 to pass the first slave interface unit 111 Counting detection to determine whether each stage of data transmission is timed out; when it is determined to be timeout, the first slave interface unit 111 generates a timeout interrupt according to the timeout interrupt signal provided by the interrupt status register; the debug debug control register is configured to be Status letter of the corresponding module in the device that implements data consistency The number is debugged; the interrupt mask register is configured to mask out the interrupt status signal of the corresponding module in the device that implements data consistency.
其中,所述调试debug控制寄存器的具体作用不是本发明实施例关心的内容。The specific function of the debug debug control register is not the content of the embodiment of the present invention.
相应地,所述第一主设备单元21可以至少包括两个设备单元cluster,所述cluster可以为支持ACE协议的主设备ACE master;比如,可以为ARM公司的ARM Cortex A15及ARM Cortex A7。Correspondingly, the first main unit unit 21 may include at least two equipment units cluster, and the cluster may be an ACE master supporting the ACE protocol; for example, it may be ARM Cortex A15 and ARM Cortex A7 of ARM.
所述第二主设备单元22可以至少包括一个主设备,可以为支持ACE_Lite协议的主设备ACE_Lite master,或者是支持AXI协议的主设备AXI master;比如可以为IO主设备、图形处理器(GPU,Graphic Processing Unit)、直接内存存取(DMA,Direct Memory Access)以及AXI子系统等。 The second master unit 22 may include at least one master device, and may be a master device ACE_Lite master supporting the ACE_Lite protocol, or a master device AXI master supporting the AXI protocol; for example, an IO master device and a graphics processor (GPU). Graphic Processing Unit), Direct Memory Access (DMA), and AXI subsystem.
所述从设备单元31可以至少包括一个从设备,可以为支持AXI协议的从设备AXI slave,所述从设备也可以包括外部存储器memory。The slave device unit 31 may include at least one slave device, which may be a slave device AXI slave supporting the AXI protocol, and the slave device may also include an external memory memory.
实际应用时,所述第二主设备单元22及所述从设备单元31的个数可根据系统需要进行扩展或剪裁。In actual application, the number of the second main unit unit 22 and the slave unit 31 may be expanded or cut according to system requirements.
所述第二从接口单元112,还配置为:对接收的来自第二主设备单元22的第二写数据一致性请求WriteUnique进行协议转换处理,根据协议转换后的第二写数据一致性请求WriteUnique,向监听控制单元12发送无效请求invalidate,并接收监听控制单元12返回的无效请求响应后,向所述互连单元23发起写操作。The second slave interface unit 112 is further configured to: perform protocol conversion processing on the received second write data consistency request WriteUnique from the second master unit 22, and write the second write data consistency request according to the protocol. The invalidation request invalidate is sent to the snoop control unit 12, and after receiving the invalid request response returned by the snoop control unit 12, a write operation is initiated to the interconnect unit 23.
这里,如4所示,所述第二从接口单元112包括:协议转换子单元1121、读操作转换子单元1122、读接口子单元1123、写操作转换子单元1124、写接口子单元1125、仲裁子单元1126;其中,Here, as shown in FIG. 4, the second slave interface unit 112 includes: a protocol conversion subunit 1121, a read operation conversion subunit 1122, a read interface subunit 1123, a write operation conversion subunit 1124, a write interface subunit 1125, and arbitration. Subunit 1126; wherein
所述协议转换子单元1121,配置为将接收的第二主设备单元22发送的支持AXI协议的数据一致性请求转换成支持ACE_Lite协议的数据一致性请求;The protocol conversion sub-unit 1121 is configured to convert the received data consistency request sent by the second main device unit 22 to support the AXI protocol into a data consistency request supporting the ACE_Lite protocol;
所述读操作转换子单元1122,配置为当第二主设备单元发送的数据一致性请求为第二读数据一致性请求时,将协议转换后的第二读数据一致性请求Read Once的字节数转换成完整缓存数据行Full Cache Line字节数;The read operation conversion subunit 1122 is configured to: when the data consistency request sent by the second master device unit is the second read data consistency request, the protocol read converted second read data consistency request Read Once bytes Convert the number to the full cache data line Full Cache Line bytes;
所述读接口子单元1123,配置为为所述字节数转换后的第二读数据一致性请求ReadOnce分发第二读数据一致性请求ReadOnce通道,复用读数据通道,并将字节数转换后的第二读数据一致性请求ReadOnce发送给所述仲裁子单元1126;The read interface sub-unit 1123 is configured to distribute a second read data consistency request ReadOnce channel for the second read data consistency request ReadOnce after the byte number conversion, multiplex the read data channel, and convert the byte number The second read data consistency request ReadOnce is sent to the arbitration sub-unit 1126;
所述写操作转换子单元1124,配置为当第二主设备单元发送的数据一致性请求为第二写数据一致性请求WriteUnique时,将协议转换后的第二写数据一致性请求WriteUnique的字节数转换成完整缓存数据行Full Cache  Line字节数;The write operation conversion subunit 1124 is configured to: when the data consistency request sent by the second master unit is the second write data consistency request WriteUnique, the second write data consistency request WriteUnique byte after the protocol conversion Convert the number to a full cache data row Full Cache Line number of bytes;
所述写接口子单元1125,配置为为所述字节数转换后的第二写数据一致性请求WriteUnique分发第二写数据一致性请求WriteUnique通道,缓存写数据响应通道,并根据字节数转换后的第二写数据一致性请求WriteUnique向所述仲裁子单元1126发送无效请求invalidate;The write interface sub-unit 1125 is configured to distribute a second write data consistency request WriteUnique channel for the second write data consistency request WriteUnique after the byte number conversion, buffer the write data response channel, and convert according to the number of bytes The second write data consistency request WriteUnique sends an invalid request invalidate to the arbitration sub-unit 1126;
所述仲裁子单元1126,配置为当同时收到所述读接口子单元1123与所述写接口子单元1125发送的数据一致性请求时,对所述字节数转换后的第二读数据一致性请求ReadOnce及所述字节数转换后的第二写数据一致性请求WriteUnique的执行进行仲裁,并根据仲裁后的第二读数据一致性请求ReadOnce或第二写数据一致性请求WriteUnique向所述监听控制单元12发送相应的数据一致性请求;具体地,当仲裁后的数据一致性请求为第二读数据一致性请求ReadOnce时,将字节数转换后的第二读数据一致性请求ReadOnce发送给所述监听控制单元12;当仲裁后的数据一致性请求为第二写数据一致性请求WriteUnique时,向所述监听控制单元12发送无效请求invalidate。其中,所述字节数转换后的第二读数据一致性请求ReadOnce是指读共享数据且读出的共享数据不被缓存的请求。The arbitration sub-unit 1126 is configured to, when receiving the data consistency request sent by the read interface sub-unit 1123 and the write interface sub-unit 1125, consistent with the second read data after the byte number conversion The ReadOnce request and the execution of the second write data consistency request WriteUnique after the byte number conversion are arbitrated, and the ReadOnce or the second write data consistency request WriteUnique is requested according to the second read data consistency after arbitration. The intercept control unit 12 sends a corresponding data consistency request; specifically, when the arbitrated data consistency request is the second read data consistency request ReadOnce, the second read data consistency request ReadOnce is sent after the byte number conversion The intercept control unit 12 is configured to send an invalidation request invalidate to the intercept control unit 12 when the arbitrated data consistency request is the second write data consistency request WriteUnique. The second read data consistency request ReadOnce after the byte number conversion refers to a request to read the shared data and the read shared data is not cached.
这里,当所述仲裁子单元1126同时收到所述读接口子单元1123与所述写接口子单元1125发送的数据一致性请求时,若所述仲裁子单元1126仲裁后的请求是第二读数据一致性请求ReadOnce时,将第二读数据一致性请求ReadOnce发送至所述监听控制单元12后,还需根据所述第二写数据一致性请求WriteUnique向所述监听控制单元12发送无效请求invalidate;或者,Here, when the arbitration subunit 1126 simultaneously receives the data consistency request sent by the read interface subunit 1123 and the write interface subunit 1125, if the arbitration subunit 1126 arbitrates the request is the second read After the data consistency request ReadOnce, after the second read data consistency request ReadOnce is sent to the intercept control unit 12, the invalid write request invalidate is sent to the intercept control unit 12 according to the second write data consistency request WriteUnique. ;or,
当所述仲裁子单元1126仲裁后的请求是第二写数据一致性请求WriteUnique时,根据第二写数据一致性请求WriteUnique向所述监听控制单元12发送无效请求invalidate后,还需将所述第二读数据一致性请求 ReadOnce发送至所述监听控制单元12。When the arbitrated request by the arbitration sub-unit 1126 is the second write data consistency request WriteUnique, after the second write data consistency request WriteUnique sends the invalid request invalidate to the intercept control unit 12, the Second read data consistency request ReadOnce is sent to the snoop control unit 12.
具体地,当所述第二主设备单元22包括AXI master时,所述协议转换子单元1121,具体配置为:根据AXI master中不同的AXI地址产生不同的ACE_Lite传输类型,将支持AXI协议的第二读或写数据一致性请求转换成支持ACE_Lite协议的第二读或写数据一致性请求,以使AXI master发送的第二读或写数据一致性请求可以有效发送,换句话说,以使AXI master发送的第二读或写数据一致性请求得到所述监听控制单元12相应的响应;其中,所述传输类型包括:写地址通道的监听请求AWSNOOP、读地址通道的监听请求ARSNOOP;所述AXI地址与ACE_Lite传输类型之间的映射关系可预先配置。Specifically, when the second master unit 22 includes an AXI master, the protocol conversion subunit 1121 is specifically configured to: generate different ACE_Lite transmission types according to different AXI addresses in the AXI master, and support the AXI protocol. The second read or write data consistency request is converted into a second read or write data consistency request supporting the ACE_Lite protocol, so that the second read or write data consistency request sent by the AXI master can be effectively sent, in other words, to enable AXI The second read or write data consistency request sent by the master obtains a corresponding response of the intercept control unit 12; wherein the transport type includes: a listen request AWSNOOP of the write address channel, a listen request ARSNOOP of the read address channel; the AXI The mapping between addresses and ACE_Lite transport types can be pre-configured.
当所述第二主设备单元22发送的第二数据一致性请求是第二读数据一致性请求ReadOnce时,所述读操作转换子单元1121,具体配置为:利用内容寻址存储器(CAM,Content Addressable Memory)、拆分算法及控制逻辑将协议转换后的第二读数据一致性请求ReadOnce的字节数转换成完整缓存数据行Full Cache Line字节数;具体地,所述读操作转换子单元1122将收到的协议转换后的第二读数据一致性请求ReadOnce进行字节合并,过滤掉多余字节,以满足原始命令数据量burst的要求;这里,因为所述监听控制单元12要求读数据一致性请求的字节数与缓存数据行完整缓存数据行Full Cache Line字节数相同,而所述协议转换后的第二读数据一致性请求ReadOnce的字节数却无类似的限制,所以需要进行字节数的转换;When the second data consistency request sent by the second master unit 22 is the second read data consistency request ReadOnce, the read operation conversion subunit 1121 is specifically configured to: use the content addressed memory (CAM, Content) The addressable memory, the splitting algorithm, and the control logic convert the number of bytes of the second read data consistency request ReadOnce of the protocol conversion into a full cache data line Full Cache Line byte number; specifically, the read operation conversion subunit 1122, the received second protocol read data consistency request ReadOnce is byte-combined, and the extra bytes are filtered to meet the requirement of the original command data volume burst; here, because the intercept control unit 12 requires reading data. The number of bytes of the consistency request is the same as the number of bytes of the full cache data row of the cache data row, and the number of bytes of the second read data consistency request ReadOnce after the protocol conversion has no similar limitation, so Perform a conversion of the number of bytes;
其中,所述完整缓存数据行Full Cache Line字节数通常为32byte或64byte;所述原始命令数据量burst包括:数据位宽、数据类型及数据长度,所述数据位宽一般为32bit、64bit或128bit;所述数据类型包括:固定型fixed、增加型incr及回绕型wrap;所述数据长度至少包括一笔数据,所述CAM的存储单元个数可根据系统要求进行配置。 The number of bytes of the Full Cache Line of the full cache data line is usually 32 bytes or 64 bytes; the original command data volume burst includes: a data bit width, a data type, and a data length, and the data bit width is generally 32 bits, 64 bits or 128 bit; the data type includes: fixed type, increased type incr and wrap-around wrap; the data length includes at least one piece of data, and the number of storage units of the CAM can be configured according to system requirements.
比如,假设完整缓存数据行Full Cache Line字节数要求为32byte,数据位宽为128bit,则对应的原始命令数据量burst的数据位宽也为128bit,数据类型为回绕型、回绕长度为2(wrap2);则第二读数据一致性请求Read Once转换时的接口时序如图5所示。For example, suppose the full cache data line requires a full Cache Line byte number of 32 bytes and a data bit width of 128 bits. The corresponding original command data volume burst has a data bit width of 128 bits, and the data type is wraparound type and the wrap length is 2 ( Wrap2); The interface timing of the second read data consistency request Read Once conversion is as shown in FIG. 5.
由图5可以获知,可将字节转换后的第二读数据一致性请求ReadOnce中低位地址为12’h18、数据位宽为64bit、数据类型为incr4的burst拆成低位地址为12’h10、数据位宽为128bit、wrap2及低位地址为12’h20、数据位宽为128bit、wrap2这两个原始命令数据量burst;其中,当不需要第一个原始命令数据量burst数据的第二笔数据时,则跳过skip第二笔数据,第二个原始命令数据量burst的第一笔数据保持了两个周期,对应着s侧中地址分别为12’h20及12’h28的数据;并且,s侧在收到第四笔数据时将rlast_s拉高;As can be seen from FIG. 5, the byte-converted second read data consistency request ReadOnce has a lower address of 12'h18, a data bit width of 64 bits, and a data type of incr4 is split into a lower address of 12'h10. The data bit width is 128 bit, the wrap2 and the lower address are 12'h20, the data bit width is 128 bit, and the wrap2 is the two original command data volume burst; wherein, when the first original command data volume burst data is not needed, the second data is not needed. When the skip second data is skipped, the first data of the second original command data volume burst is held for two periods, corresponding to the data of the addresses s side of 12'h20 and 12'h28 respectively; The s side pulls rlast_s high when receiving the fourth data;
这里,还可将字节转换后的第二读数据一致性请求ReadOnce中低位地址为12’h18、数据位宽为64bit,wrap4的burst拆成两个低位地址都为12’h10,数据位宽为128bit,wrap2的原始命令数据量burst。其中,第一个原始命令数据量burst的第二笔数据保持了两个周期,对应s侧中地址分别为12’h00及12’h08的数据;s侧收到第四笔数据时将rlast_s拉高,其中,当不需要第二个原始命令数据量burst的第二笔数据时,则跳过skip第二笔数据;所述s侧是指从设备slave的接口信号,所述m侧是指第二主设备单元22的接口信号,所述s侧的信息对应读操作转换子单元1122转换后输出的m侧的信息。Here, the byte-converted second read data consistency request ReadOnce low-order address is 12'h18, data bit width is 64bit, wrap4 burst is split into two low-order addresses are 12'h10, data bit width The 128-bit, wrap2 original command data volume burst. The second data of the first original command data volume burst is held for two periods, corresponding to the data of the 12'h00 and 12'h08 addresses on the s side, and the rlast_s is pulled when the s side receives the fourth data. High, wherein when the second data of the second original command data volume burst is not needed, the skip second data is skipped; the s side refers to the interface signal of the slave device, and the m side refers to The interface signal of the second master unit 22, the information on the s side corresponds to the information on the m side of the output after the read operation conversion subunit 1122 converts.
所述s侧的信息包括:araddr_s、arvalid_s、arready_s、rdata_s、rlast_s、rvalid_s、rready_s;所述araddr_s是指s侧读地址通道的地址;所述arvalid_s是指s侧读址址通道的请求;所述arready_s是指s侧读地址通道请求响应;所述rdata_s是指s侧读数据通道的读数据;所述rlast_s是指s侧最后一笔 读数据的指示信号;所述rvalid_s是指s侧读数据通道的请求;所述rready_s是指s侧读数据通道的请求响应;The information on the s side includes: araddr_s, arvalid_s, arready_s, rdata_s, rlast_s, rvalid_s, and rready_s; the araddr_s refers to an address of the s-side read address channel; and the arvalid_s refers to a request of the s-side read address channel; The arready_s refers to the s-side read address channel request response; the rdata_s refers to the read data of the s-side read data channel; the rlast_s refers to the last s-side The indication signal of the read data; the rvalid_s refers to the request of the s side read data channel; the rready_s refers to the request response of the s side read data channel;
所述m侧的信息包括:araddr_m、arvalid_m、arready_m、rdata_m、rlast_m、rvalid_m、rready_m;所述araddr_m是指m侧读地址通道的地址;所述arvalid_m是指m侧读地址通道的请求;所述arready_m是指m侧读地址通道的请求响应;所述rdata_m是指m侧读数据通道的读数据;所述rlast_m是指m侧最后一笔读数据的指示信号;所述rvalid_m是指m侧读数据通道的请求;所述rready_m是指m侧读数据通道的请求响应;所述beat_complete是指当前一笔数据结束;所述last_match是指最后一笔数据;上述araddr_s、arvalid_s、arready_s、rvalid_s、rlast_s、rdata_s、rready_s、araddr_m、arvalid_m、arready_m、rvalid_m、rlast_m、rdata_m、rready_m分别对应AXI协议中的标准信号。The information on the m side includes: araddr_m, arvalid_m, arready_m, rdata_m, rlast_m, rvalid_m, and rready_m; the araddr_m is an address of an m-side read address channel; and the arvalid_m is a request of an m-side read address channel; Arready_m refers to the request response of the m-side read address channel; the rdata_m refers to the read data of the m-side read data channel; the rlast_m refers to the indication signal of the last read data of the m side; the rvalid_m refers to the m-side read The request of the data channel; the roughy_m refers to the request response of the m-side read data channel; the beat_complete refers to the end of the current data; the last_match refers to the last data; the above araddr_s, arvalid_s, arready_s, rvalid_s, rlast_s Rdata_s, rready_s, araddr_m, arvalid_m, arready_m, rvalid_m, rlast_m, rdata_m, and rready_m respectively correspond to standard signals in the AXI protocol.
当所述读操作转换子单元1122将协议转换子单元1121转换后的第二读数据一致性请求ReadOnce字节数转换完成之后,所述读接口子单元1123,具体配置为:利用缓存器buffer缓存所述读操作转换子单元1122字节数转换后的第二读数据一致性请求ReadOnce,并为所述读操作转换子单元1122字节数转换后的第二读数据一致性请求ReadOnce分发读数据一致性请求通道,复用读数据通道;其中,所述复用读数据通道为:当所述监听控制单元12及所述互连单元23同时返回读数据时,先返回所述监听控制单元12的读数据。After the read operation conversion subunit 1122 converts the second read data consistency request ReadOnce byte number converted by the protocol conversion subunit 1121, the read interface subunit 1123 is specifically configured to: use the buffer buffer cache. The read operation conversion subunit 1122 converts the second read data consistency request ReadOnce, and distributes the read data for the read operation conversion subunit 1122 byte number converted second read data consistency request ReadOnce a consistency request channel, the multiplexed read data channel; wherein the multiplexed read data channel is: when the snoop control unit 12 and the interconnect unit 23 simultaneously return read data, return to the snoop control unit 12 first Reading data.
为了避免死锁,所述读接口子单元1123还配置为阻塞传输事务间顺序ordering;所述阻塞传输事务间顺序ordering包括:所有一致性传输数据请求全部结束后,当前无一致性传输数据的请求才能发出;或者,所有无一致性传输数据请求全部结束后,当前一致性传输数据的请求才能发出。In order to avoid deadlock, the read interface sub-unit 1123 is further configured to block transmission inter-transaction ordering; the blocking transmission inter-transaction ordering includes: after all the consistent transmission data requests are completed, the current non-consistent transmission data request Can be issued; or, after all non-consistent transmission data requests are completed, the current request to transmit data consistently can be issued.
当所述第二主设备单元22发送的第二数据一致性请求是第二写数据一 致性请求WriteUnique时,所述写操作转换子单元1124,具体配置为:利用CAM、拆分算法及控制逻辑将协议转换后的第二写数据一致性请求WriteUnique的字节数转换成完整缓存数据行Full Cache Line字节数;这里,因为本发明实施例设计的监听控制单元12要求写数据一致性请求WriteUnique的字节数与完整缓存数据行Full Cache Line字节数相同,而所述协议转换后的第二写数据一致性请求WriteUnique的字节数却无类似的限制,所以需要进行字节数的转换,将协议转换后的第二写数据一致性请求WriteUnique进行拆分,经过拆分后的每个原始命令数据量burst的总字节数都小于或等于完整缓存数据行Full Cache Line字节数,并将收到的写响应合并,以满足原始命令数据量burst的要求;When the second data consistency request sent by the second master unit 22 is the second write data one When the write request is made to the WriteUnique, the write operation conversion subunit 1124 is specifically configured to: convert the byte number of the second write data consistency request WriteUnique after the protocol conversion into the full cache data by using the CAM, the split algorithm, and the control logic. The number of bytes of the Full Cache Line is set; here, because the snoop control unit 12 designed in the embodiment of the present invention requires the number of bytes of the write data consistency request WriteUnique to be the same as the number of bytes of the full cache data line Full Cache Line, and the protocol conversion After the second write data consistency request WriteUnique has no similar limit on the number of bytes, so the number of bytes needs to be converted, and the second write data consistency request WriteUnique after the protocol conversion is split, after splitting. The total number of bytes of each raw command data volume burst is less than or equal to the full cache data line Full Cache Line bytes, and the received write responses are merged to meet the requirements of the original command data volume burst;
具体地,与转换所述第二读数据一致性请求ReadOnce类似,比如,假设完整缓存数据行Full Cache Line字节数要求为32byte,数据位宽为128bit,则对应的burst的数据位宽也为128bit,数据类型为回绕型、回绕长度为2(wrap2);则写数据一致性请求WriteUnique转换时的接口时序如图6所示。Specifically, similar to the conversion of the second read data consistency request ReadOnce, for example, if the full cache data line Full Cache Line number of bytes is required to be 32 bytes, and the data bit width is 128 bits, the corresponding data width of the burst is also 128bit, the data type is wraparound, and the wrap length is 2 (wrap2); then the interface timing of the write data consistency request WriteUnique conversion is shown in Figure 6.
由图6可以获知,可将所述字节转换后的第二写数据一致性请求WriteUnique的低位地址为12’h18、数据位宽为64bit、数据类型为incr4的原始命令数据量burst分别拆成低位地址为12’h18、数据位宽为64bit、incr1及低位地址为12’h20、数据位宽为64bit、incr3这两个原始命令数据量burst;并且将m侧返回的两个写通道数据响应bresp合并成一个写通道数据响应bresp后从s侧发出;It can be known from FIG. 6 that the original command data volume burst of the second write data consistency request WriteUnique of the byte conversion is 12'h18, the data bit width is 64 bit, and the data type is incr4 can be separately divided into The lower address is 12'h18, the data bit width is 64bit, the incr1 and the lower address are 12'h20, the data bit width is 64bit, the intr3 is the original data volume burst; and the two write channel data responses returned by the m side are Bresp merges into a write channel data response bresp and sends it from the s side;
这里,还可将所述字节转换后的第二写数据一致性请求WriteUnique中低位地址为12’h10、数据位宽为128bit,wrap4的原始命令数据量burst分别拆成低位地址为12’h10,数据位宽为128bit,incr1的burst、低位地址为12’h20,数据位宽为128bit,incr2的burst及低位地址为12’h00,数据位宽为128bit,incr1的burst;并且将m侧返回的三个写通道数据响应bresp合 并成一个写通道数据响应bresp后从s侧发出;其中,所述m侧为主设备单元的接口;所述awaddr_s是指s侧写地址通道的地址;所述awvalid_s是指s侧写地址通道的请求;所述awready_s是指s侧写地址通道的请求响应;所述wdata_s是指s侧写数据通道的写数据;所述wlast_s是指s侧最后一笔写数据的指示信号;所述bvalid_s是指s侧写响应通道的请求;所述bready_s是指s侧写响应通道的请求响应;所述awaddr_m是指m侧写地址通道的地址;所述awvalid_m是指m侧写地址通道的请求;所述awready_m是指m侧写地址通道的请求响应;所述wdata_m是指m侧写数据通道的写数据;所述wlast_m是指m侧最后一笔写数据指示信号;所述bvalid_m是指m侧写响应通道的请求;所述bready_m是指m侧写响应通道的请求响应;上述awaddr_s、awvalid_s、awready_s、wdata_s、wlast_s、bvalid_s、bready_s、awaddr_m、awvalid_m、awready_m、wdata_m、wlast_m、bvalid_m、bready_m分别对应AXI协议中的标准信号。Here, the byte-converted second write data consistency request WriteUnique has a lower address of 12'h10 and a data bit width of 128 bits, and the original command data amount burst of the wrap4 is split into a lower address of 12'h10. The data bit width is 128bit, the burst of incr1, the lower address is 12'h20, the data bit width is 128bit, the burst and lower address of incr2 are 12'h00, the data bit width is 128bit, the burst of incr1; and the m side is returned Three write channel data response bresp And a write channel data response bresp is sent from the s side; wherein the m side is the interface of the main device unit; the awaddr_s refers to the address of the s side write address channel; the awvalid_s refers to the s side write address channel The awready_s refers to the request response of the s side write address channel; the wdata_s refers to the write data of the s side write data channel; the wlast_s refers to the indication signal of the last write data of the s side; the bvalid_s Refers to the s side write response channel request; the wholesale_s refers to the s side write response channel request response; the awaddr_m refers to the m side write address channel address; the awvalid_m refers to the m side write address channel request; The awready_m refers to a request response of the m side write address channel; the wdata_m refers to write data of the m side write data channel; the wlast_m refers to the last write data indication signal of the m side; the bvalid_m refers to the m side Write a response channel request; the wholesale_m refers to the request response of the m side write response channel; the above awaddr_s, awvalid_s, awready_s, wdata_s, wlast_s, bvalid_s, bready_s, awaddr_m, awvalid_m, awready_m, wdata_m, w Last_m, bvalid_m, and bready_m correspond to standard signals in the AXI protocol, respectively.
当所述写操作转换子单元1124将第二写数据一致性请求WriteUnique的字节转换完成之后,所述写接口子单元1125,具体配置为:首先利用缓存器buffer缓存字节转换后的第二写数据一致性请求WriteUnique,并为第二写数据一致性请求WriteUnique分发写数据一致性请求通道;再将无效请求invalidate的字节数调整成与所述字节转换后的第二写数据一致性请求WriteUnique字节数相等,将无效请求invalidate发送至监听控制单元12,接收监听控制单元12返回的无效请求响应inv_done后,向所述互连单元23发起写操作,缓存写数据响应通道;After the write operation conversion sub-unit 1124 completes the byte conversion of the second write data consistency request WriteUnique, the write interface sub-unit 1125 is specifically configured to: first use the buffer buffer to buffer the byte-converted second Write a data consistency request WriteUnique, and distribute a write data consistency request channel for the second write data consistency request WriteUnique; and then adjust the number of bytes of the invalid request invalidate to be consistent with the second write data after the byte conversion Requesting the WriteUnique byte number is equal, sending the invalid request invalidate to the intercept control unit 12, receiving the invalid request response inv_done returned by the snoop control unit 12, initiating a write operation to the interconnect unit 23, buffering the write data response channel;
这里,由于监听控制单元12返回的无效请求响应inv_done可能是乱序的,为了保证经所述写操作转换子单元1124字节数转换后的第二写数据一致性请求与第二主设备单元22发送的第二写数据一致性请求WriteUnique顺序的一致性,所述写接口子单元1125在无效请求invalidate的标识inv_id 中除了添加有第二主设备单元22的写地址通道标识awid外,还要在字节数转换后的第二写数据一致性请求WriteUnique中添加buffer号,并保存在buffer中;如果返回的inv_id与保存的buffer号一致,才将对应的经所述写操作转换子单元1124字节数转换后的第二写数据一致性请求WriteUnique发送至互连单元23。Here, since the invalid request response inv_done returned by the snoop control unit 12 may be out of order, in order to ensure the second write data consistency request and the second master unit 22 after the byte conversion of the write operation conversion subunit 1124 The second write data consistency request sent is consistent with the WriteUnique order, and the write interface subunit 1125 identifies the invalid inv_id of the invalid request invalidate In addition to the write address channel identifier awid of the second master unit 22, a buffer number is added to the second write data consistency request WriteUnique after the byte number conversion, and is saved in the buffer; if the returned inv_id The second write data consistency request WriteUnique converted by the byte conversion of the write operation conversion subunit 1124 is sent to the interconnection unit 23 in accordance with the saved buffer number.
为了避免死锁,所述写接口子单元1125还配置为阻塞传输事务间顺序ordering、处理写后写WAW和读后写RAW冲突;其中,In order to avoid deadlock, the write interface sub-unit 1125 is further configured to block the transfer order sequential ordering, the write-before-write WAW, and the post-write RAW conflict;
所述阻塞传输事务间顺序ordering包括:所有一致性传输数据请求全部结束后,当前无一致性传输数据的请求才能发出;或者,所有无一致性传输数据请求全部结束后,当前一致性传输数据的请求才能发出。The ordering ordering of the blocking transmission transaction includes: after all the consistent transmission data requests are completed, the current non-consistent transmission data request can be sent; or, after all the unconsistent transmission data requests are completed, the current consistency transmission data is The request can be issued.
对于WAW冲突,所述写接口子单元1125会将字节转换后的第二写数据一致性请求WriteUnique地址发送至第一从接口单元11中,若与所述第一写数据一致性请求之间存在冲突,所述写接口子单元1125则会阻塞字节转换后的第二写数据一致性请求WriteUnique,直至第一从接口单元111的字节转换后的第一写数据一致性请求完成操作;所述WAW冲突是指第一主设备单元21对该地址区域进行写操作之后,第二主设备单元22对该地址区域进行写操作;或者指第二主设备单元22对该地址区域进行写操作之后,第一主设备单元21对该地址区域进行写操作。For the WAW conflict, the write interface sub-unit 1125 sends the byte-converted second write data consistency request WriteUnique address to the first slave interface unit 11, if it is between the first write data consistency request If there is a conflict, the write interface sub-unit 1125 blocks the byte-converted second write data consistency request WriteUnique until the first write data consistency request after the byte conversion of the first slave interface unit 111 completes the operation; The WAW conflict refers to that after the first master device unit 21 performs a write operation on the address region, the second master device unit 22 performs a write operation on the address region; or the second master device unit 22 performs a write operation on the address region. Thereafter, the first master device unit 21 performs a write operation on the address region.
对于RAW冲突,所述写接口子单元1125利用CAM保存未处理的第二写数据一致性请求的写地址通道标识awid和写地址通道地址,所述监听控制单元12将读数据一致性请求的miss地址发送至写接口子单元1125,所述写接口子单元1125判断读数据一致性请求的miss地址与pending地址是否相同,若相同,则向所述监听控制单元12返回冲突信号hazard,以保证字节转换后的第二写数据一致性请求WriteUnique完成操作,只有字节数转换后的第二写数据一致性请求WriteUnique完成操作后,所述监听控制单 元12才会向互连单元23发起读数据一致性操作;其中,所述miss地址是指无命中结果的地址;所述写地址通道标识awid用于查找写响应通道标识bid以及从CAM中读取数据;所述RAW是指第一主设备单元21通过第一从接口单元111对该地址区域进行写操作之后,第二主设备单元22通过第二从接口单元112对该地址区域进行读操作;或者是指第一主设备单元21对该地址区域进行写操作之后,第二主设备单元22对该地址区域进行读操作。For RAW conflict, the write interface sub-unit 1125 uses the CAM to save the write address channel identifier awid and the write address channel address of the unprocessed second write data consistency request, and the snoop control unit 12 will read the data consistency request miss The address is sent to the write interface sub-unit 1125. The write interface sub-unit 1125 determines whether the miss address of the read data consistency request is the same as the pending address. If they are the same, the conflict control signal hazard is returned to the intercept control unit 12 to ensure the word. The second write data consistency request WriteUnique after the node conversion completes the operation, and the listen control list is only after the second write data consistency request WriteUnique completes the operation after the byte number conversion The element 12 initiates a read data consistency operation to the interconnect unit 23; wherein the miss address refers to an address without a hit result; the write address channel identifier awid is used to look up the write response channel identifier bid and read from the CAM The RAW means that after the first master unit 21 performs a write operation on the address area by the first slave interface unit 111, the second master unit 22 reads the address area through the second slave interface unit 112. Or after the first master device unit 21 performs a write operation on the address region, the second master device unit 22 performs a read operation on the address region.
当所述第二主设备单元22同时发送所述第二读数据一致性请求ReadOnce和第二写数据一致性请求WriteUnique时,所述仲裁子单元1126,具体配置为对所述字节转换后的第二读数据一致性请求ReadOnce和字节转换后的第二写数据一致性请求WriteUnique的执行进行仲裁;这里,因为第二从接口单元112与监听控制单元12之间的一致性请求接口只有一个,所以仲裁子单元1126需要对所述第二读数据一致性请求ReadOnce和第二写数据一致性请求WriteUnique进行仲裁后,向监听控制单元12发送第二读数据一致性请求ReadOnce或第二写数据一致性请求WriteUnique。When the second master unit 22 simultaneously sends the second read data consistency request ReadOnce and the second write data consistency request WriteUnique, the arbitration subunit 1126 is specifically configured to convert the byte The second read data consistency request ReadOnce and the byte-converted second write data consistency request WriteUnique are arbitrated; here, because the consistency request interface between the second slave interface unit 112 and the snoop control unit 12 has only one Therefore, the arbitration sub-unit 1126 needs to arbitrate the second read data consistency request ReadOnce and the second write data consistency request WriteUnique, and then send the second read data consistency request ReadOnce or the second write data to the intercept control unit 12. Consistency request WriteUnique.
另外,当所述从接口单元11确定支持接收的数据一致性请求对应的协议时,则不需要对接收的数据一致性请求进行协议转换处理,直接将接收的数据一致性请求发送至所述监听控制单元12。In addition, when the slave interface unit 11 determines the protocol corresponding to the data consistency request received, the protocol conversion processing of the received data consistency request is not required, and the received data consistency request is directly sent to the listener. Control unit 12.
具体地,在有一致性数据传输要求的情况下,所述第一从接口单元11,具体配置为:根据先进先出(FIFO,First In First Out)缓存传输类型、数据地址冲突、传输事务间顺序ordering情况,将所述第一主设备单元21的第一读数据一致性请求发送至监听控制单元12,或者将第一主设备单元21的第一写数据一致性请求发送至互连单元23,直接向互连单元23发起写操作;Specifically, in the case that there is a consistent data transmission requirement, the first slave interface unit 11 is specifically configured to: according to a first in first out (FIFO) cache transfer type, a data address conflict, and a transfer transaction. In the sequential ordering situation, the first read data consistency request of the first master unit 21 is sent to the snoop control unit 12, or the first write data consistency request of the first master unit 21 is sent to the interconnect unit 23 Directly initiating a write operation to the interconnect unit 23;
这里,所述第一从接口单元111,支持通过early wresp寄存器提供的控制信号选择写响应提前返回early response或写响应正常返回normal  response的方式。对于写响应提前返回early response方式,当根据写数据一致性请求完成写操作后,则返回写响应;如果实际写响应有错误error,第一从接口单元111则会记录错误传输的地址和标识ID;对于写响应正常返回normal response方式,将实际写响应返回给第一主设备单元21。Here, the first slave interface unit 111 supports a write response provided by the early wresp register to select a write response to return an early response or a write response to return normally. The way of response. Returning the early response mode to the write response, returning the write response after completing the write operation according to the write data consistency request; if the actual write response has an error error, the first slave interface unit 111 records the address and the ID of the error transmission. The normal write response is returned to the first master unit 21 for the write response to return to the normal response mode.
这里,当第一主设备单元21进行除读和写外的其它一致性维护性操作时,所述第一从接口单元111,还配置为:将改写后的dirty数据更新到memory并保留复本唯一的CleanUnique请求或保留复本共有的CleanShared请求或无效复本的CleanInvalid请求发送至监听控制单元12,以对复本进行clean操作;以及将只保留复本唯一的MakeUnique请求或只无效复本的MakeInvalid请求发送至监听控制单元12,以对复本进行make操作。所述第一从接口单元111,还具有数据传输超时检测功能,在数据传输过程中,通过计数检测来判断数据传输的各阶段是否超时;具体地,第一主设备单元21通过握手机制向从设备单元31发送valid信号,当第一从接口单元111判断如果在超时阈值周期内没有接收到接收从设备单元31返回的ready信号时,认为数据传输超时,产生超时中断;所述超时阈值周期可根据实际情况预先配置。Here, when the first master unit 21 performs other consistency maintenance operations other than reading and writing, the first slave interface unit 111 is further configured to: update the rewritten dirty data to the memory and keep the copy. The only CleanUnique request or the CleanInvalid request for the CleanShared request or the invalid copy shared by the duplicate is sent to the snoop control unit 12 to clean the copy; and only the copy of the unique MakeUnique request or only the invalid copy is retained. The MakeInvalid request is sent to the snoop control unit 12 to perform a make operation on the replica. The first slave interface unit 111 further has a data transmission timeout detection function. During the data transmission process, it is determined by counting detection whether each phase of the data transmission is timed out; specifically, the first master device unit 21 moves to the slave through the handshake mechanism. The device unit 31 sends a valid signal, and when the first slave interface unit 111 determines that the read signal returned by the slave device unit 31 is not received within the timeout threshold period, the data transmission is considered to be timed out, and a timeout interrupt is generated; the timeout threshold period may be Pre-configured according to actual conditions.
另外,在无一致性数据传输要求的情况下,所述第一从接口单元111根据FIFO缓存传输类型、数据地址冲突、传输事务间顺序ordering情况,将第一主设备单元21发送的第一读或写数据一致性请求发送至所述互连单元23;所述第二从接口单元112将第二主设备单元22的第二读或写数据一致性请求直接发送至互连单元23,以访问相应的从设备单元31;其中,从设备单元31至少包括一个。In addition, in the case of the non-conforming data transmission requirement, the first slave interface unit 111 sends the first read sent by the first master unit 21 according to the FIFO buffer transmission type, the data address conflict, and the order of the order between the transmission transactions. Or a write data consistency request is sent to the interconnect unit 23; the second slave interface unit 112 sends the second read or write data consistency request of the second master unit 22 directly to the interconnect unit 23 for access A corresponding slave unit 31; wherein the slave unit 31 includes at least one.
当所述第一从接口单元21、第二从接口单元112同时向监听控制单元12发送第一读数据一致性请求、第二读或写数据一致性请求时,所述监听控制单元12,具体配置为:根据第一读数据一致性请求或字节数转换后的 第二读数据一致性请求ReadOnce,确定查找到标记存储器tag_ram,向命中的目标第一主设备单元21发送监听请求,获取访问数据;若第一主设备单元21未响应监听请求,监听控制单元12则向互连单元23发送读数据操作,获取读数据;若确定未查找到标记存储器tag_ram,则向所述互连单元23发送读数据操作;或者,When the first slave interface unit 21 and the second slave interface unit 112 simultaneously send the first read data consistency request, the second read or write data consistency request to the intercept control unit 12, the intercept control unit 12 specifically Configured as: according to the first read data consistency request or the number of bytes converted The second read data consistency request ReadOnce determines that the tag memory tag_ram is found, sends a snoop request to the hit target first main device unit 21, and acquires access data; if the first main device unit 21 does not respond to the snoop request, the snoop control unit 12 Then, the read data operation is sent to the interconnect unit 23 to obtain the read data; if it is determined that the tag memory tag_ram is not found, the read data operation is sent to the interconnect unit 23; or
响应第二从接口单元112发送的无效请求invalidate,以使第二从接口单元112向互连单元23发起写操作。In response to the invalid request invalidate sent by the second slave interface unit 112, the second slave interface unit 112 initiates a write operation to the interconnect unit 23.
具体地,如图7所示,所述监听控制单元12包括:标记控制子单元snoop_tag_ctl 121、数据交换子单元snoop_ddi 122、仲裁子单元snoop_arb123;其中,Specifically, as shown in FIG. 7, the interception control unit 12 includes: a flag control subunit snoop_tag_ctl 121, a data exchange subunit snoop_ddi 122, and an arbitration subunit snoop_arb123;
所述标记控制子单元121,配置为:接收第一从接口单元111发送的第一读或写数据一致性请求、第二从接口单元112发送的第二读或写一致性请求及数据交换子单元121发送的无效请求invalidate,并对这些请求的执行进行仲裁;The tag control sub-unit 121 is configured to receive a first read or write data consistency request sent by the first slave interface unit 111, a second read or write consistency request sent by the second slave interface unit 112, and a data exchange. The invalid request invalidate sent by unit 121, and arbitrate the execution of these requests;
当仲裁后的请求是第一读数据一致性请求或第二读数据一致性请求ReadOnce时,所述标记控制子单元121,具体配置为:根据第一读数据一致性请求或第二读数据一致性请求ReadOnce查找标记存储器tag_ram,如果查找到标记存储器tag_ram,则根据标记存储器tag_ram中的完整缓存数据行Full Cache Line信息生成命中结果;其中,若命中结果中的完整缓存数据行Full Cache Line是有效状态,则向数据交换子单元122发送监听请求,以获取读数据;若命中结果中的完整缓存数据行Full Cache Line是无效状态或命中结果中不存在完整缓存数据行Full Cache Line,所述标记控制子单元121则利用互连单元23向外部存储器memory发送读memory请求;所述操作类型为ReadClean,所述ReadClean是指读共享数据并且读出的共享数据不被缓存,所述标记存储器tag_ram中记录了所访问的完整缓存数据 行Full Cache Line是否存在于第一主设备单元21的cache中;所述第二从接口单元112还可以通过侦听第一从接口单元111判断是否能获取访问数据;如果第二主设备单元22需要访问的数据在第一主设备单元21的cache中,则在无需访问从设备单元31的情况下就可以直接从第一主设备单元21的cache中获取访问数据,这样,可以减少访问时间,提高访问效率。When the queried request is the first read data consistency request or the second read data consistency request ReadOnce, the mark control sub-unit 121 is specifically configured to: according to the first read data consistency request or the second read data consistent The request ReadOnce finds the tag memory tag_ram. If the tag memory tag_ram is found, the hit result is generated according to the full cache data line in the tag memory tag_ram; wherein, if the full cache data line in the hit result is Full Cache Line is valid Status, the interception request is sent to the data exchange sub-unit 122 to obtain the read data; if the full cache data line in the hit result is Full Cache Line is invalid or the complete cache data line Full Cache Line does not exist in the hit result, the mark The control sub-unit 121 then uses the interconnection unit 23 to send a read memory request to the external memory memory; the operation type is ReadClean, the ReadClean refers to reading the shared data and the read shared data is not cached, the tag memory tag_ram Recorded full cached data accessed Whether the Full Cache Line exists in the cache of the first main device unit 21; the second slave interface unit 112 can also determine whether the access data can be acquired by listening to the first slave interface unit 111; if the second master device unit 22 The data to be accessed is in the cache of the first main unit unit 21, and the access data can be directly obtained from the cache of the first main unit unit 21 without accessing the slave unit 31, so that the access time can be reduced. Improve access efficiency.
如果所述第一从接口单元111、第二从接口单元112发出的数据一致性请求具有相同的标识ID,所述标记控制子单元121还配置为确保处理这些请求的顺序一致性。If the data consistency requests issued by the first slave interface unit 111 and the second slave interface unit 112 have the same identification ID, the flag control sub-unit 121 is further configured to ensure the order consistency of processing the requests.
另外,如果第一主设备单元21进行除读和写外的其它一致性维护操作时,所述标记控制子单元121,具体还配置为:根据复本唯一CleanUnique请求或复本共有CleanShared请求或复本无效CleanInvalid请求查找标记存储器tag_ram,如果查找到标记存储器tag_ram,则根据标记存储器tag_ram中的完整缓存数据行Full Cache Line信息生成命中结果;其中,若命中结果中的完整缓存数据行Full Cache Line是有效状态,则向数据交换子单元122发送监听请求,以获取读数据及数据状态。其中,对于需要写回的ditry数据,所述监听控制单元12向互连单元23发送写操作。In addition, if the first main equipment unit 21 performs other consistency maintenance operations except reading and writing, the marking control sub-unit 121 is specifically configured to: according to the duplicate unique CleanUnique request or the duplicate, the CleanShared request or the complex The invalid CleanInvalid request finds the tag memory tag_ram, and if the tag memory tag_ram is found, the hit result is generated according to the full cache data line in the tag memory tag_ram; wherein, if the full cache data line in the hit result is Full Cache Line In the active state, a snoop request is sent to the data exchange sub-unit 122 to obtain read data and data status. Wherein, for the ditry data that needs to be written back, the snoop control unit 12 sends a write operation to the interconnect unit 23.
当所述标记控制子单元121向所述数据交换子单元122发送监听请求时,所述数据交换子单元122,配置为:根据命中信息将所述监听请求发送至第一主设备单元21,接收第一主设备单元21返回的监听响应cresponse和监听数据cdata,并将监听数据cdata发送至第一从接口单元111或第二从接口单元112后,向第一从接口单元111或第二从接口单元112发送数据一致性请求操作完成指示;当监听请求无响应时,所述标记控制子单元121,还配置为利用互连单元23向外部存储器memory发送读外部存储器memory请求;所述命中信息包括:命中结果和操作类型。When the tag control sub-unit 121 sends a snoop request to the data exchange sub-unit 122, the data exchange sub-unit 122 is configured to: send the snoop request to the first main device unit 21 according to the hit information, and receive The listener response cresponse and the monitor data cdata returned by the first master unit 21, and send the monitor data cdata to the first slave interface unit 111 or the second slave interface unit 112, to the first slave interface unit 111 or the second slave interface The unit 112 sends a data consistency request operation completion indication; when the monitoring request is not responding, the label control sub-unit 121 is further configured to use the interconnection unit 23 to send a read external memory memory request to the external memory memory; the hit information includes : Hit result and operation type.
当所述写操作转换子单元1124发送无效请求invalidate时,所述数据 交换子单元122,还配置为向写操作转换子单元1124返回无效请求响应inv_done后,向标记控制子单元121发送对应标记存储器tag_ram的无效请求,以使标记控制子单元121将相应标记存储器tag_ram设置成无效状态,同时根据写回WriteBack请求中的更新消息更新标记存储器tag_ram;其中,所述写回WriteBack请求是指第一从接口单元111向监听控制单元12发送的将数据写回memory的请求。这里,因为在装置工作过程中,标记存储器tag_ram可能从无效状态变成有效状态,因此,还需要标记控制单元121将需要的相应标记存储器tag_ram重新设置成无效状态。When the write operation conversion subunit 1124 sends an invalid request invalidate, the data The switching subunit 122 is further configured to, after returning the invalid request response inv_done to the write operation conversion subunit 1124, send an invalid request corresponding to the tag memory tag_ram to the tag control subunit 121, so that the tag control subunit 121 sets the corresponding tag memory tag_ram Invalid state, while updating the tag memory tag_ram according to the update message written back to the WriteBack request; wherein the write back WriteBack request refers to the request sent by the first slave interface unit 111 to the snoop control unit 12 to write data back to the memory. Here, since the tag memory tag_ram may change from the inactive state to the active state during the operation of the device, the tag control unit 121 is also required to reset the required tag memory tag_ram to the inactive state.
另外,当dirty数据需要写入外部存储器memory时,所述标记控制子单元121,还配置为利用互连单元23向外部存储器memory发送写操作,以将dirty数据写入外部存储器memory中。In addition, when the dirty data needs to be written to the external memory memory, the mark control sub-unit 121 is further configured to use the interconnect unit 23 to send a write operation to the external memory memory to write the dirty data into the external memory memory.
当标记控制子单元121及所述数据交换子单元122同时发送读memory请求时,所述仲裁子单元123,具体配置为:对标记控制子单元121发送的读外部存储器memory请求及所述数据交换子单元122发送的读外部存储器memory请求的执行进行仲裁,并将仲裁后的读memory请求发送至互连单元23,接收互连单元23返回的读数据;When the tag control sub-unit 121 and the data exchange sub-unit 122 simultaneously send a read memory request, the arbitration sub-unit 123 is specifically configured to: read the external memory memory request sent by the tag control sub-unit 121 and the data exchange. The execution of the read external memory memory request sent by the subunit 122 is arbitrated, and the arbitrated read memory request is sent to the interconnect unit 23 to receive the read data returned by the interconnect unit 23;
当所述仲裁子单元123同时接收到数据交换子单元122发送的读数据及互连单元23返回的读数据时,所述仲裁子单元123,还配置为对数据交换子单元122发送的监听数据及互连单元23返回的读数据进行仲裁后,将读数据发送至第一从接口单元111或第二从接口单元112。When the arbitration sub-unit 123 receives the read data sent by the data exchange sub-unit 122 and the read data returned by the interconnection unit 23, the arbitration sub-unit 123 is further configured as the intercept data sent to the data exchange sub-unit 122. After the read data returned by the interconnection unit 23 is arbitrated, the read data is transmitted to the first slave interface unit 111 or the second slave interface unit 112.
这里,由于监听控制单元12是配置为维护第一主设备单元21中两个cluster之间的数据一致性,但是若要采用现有技术中记录完整缓存数据行Full Cache Line状态的方法,来记录各个完整缓存数据行Full Cache Line状态,需要消耗非常大的资源,并且方法复杂,难以实现;因此,本实施例中,所述监听控制单元12采用的是分段地址计数法,来记录各个cluster中 完整缓存数据行Full Cache Line的存在状态,不但容易实现,而且能较精确地记录完整缓存数据行Full Cache Line的状态。Here, since the snoop control unit 12 is configured to maintain data consistency between the two clusters in the first main unit unit 21, to record the method of recording the full cache data line Full Cache Line state in the prior art, The Full Cache Line state of each full cache data line needs to consume a very large resource, and the method is complicated and difficult to implement; therefore, in this embodiment, the snoop control unit 12 uses a segment address counting method to record each cluster. Medium The existence status of the Full Cache Line of the full cache data line is not only easy to implement, but also can accurately record the state of the Full Cache Line of the full cache data line.
所述方法包括两个基本特性:(1)如果监听控制单元12中的记录表明某完整缓存数据行Full Cache Line存在于某个cluster中,但实际上,由于监听算法的不精准性,导致该完整缓存数据行Full Cache Line很有可能在该cluster中是处于无效状态的;(2)如果监听控制单元12中的记录表明该cluster中不存在完整缓存数据行Full Cache Line,则该cluster肯定不包含该完整缓存数据行Full Cache Line,即该完整缓存数据行Full Cache Line在这个cluster中肯定处于无效状态;因此,可以精确记录完整缓存数据行FullCache Line的状态。The method includes two basic characteristics: (1) if the record in the snoop control unit 12 indicates that a full cache data line Full Cache Line exists in a certain cluster, but in reality, due to the inaccuracy of the interception algorithm, the method The full cache data line Full Cache Line is likely to be in an invalid state in the cluster; (2) If the record in the snoop control unit 12 indicates that there is no full cache data line Full Cache Line in the cluster, then the cluster certainly does not The full cache data line Full Cache Line is included, that is, the full cache data line Full Cache Line is definitely in an invalid state in the cluster; therefore, the state of the full cache data line FullCache Line can be accurately recorded.
实际应用时,本发明实施例提供的从接口单元11可由实现数据一致性的装置中的物理接口及专用集成电路(ASIC,Application Specific IntergratedCircuit)或可编程逻辑阵列(FPGA,Field-Programmable Gate Array)实现,监听控制单元12可由实现数据一致性的装置中的ASIC或FPGA实现。In practical applications, the slave interface unit 11 can provide a physical interface and an ASIC (Application Specific Intercrated Circuit) or a programmable logic array (FPGA) in the device for implementing data consistency. Implementation, the snoop control unit 12 can be implemented by an ASIC or FPGA in a device that implements data consistency.
本实施例是基于AMBA4ACE协议,结合互连单元和数据一致性的功能,从硬件上解决了多处理器系统中存在的共享存储数据一致性问题,减少软件干预及外部存储器的访问次数,提高系统访问效率,降低了内存访问带来的功耗。This embodiment is based on the AMBA4ACE protocol, combined with the function of interconnect unit and data consistency, solves the problem of shared storage data consistency in multi-processor systems from hardware, reduces software intervention and external memory access times, and improves the system. Access efficiency reduces power consumption from memory access.
并且,本发明实施例的装置具有监听过滤功能,减少不必要的监听操作,进一步提升系统性能。Moreover, the device of the embodiment of the invention has a monitoring filtering function, which reduces unnecessary monitoring operations and further improves system performance.
实施例二 Embodiment 2
相应于实施例一,本发明实施例还提供了一种实现数据一致性的方法,如图8所示,该方法主要包括以下步骤:Corresponding to the first embodiment, the embodiment of the present invention further provides a method for implementing data consistency. As shown in FIG. 8, the method mainly includes the following steps:
步骤801,确定不支持接收的数据一致性请求对应的协议时,对接收的数据一致性请求进行协议转换处理; Step 801: When it is determined that the protocol corresponding to the received data consistency request is not supported, perform protocol conversion processing on the received data consistency request.
这里,当确定支持接收的数据一致性请求对应的协议时,则不对接收的数据一致性请求进行协议转换处理。Here, when it is determined that the protocol corresponding to the received data consistency request is supported, the received data consistency request is not subjected to protocol conversion processing.
本步骤中,所述确定不支持接收的数据一致性请求对应的协议时,对接收的数据一致性请求进行协议转换处理,包括:In this step, when determining that the protocol corresponding to the received data consistency request is not supported, performing protocol conversion processing on the received data consistency request, including:
将接收的支持AXI协议的数据一致性请求转换成支持ACE_Lite协议的数据一致性请求;Converting the received data conformance request supporting AXI protocol into a data consistency request supporting the ACE_Lite protocol;
该方法还包括:The method also includes:
将协议转换后的读数据一致性请求ReadOnce的字节数转换成完整缓存数据行Full Cache Line字节数;Converting the number of bytes of ReadOnce of the read data consistency request after the protocol conversion into the full cache data line Full Cache Line bytes;
为字节数转换后的读数据一致性请求ReadOnce分发读数据一致性请求ReadOnce通道,复用读数据通道;Reading data consistency request ReadOnce for the byte number conversion to read the read data consistency request ReadOnce channel, multiplexing the read data channel;
将协议转换后的写数据一致性请求WriteUnique的字节数转换成完整缓存数据行Full Cache Line字节数;Converting the number of bytes of the write data consistency request WriteUnique after the protocol conversion into the full cache data line Full Cache Line bytes;
为字节数转换后的写数据一致性请求WriteUnique分发写数据一致性请求WriteUnique通道,缓存写数据响应通道;WriteUnique distribution write data consistency request WriteUnique channel for byte data conversion write data consistency request, cache write data response channel;
对所述字节数转换后的读数据一致性请求ReadOnce及所述字节数转换后的写数据一致性请求WriteUnique的执行进行仲裁;其中,所述协议转换后的读数据一致性请求ReadOnce是指读共享数据且读出的共享数据不被缓存的请求。Arbitrating the read data consistency request ReadOnce of the byte number conversion and the execution of the write data consistency request WriteUnique after the byte number conversion; wherein the read data consistency request ReadOnce after the protocol conversion is A request to read shared data and read out shared data that is not cached.
具体地,在有一致性数据传输要求的情况下,当所述数据一致性请求对应的主设备包括AXI master时,根据AXI master中不同的AXI地址产生不同的ACE_Lite传输类型,将支持AXI协议的读或写数据一致性请求转换成支持ACE_Lite协议的读或写数据一致性请求,以使AXI master发送的读或写数据一致性请求可以有效发送,换句话说,以使AXI master发送的读或写数据一致性请求得到相应的响应;其中,所述传输类型包括:写地址 通道的监听请求AWSNOOP、读地址通道的监听请求ARSNOOP;所述AXI地址与ACE_Lite传输类型之间的映射关系可预先配置。Specifically, in the case of a consistent data transmission requirement, when the master device corresponding to the data consistency request includes the AXI master, different ACE_Lite transmission types are generated according to different AXI addresses in the AXI master, and the AXI protocol is supported. The read or write data consistency request is converted to a read or write data consistency request that supports the ACE_Lite protocol so that the read or write data consistency request sent by the AXI master can be effectively sent, in other words, to enable the AXI master to send a read or The write data consistency request is correspondingly responded; wherein the transmission type includes: a write address The listener of the channel requests AWSNOOP, the listen request ARSNOOP of the read address channel; the mapping relationship between the AXI address and the ACE_Lite transport type can be pre-configured.
这里,当发送的数据一致性请求是读数据一致性请求ReadOnce时,利用CAM、拆分算法及控制逻辑将协议转换后的读数据一致性请求ReadOnce的字节数转换成完整缓存数据行Full Cache Line字节数;具体地,将收到的协议转换后的读数据一致性请求ReadOnce进行字节合并,过滤掉多余字节,以满足原始命令数据量burst的要求;这里,因为所述监听控制单元要求读数据一致性请求的字节数与缓存数据行完整缓存数据行Full CacheLine字节数相同,而所述协议转换后的读数据一致性请求ReadOnce的字节数却无类似的限制,所以需要进行字节数的转换;Here, when the transmitted data consistency request is a read data consistency request ReadOnce, the CAM, the split algorithm, and the control logic convert the byte number of the read data consistency request ReadOnce of the protocol conversion into a full cache data line Full Cache Line number; specifically, the read data consistency request ReadOnce of the received protocol conversion is byte-merged, and the extra bytes are filtered to meet the requirement of the original command data volume burst; here, because the interception control The number of bytes required by the unit to read the data consistency request is the same as the number of bytes of the full cache data line of the cache data row, and the number of bytes of the read data consistency request ReadOnce after the protocol conversion has no similar limit, so Need to convert the number of bytes;
其中,所述完整缓存数据行Full Cache Line字节数通常为32byte或64byte;所述原始命令数据量burst包括:数据位宽、数据类型及数据长度,所述数据位宽一般为32bit、64bit或128bit;所述数据类型包括:固定型fixed、增加型incr及回绕型wrap;所述数据长度至少包括一笔数据,所述CAM的存储单元个数可根据系统要求进行配置。The number of bytes of the Full Cache Line of the full cache data line is usually 32 bytes or 64 bytes; the original command data volume burst includes: a data bit width, a data type, and a data length, and the data bit width is generally 32 bits, 64 bits or 128 bit; the data type includes: fixed type, increased type incr and wrap-around wrap; the data length includes at least one piece of data, and the number of storage units of the CAM can be configured according to system requirements.
比如,假设完整缓存数据行Full Cache Line字节数要求为32byte,数据位宽为128bit,则对应的原始命令数据量burst的数据位宽也为128bit,数据类型为回绕型、回绕长度为2(wrap2);则读数据一致性请求ReadOnce转换时的接口时序如图5所示。For example, suppose the full cache data line requires a full Cache Line byte number of 32 bytes and a data bit width of 128 bits. The corresponding original command data volume burst has a data bit width of 128 bits, and the data type is wraparound type and the wrap length is 2 ( Wrap2); then read the data consistency request interface timing when ReadOnce conversion is shown in Figure 5.
由图5可以获知,可将字节数转换后的读数据一致性请求中的低位地址为12’h18、数据位宽为64bit、数据类型为incr4的burst拆成低位地址为12’h10、数据位宽为128bit、wrap2及低位地址为12’h20、数据位宽为128bit、wrap2这两个原始命令数据量burst;其中,并不需要返回的第一个原始命令数据量burst数据的第二笔数据时,则跳过skip第二笔数据,第二个原始命令数据量burst的第一笔数据保持了两个周期,对应着s侧中地址分别为 12’h20及12’h28的数据;并且,s侧在收到第四笔数据时将rlast_s拉高;It can be known from FIG. 5 that the lower address of the read data consistency request after the byte number conversion is 12'h18, the data bit width is 64 bit, and the burst of the data type incr4 is split into the lower address of 12'h10, and the data is The bit width is 128bit, the wrap2 and the lower address are 12'h20, the data bit width is 128bit, and the wrap2 is the original two command data volume burst; wherein, the first original command data volume burst data does not need to be returned. When the data is skipped, the second data of skip is skipped, and the first data of the second original command data volume burst is kept for two periods, corresponding to the addresses in the s side. 12'h20 and 12'h28 data; and, the s side pulls rlast_s high when receiving the fourth data;
这里,还可将字节数转换后的读数据一致性请求Read Once中的低位地址为12’h18、数据位宽为64bit,wrap4的原始命令数据量burst拆成两个低位地址都为12’h10,数据位宽为128bit,wrap2的burst。其中,第一个原始命令数据量burst的第二笔数据保持了两个周期,对应s侧中地址分别为12’h00及12’h08的数据;s侧收到第四笔数据时将rlast_s拉高,其中,当不需要第二个原始命令数据量burst的第二笔数据时,则跳过skip第二笔数据;其中,所述s侧是指从设备slave的接口信号,所述m侧是指主设备单元的接口信号,所述s侧的信息第二从接口单元转换后输出的m侧的信息;Here, the read data consistency request in the byte number conversion can be read as the lower address of 12'h18, the data bit width is 64 bit, and the original command data volume of wrap4 is burst into two low-order addresses, which are 12'. H10, the data bit width is 128bit, and the wrap2 burst. The second data of the first original command data volume burst is held for two periods, corresponding to the data of the 12'h00 and 12'h08 addresses on the s side, and the rlast_s is pulled when the s side receives the fourth data. High, wherein when the second data of the second original command data volume burst is not needed, the second data of skip is skipped; wherein the s side refers to an interface signal of the slave device, the m side Refers to the interface signal of the master device unit, and the information on the s side is the information on the m side that is output after being converted from the interface unit;
所述s侧的信息包括:araddr_s、arvalid_s、arready_s、rdata_s、rlast_s、rvalid_s、rready_s;所述araddr_s是指s侧读地址通道的地址;所述arvalid_s是指s侧读地址通道的请求;所述arready_s是指s侧读地址通道请求响应;所述rdata_s是指s侧读数据通道的读数据;所述rlast_s是指s侧最后一笔读数据的指示信号;所述rvalid_s是指s侧读数据通道的请求;所述rready_s是指s侧读数据通道的请求响应;The s-side information includes: araddr_s, arvalid_s, arready_s, rdata_s, rlast_s, rvalid_s, and rready_s; the araddr_s refers to an address of the s-side read address channel; and the arvalid_s refers to a request of the s-side read address channel; Arready_s refers to the s-side read address channel request response; the rdata_s refers to the read data of the s-side read data channel; the rlast_s refers to the indication signal of the last read data on the s side; and the rvalid_s refers to the s-side read data. The request of the channel; the ready_s refers to the request response of the s-side read data channel;
所述m侧的信息包括:araddr_m、arvalid_m、arready_m、rdata_m、rlast_m、rvalid_m、rready_m;所述araddr_m是指m侧读地址通道的地址;所述arvalid_m是指m侧读地址通道的请求;所述arready_m是指m侧读地址通道的请求响应;所述rdata_m是指m侧读数据通道的读数据;所述rlast_m是指m侧最后一笔读数据一致性请求信号,所述rvalid_m是指m侧读数据通道的请求;所述rready_m是指m侧读数据通道的请求响应;所述beat_complete是指当前一笔数据结束;所述last_match是指最后一笔数据;上述araddr_s、arvalid_s、arready_s、rvalid_s、rlast_s、rdata_s、rready_s、araddr_m、arvalid_m、arready_m、rvalid_m、rlast_m、rdata_m、rready_m分别对应AXI协议中的标准信号。 The information on the m side includes: araddr_m, arvalid_m, arready_m, rdata_m, rlast_m, rvalid_m, and rready_m; the araddr_m is an address of an m-side read address channel; and the arvalid_m is a request of an m-side read address channel; Arready_m refers to the request response of the m-side read address channel; the rdata_m refers to the read data of the m-side read data channel; the rlast_m refers to the last read data consistency request signal of the m side, and the rvalid_m refers to the m side The request for reading the data channel; the ready_m refers to the request response of the m-side read data channel; the beat_complete refers to the end of the current data; the last_match refers to the last data; the above araddr_s, arvalid_s, arready_s, rvalid_s, Rlast_s, rdata_s, rready_s, araddr_m, arvalid_m, arready_m, rvalid_m, rlast_m, rdata_m, and rready_m respectively correspond to standard signals in the AXI protocol.
当读数据一致性请求ReadOnce的字节数转换完成之后,利用缓存器buffer缓存字节数转换后的读数据一致性请求ReadOnce,并为字节数转换后的读数据一致性请求ReadOnce分发读数据一致性请求通道,复用读数据通道;其中,所述复用读数据通道为:当实现数据一致性的装置的监听控制单元及所述实现数据一致性的装置的互连单元同时返回读数据时,先返回所述监听控制单元的读数据。After the read data consistency request ReadOnce byte number conversion is completed, the read data consistency request ReadOnce is converted by the buffer buffer byte number conversion, and the ReadOnce is distributed for the read data consistency request after the byte number conversion. a consistency request channel, the multiplexed read data channel; wherein the multiplexed read data channel is: when the monitoring control unit of the device implementing data consistency and the interconnecting unit of the device implementing the data consistency simultaneously return the read data At the same time, the read data of the interception control unit is returned first.
为了避免死锁,还需要阻塞传输事务间顺序ordering;所述阻塞传输事务间顺序ordering包括:所有一致性传输数据请求全部结束后,当前无一致性传输数据的请求才能发出;或者,所有无一致性传输数据请求全部结束后,当前一致性传输数据的请求才能发出。In order to avoid deadlock, it is also necessary to block the sequential ordering of the transmission transactions; the ordering of the blocking transmission transactions includes: after all the consistent transmission data requests are completed, the current non-consistent transmission data request can be issued; or, all the non-uniform After the sexual transmission data request is completed, the current request for consistent data transmission can be issued.
另外,当发送的数据一致性请求是写数据一致性请求WriteUnique时,利用CAM、拆分算法及控制逻辑将协议转换后的写数据一致性请求WriteUnique的字节数转换成完整缓存数据行Full Cache Line字节数;In addition, when the data consistency request sent is a write data consistency request WriteUnique, the number of bytes of the write data consistency request WriteUnique converted by the protocol is converted into a full cache data line Full Cache by using CAM, split algorithm and control logic. Line number of bytes;
这里,因为本发明实施例设计的所述监听控制单元要求写数据一致性请求WriteUnique的字节数与完整缓存数据行Full Cache Line字节数相同,而所述协议转换后的写数据一致性请求WriteUnique的字节数却无类似的限制,所以需要进行字节数的转换,将协议转换后的写数据一致性请求WriteUnique进行拆分,经过拆分后的每个原始命令数据量burst的总字节数都小于或等于完整缓存数据行Full Cache Line字节数,并将收到的写响应合并,以满足原始命令数据量burst的要求;Here, the interception control unit designed by the embodiment of the present invention requires that the number of bytes of the write data consistency request WriteUnique be the same as the number of bytes of the full cache data line Full Cache Line, and the write data consistency request after the protocol conversion The number of bytes in WriteUnique has no similar restrictions, so the number of bytes needs to be converted, and the write data consistency request WriteUnique after the protocol conversion is split. After the split, the original command data volume is the total word of the burst. The number of sections is less than or equal to the full cache data line Full Cache Line bytes, and the received write response is merged to meet the requirements of the original command data volume burst;
具体地,与转换所述读数据一致性请求ReadOnce类似,比如,假设完整缓存数据行Full Cache Line字节数要求为32byte,数据位宽为128bit,则对应的burst的数据位宽也为128bit,数据类型为回绕型、回绕长度为2(wrap2);则写数据一致性请求WriteUnique转换时的接口时序如图6所示。Specifically, it is similar to the read data consistency request ReadOnce. For example, if the full cache data line requires a full Cache Line byte number of 32 bytes and a data bit width of 128 bits, the corresponding burst data bit width is also 128 bits. The data type is rewind type, and the wrap length is 2 (wrap2); then the interface timing of the write data consistency request WriteUnique conversion is as shown in FIG. 6.
由图6可以获知,可将所述字节转换后的写数据一致性请求 WriteUnique中的低位地址为12’h18、数据位宽为64bit、数据类型为incr4的原始命令数据量burst分别拆成低位地址为12’h18、数据位宽为64bit、incr1及低位地址为12’h20、数据位宽为64bit、incr3这两个原始命令数据量burst;并且将m侧返回的两个bresp合并成一个bresp后从s侧发出;It can be known from FIG. 6 that the byte-converted write data consistency request can be obtained. The lower address of WriteUnique is 12'h18, the data bit width is 64bit, and the original command data volume burst of data type incr4 is split into low-order address of 12'h18, data bit width of 64bit, incr1 and low-order address of 12'h20. The data bit width is 64 bit, incr3 two original command data volume burst; and the two bresp returned from the m side are merged into one bresp and then sent from the s side;
这里,还可将字节数转换后的写数据一致性请求WriteUnique中的低位地址为12’h10、数据位宽为128bit,wrap4的原始命令数据量burst分别拆成低位地址为12’h10,数据位宽为128bit,incr1的burst、低位地址为12’h20,数据位宽为128bit,incr2的burst及低位地址为12’h00,数据位宽为128bit,incr1的burst;并且将m侧返回的三个写通道数据响应bresp合并成一个写通道数据响应bresp后从s侧发出;其中,所述m侧为主设备单元的接口;所述awaddr_s是指s侧写地址通道的地址;所述awvalid_s是指s侧写地址通道的请求;所述awready_s是指s侧写地址通道的请求响应;所述wdata_s是s侧指写数据通道的写数据;所述wlast_s是指s侧最后一笔写数据的指示信号;所述bvalid_s是指s侧写响应通道的请求;所述bready_s是指写响应通道的请求响应;所述awaddr_m是指m侧写地址通道的地址;所述awvalid_m是指m侧写地址通道的请求;所述awready_m是指m侧写地址通道的请求响应;所述wdata_m是指m侧写数据通道的写数据;所述wlast_m是指m侧最后一笔写数据指示信号;所述bvalid_m是指m侧写响应通道的请求;所述bready_m是指m侧写响应通道的请求响应;上述对应awaddr_s、awvalid_s、awready_s、wdata_s、wlast_s、bvalid_s、bready_s、awaddr_m、awvalid_m、awready_m、wdata_m、wlast_m、bvalid_m、bready_m分别对应AXI协议中的标准信号。Here, the byte address conversion write data consistency request WriteUnique low address is 12'h10, data bit width is 128bit, wrap4 original command data volume burst is split into low address 12'h10, data The bit width is 128bit, the burst of incr1, the lower address is 12'h20, the data bit width is 128bit, the burst and lower address of incr2 are 12'h00, the data bit width is 128bit, the burst of incr1; and the m side returns three The write channel data response bresp is merged into a write channel data response bresp and sent from the s side; wherein the m side is the interface of the main device unit; the awaddr_s is the address of the s side write address channel; the awvalid_s is Refers to the s side write address channel request; the awready_s refers to the s side write address channel request response; the wdata_s is the s side refers to the write data channel write data; the wlast_s refers to the s side last write data The indication signal; the bvalid_s refers to the request of the s side write response channel; the wholesale_s refers to the request response of the write response channel; the awaddr_m refers to the address of the m side write address channel; the awvalid_m refers to the m side write address The request of the channel; the awready_m refers to the request response of the m side write address channel; the wdata_m refers to the write data of the m side write data channel; the wlast_m refers to the last write data indication signal of the m side; the bvalid_m Refers to the m side write response channel request; the wholesale_m refers to the m side write response channel request response; the above corresponding awaddr_s, awvalid_s, awready_s, wdata_s, wlast_s, bvalid_s, bready_s, awaddr_m, awvalid_m, awready_m, wdata_m, wlast_m, Bvalid_m and bready_m correspond to the standard signals in the AXI protocol.
当所述写数据一致性请求WriteUnique的字节转换完成之后,首先利用缓存器buffer缓存字节数转换后的写数据一致性请求WriteUnique,并为字节数转换后的写数据一致性请求WriteUnique分发写数据一致性请求通 道;再将无效请求invalidate的字节数调整成与所述字节转换后的写数据一致性请求WriteUnique字节数相等,向监听控制单元发送无效请求invalidate,接收返回的无效请求响应inv_done后,向互连单元发起写操作,缓存写数据响应通道。After the byte conversion of the write data consistency request WriteUnique is completed, firstly, the write data consistency request WriteUnique is converted by the buffer buffer byte number conversion, and the WriteUnique distribution is requested for the byte data conversion write data consistency request. Write data consistency request And then adjusting the number of bytes of the invalid request invalidate to be equal to the number of WriteUnique bytes of the write data consistency request after the byte conversion, sending an invalid request invalidate to the intercept control unit, and receiving the returned invalid request response inv_done, A write operation is initiated to the interconnect unit to buffer the write data response channel.
这里,由于监听控制单元返回的无效请求响应inv_done可能是乱序的,为了保证字节数转换后的写数据一致性请求WriteUnique与发送的写数据一致性请求WriteUnique顺序的一致性,在无效请求invalidate的标识inv_id中除了添加有第二主设备单元的写地址通道标识awid外,还要在字节数转换后的写数据一致性请求WriteUnique中添加buffer号,并保存在buffer中;如果返回的标识inv_id与保存的buffer号一致,才将对应的写数据一致性请求WriteUnique发送至互连单元。Here, since the invalid request response inv_done returned by the snoop control unit may be out of order, in order to ensure the consistency of the write data consistency request WriteUnique and the sent write data consistency request WriteUnique order after the byte number conversion, the invalid request invalidate In addition to the write address channel identifier awid of the second master unit, the identifier inv_id also adds a buffer number in the write data consistency request WriteUnique after the byte number conversion, and saves it in the buffer; if the returned identifier The inv_id is the same as the saved buffer number, and the corresponding write data consistency request WriteUnique is sent to the interconnect unit.
步骤702,根据协议转换处理后的数据一致性请求,确定对应的数据一致性操作设备,对所述数据一致性操作设备进行数据一致性操作;Step 702: Determine, according to the data consistency request processed by the protocol conversion, the corresponding data consistency operation device, and perform data consistency operation on the data consistency operation device.
本步骤中,当同时收到读数据一致性请求ReadOnce及写数据一致性请求WriteUnique时,对所述字节数转换后的读数据一致性请求ReadOnce及所述字节数转换后的写数据一致性请求WriteUnique的执行进行仲裁,并根据仲裁后的读数据一致性请求ReadOnce或写数据一致性请求WriteUnique向所述监听控制单元发送相应的数据一致性请求;这里,因为所述实现数据一致性的装置的第二从接口单元与监听控制单元之间的一致性请求接口只有一个,所以第二从接口单元需要对所述读数据一致性请求ReadOnce和写数据一致性请求WriteUnique的执行进行仲裁后,向监听控制单元发送读数据一致性请求ReadOnce,或根据写数据一致性请求WriteUnique向监听控制单元发送无效请求invalidate。In this step, when the read data consistency request ReadOnce and the write data consistency request WriteUnique are simultaneously received, the read data consistency request ReadOnce and the byte number converted write data are consistent with the byte number conversion. The execution of the write request WriteUnique is arbitrated, and the ReadOnce or Write Data Consistency Request WriteUnique is sent to the intercept control unit according to the read data consistency request after the arbitration; here, because the data consistency is achieved There is only one consistency request interface between the second slave interface unit and the snoop control unit of the device, so the second slave interface unit needs to arbitrate the execution of the read data consistency request ReadOnce and the write data consistency request WriteUnique. Sending a read data consistency request ReadOnce to the snoop control unit, or sending an invalid request invalidate to the snoop control unit according to the write data consistency request WriteUnique.
这里,若仲裁后的请求是读数据一致性请求ReadOnce时,将读数据一致性请求ReadOnce发送至所述监听控制单元后,还需根据所述写数据一致 性请求WriteUnique向所述监听控制单元发送无效请求invalidate;或者,Here, if the request after the arbitration is a read data consistency request ReadOnce, after the read data consistency request ReadOnce is sent to the interception control unit, it is also required to be consistent according to the write data. The sexual request WriteUnique sends an invalidation request to the interception control unit; or,
若仲裁后的请求是写数据一致性请求WriteUnique时,根据写数据一致性请求WriteUnique向所述监听控制单元发送无效请求invalidate后,还需将所述读数据一致性请求ReadOnce发送至所述监听控制单元。If the request after the arbitration is a write data consistency request WriteUnique, after the write data consistency request WriteUnique sends the invalid request invalidate to the intercept control unit, the read data consistency request ReadOnce is also sent to the intercept control. unit.
其中,对所述字节数转换后的读数据一致性请求及所述字节数转换后的写数据一致性请求的执行进行仲裁的具体实现方法有很多种,比如:可以根据轮询仲裁的方式对所述读数据一致性请求ReadOnce及写数据一致性请求WriteUnique的执行进行仲裁,还可以根据最近最少访问或伪随机的仲裁方式进行仲裁。There are various implementation methods for arbitrating the read data consistency request after the byte number conversion and the execution of the write data consistency request after the byte number conversion, for example, according to the polling arbitration. The method arbitrates the execution of the read data consistency request ReadOnce and the write data consistency request WriteUnique, and may also perform arbitration according to the least recently accessed or pseudo-random arbitration mode.
这里,所述根据协议转换处理后的数据一致性请求,确定对应的数据一致性操作设备,对所述数据一致性操作设备进行数据一致性操作,包括:Here, the determining, according to the data consistency request after the protocol conversion processing, the corresponding data consistency operation device, performing data consistency operation on the data consistency operation device, including:
根据协议转换处理后的数据一致性请求,查找标记存储器,确定查找到标记存储器,向查找到的标记存储器对应的主设备单元发起监听,以获取读数据;确定未查找到标记存储器时,利用互连单元获取读数据。According to the data consistency request after the protocol conversion processing, searching for the tag memory, determining to find the tag memory, initiating the monitoring to the main device unit corresponding to the tag memory to obtain the read data; determining that the tag memory is not found, The unit gets the read data.
具体地,当收到协议转换处理后的读数据一致性请求ReadOnce时,根据协议转换后的读数据一致性请求ReadOnce,确定查找到标记存储器tag_ram时,向查找到的标记存储器tag_ram对应的第一主设备单元发送监听请求,获取访问数据;若第一主设备单元未响应监听请求,则向互连单元发送读数据操作指示,获取读数据;若确定未查找到标记存储器tag_ram时,则向所述互连单元发送读数据操作指示,获取读数据;或者,Specifically, when the read data consistency request ReadOnce after the protocol conversion process is received, the read data consistency request ReadOnce is determined according to the protocol conversion, and when the tag memory tag_ram is found, the first corresponding to the tag memory tag_ram is found. The master device unit sends a listening request to obtain the access data; if the first master device unit does not respond to the monitoring request, sends a read data operation instruction to the interconnect unit to acquire the read data; if it is determined that the tag memory tag_ram is not found, The interconnect unit sends a read data operation instruction to acquire read data; or,
当接收的数据一致性请求为写一致性请求WriteUnique时,所述根据协议转换处理后的数据一致性请求,确定对应的数据一致性操作设备,对所述数据一致性操作设备进行数据一致性操作,包括:When the received data consistency request is a write consistency request WriteUnique, the data consistency request device according to the protocol conversion process determines a corresponding data consistency operation device, and performs data consistency operation on the data consistency operation device. ,include:
当收到协议转换处理后的写数据一致性请求WriteUnique时,响应接收写数据一致性请求WriteUnique的第二从接口单元发送的无效请求 invalidate,以使第二从接口单元向互连发起写操作;When receiving the write data consistency request WriteUnique after the protocol conversion process, responding to the invalid request sent by the second slave interface unit of the write data consistency request WriteUnique Invalidate to cause the second slave interface unit to initiate a write operation to the interconnect;
这里,所述根据所述协议转换后的读数据一致性请求ReadOnce查找标记存储器tag_ram,如果查找到标记存储器tag_ram,则向发送第一主设备单元发送监听请求,具体包括:Here, the read data consistency request ReadOnce looks up the tag memory tag_ram according to the protocol conversion, and if the tag memory tag_ram is found, sends a snoop request to the sending first master device unit, which specifically includes:
根据所述协议转换后的读数据一致性请求ReadOnce查找标记存储器tag_ram,如果查找到标记存储器tag_ram,则根据标记存储器tag_ram中的完整缓存数据行Full Cache Line信息生成命中结果;其中,若命中结果中的完整缓存数据行Full Cache Line是有效状态,则向第一主设备单元发送监听请求,以获取读数据;若命中结果中的完整缓存数据行Full Cache Line是无效状态或命中结果中不存在完整缓存数据行Full Cache Line,则利用互连单元向外部存储器memory发送读外部存储器memory请求;所述操作类型为ReadClean,所述ReadClean是指读共享数据并且读出的共享数据不被缓存,所述标记存储器tag_ram中记录了所访问的完整缓存数据行FullCache Line是否存在于第一主设备单元的cache中;所述第二从接口单元还可以通过侦听所述第一主设备单元对应的第一从接口单元判断是否能获取访问数据;如果第二主设备单元需要访问的数据在第一主设备单元的cache中,则在无需访问从设备单元的情况下就可以直接从第一主设备单元的cache中获取访问数据,这样,可以减少访问时间,提高访问效率。ReadOce looks up the tag memory tag_ram according to the read data consistency after the protocol conversion, and if the tag memory tag_ram is found, generates a hit result according to the full cache data line in the tag memory tag_ram; wherein, if the hit result is The full cache data line Full Cache Line is valid, then send a listen request to the first master unit to obtain read data; if the full cache data line in the hit result is Full Cache Line is invalid or the hit result does not exist intact Cache the data line Full Cache Line, then use the interconnection unit to send a read external memory memory request to the external memory memory; the operation type is ReadClean, the ReadClean refers to reading the shared data and the read shared data is not cached, The tag memory tag_ram records whether the accessed full cache data line FullCache Line exists in the cache of the first master unit; the second slave interface unit can also listen to the first corresponding to the first master unit Determine from the interface unit whether the number of accesses can be obtained. According to the data; if the data that the second master unit needs to access is in the cache of the first master unit, the access data can be directly obtained from the cache of the first master unit without accessing the slave unit, so that Can reduce access time and improve access efficiency.
当监听控制单元接收到无效请求invalidate时,返回无效请求响应inv_done,第二从接口单元根据无效请求响应inv_done向互连单元发送写操作指示,监听控制单元根据对应标记存储器tag_ram的无效请求,将相应标记存储器tag_ram设置成无效状态,同时根据写回WriteBack请求中的更新消息更新tag_ram;其中,所述写回WriteBack请求是指所述第一从接口单元向监听控制单元发送的将数据写回到外部存储器memory的请求。When the intercept control unit receives the invalid request invalidate, the invalid request response inv_done is returned, and the second slave interface unit sends a write operation indication to the interconnect unit according to the invalid request response inv_done, and the intercept control unit responds according to the invalid request of the corresponding tag memory tag_ram. The tag memory tag_ram is set to an invalid state, and the tag_ram is updated according to the update message written back to the WriteBack request; wherein the write back WriteBack request refers to writing the data back to the external slave interface unit to the intercept control unit Memory memory request.
另外,当确定支持接收的数据一致性请求对应的协议时,则不需要对 接收的数据一致性请求进行协议转换处理,直接将接收的数据一致性请求发送至所述监听控制单元。In addition, when it is determined that the protocol corresponding to the received data consistency request is supported, then no The received data consistency request is subjected to protocol conversion processing, and the received data consistency request is directly sent to the interception control unit.
具体地,在有一致性数据传输要求的情况下,根据先进先出FIFO缓存传输类型、数据地址冲突、传输事务间顺序ordering情况,将无需进行协议转换的读数据一致性请求发送至监听控制单元,将无需进行协议转换处理的写数据一致性请求发送至互连单元,直接向互连单元发起读操作指示,当监听控制单元接收到返回的读数据后,将读数据发送至第一从接口单元。所述监听控制单元对无需进行协议转换的读数据一致性请求的处理流程与协议转换后的读数据一致性请求的处理流程相同。Specifically, in the case of a consistent data transmission requirement, a read data consistency request that does not require protocol conversion is sent to the interception control unit according to the first-in first-out FIFO buffer transfer type, the data address conflict, and the order of the transfer transaction ordering. Sending a write data consistency request without performing protocol conversion processing to the interconnect unit, directly initiating a read operation indication to the interconnect unit, and when the intercept control unit receives the returned read data, transmitting the read data to the first slave interface unit. The processing flow of the read data consistency request for the interception control unit to the protocol conversion is the same as the processing flow of the read data consistency request after the protocol conversion.
这里,当所述监听控制单元同时接收到无需进行协议转换的读数据一致性请求及经协议转换后的读数据一致性请求ReadOnce时,需要对无需进行协议转换的读数据一致性请求及经协议转换后的读数据一致性请求ReadOnce的执行进行仲裁,如果所述监听控制单元仲裁后的请求是所述无需进行协议转换的读数据一致性请求时,则对所述无需进行协议转换的读数据一致性请求处理完毕之后,还需对经协议转换后的读数据一致性请求ReadOnce进行处理;或者,如果所述监听控制单元仲裁后的请求是所述经协议转换后的读数据一致性请求ReadOnce时,则对所述经协议转换后的读数据一致性请求ReadOnce处理完毕之后,还需对无需进行协议转换的读数据一致性请求进行处理。Here, when the intercept control unit simultaneously receives the read data consistency request without protocol conversion and the read data consistency request ReadOnce after the protocol conversion, the read data consistency request and the protocol are not required for protocol conversion. The read data consistency request of the converted read data is arbitrated by the execution of the ReadOnce, and if the request after the arbitration control unit arbitrates is the read data consistency request that does not need to perform protocol conversion, the read data that does not need to be converted by the protocol is After the consistency request is processed, the read data consistency request ReadOnce is also processed; or if the interception control unit arbitrates the request is the protocol converted read data consistency request ReadOnce Then, after the ReadOnce processing of the protocol-converted read data consistency request is completed, a read data consistency request that does not need to perform protocol conversion needs to be processed.
这里,如果所述第一从接口单元发送的无需进行协议转换的数据一致性请求、第二从接口单元发出的需要协议转换的数据一致性请求具有相同的ID,所述监听控制单元还需确保处理这些请求的顺序一致性。Here, if the data consistency request sent by the first slave interface unit without protocol conversion and the data consistency request sent by the second slave interface unit requiring protocol conversion have the same ID, the intercept control unit needs to ensure Handle the order consistency of these requests.
这里,所述第一接口从单元,支持通过early wresp寄存器提供的控制信号选择写响应提前返回early response或写响应正常返回normal response的方式。对于写响应提前返回early response方式,当根据无需进行协议转 换的写数据一致性请求完成写操作后,则返回写响应;如果实际写响应有错误error,第一接口从单元则会记录错误传输的地址和标识ID;对于写响应正常返回normal response方式,将实际写响应返回给第一主设备单元。Here, the first interface slave unit supports a manner of selecting a write response to return an early response or a write response to return a normal response by a control signal provided by an early wresp register. Returning the early response method to the write response in advance, when there is no need to perform protocol transfer After the write data consistency request completes the write operation, the write response is returned; if the actual write response has an error error, the first interface slave unit records the address and ID of the error transmission; for the write response, the normal response mode is returned. The actual write response is returned to the first master unit.
所述第一接口从单元还具有数据传输超时检测功能,在数据传输过程中,通过计数检测来判断数据传输的各阶段是否超时。具体地,第一主设备单元通过握手机制向从设备单元发送valid信号,当第一从接口单元判断如果在超时阈值周期内没有接收到接收从设备单元返回的ready信号时,认为数据传输超时,产生超时中断;所述超时阈值周期可根据实际情况预先配置。The first interface slave unit further has a data transmission timeout detection function, and during the data transmission process, it is determined by counting detection whether each phase of the data transmission times out. Specifically, the first master device unit sends a valid signal to the slave device unit by using a handshake mechanism, and when the first slave interface unit determines that the read signal returned by the slave device unit is not received within the timeout threshold period, the data transmission is considered to be timed out. A timeout interrupt is generated; the timeout threshold period can be pre-configured according to actual conditions.
另外,如果第一主设备单元进行除读和写外的其它一致性维护操作时,所述监听控制单元根据复本唯一CleanUnique请求或复本共有CleanShared请求或复本无效CleanInvalid请求查找标记存储器tag_ram,如果查找到标记存储器tag_ram,则根据标记存储器tag_ram中的完整缓存数据行Full Cache Line信息生成命中结果;其中,若命中结果中的完整缓存数据行Full Cache Line是有效状态,则向第一主设备单元发送监听请求,接收第一主设备单元返回的监听响应cresponse和监听数据cdata,当dirty数据需要写入外部存储器memory时,所述监听控制单元利用互连单元向外部存储器memory发送写操作,以将dirty数据写入外部存储器memory中。In addition, if the first master unit performs other consistency maintenance operations other than reading and writing, the intercept control unit searches for the tag memory tag_ram according to the duplicate unique CleanUnique request or the duplicate CommonShared request or the duplicate invalid CleanInvalid request. If the tag memory tag_ram is found, a hit result is generated according to the full cache data line Full Cache Line information in the tag memory tag_ram; wherein, if the full cache data line Full Cache Line in the hit result is in a valid state, then the first master device is The unit sends a listening request, and receives the listening response cresponse and the listening data cdata returned by the first main device unit. When the dirty data needs to be written into the external memory memory, the monitoring control unit uses the interconnect unit to send a write operation to the external memory memory to Write dirty data to the external memory memory.
这里,由于监听控制单元是配置为维护第一主设备单元中两个cluster之间的数据一致性,但是若要采用现有技术中记录完整缓存数据行Full Cache Line状态的方法,来记录各个完整缓存数据行Full Cache Line状态,将需要消耗非常大的资源,并且方法复杂,难以实现;因此,本实施例中,所述监听控制单元采用的是分段地址计数法,来记录各个cluster中完整缓存数据行Full Cache Line的存在状态,不但容易实现,而且能较精确地记录完整缓存数据行Full Cache Line的状态。 Here, since the snoop control unit is configured to maintain data consistency between the two clusters in the first main unit, but to record the full cache line status in the prior art, to record each complete Cache data line Full Cache Line status, which will consume a very large resource, and the method is complicated and difficult to implement; therefore, in this embodiment, the interception control unit uses a segment address counting method to record complete in each cluster. Cache data line The existence status of Full Cache Line is not only easy to implement, but also can accurately record the status of the full cache data line Full Cache Line.
所述方法包括两个基本特性:(1)如果监听控制单元中的记录表明某完整缓存数据行Full Cache Line存在某个cluster中,但实际上,由于监听算法的不精准性,导致该完整缓存数据行Full Cache Line很有可能在该cluster中是处于无效状态的;(2)如果监听控制单元中的记录表明该cluster中不存在完整缓存数据行Full Cache Line,则该cluster肯定不包含该完整缓存数据行Full Cache Line,即该完整缓存数据行Full Cache Line在这个cluster中肯定处于无效状态;因此,可以精确记录完整缓存数据行Full Cache Line的状态。The method includes two basic characteristics: (1) if the record in the intercept control unit indicates that a full cache data line Full Cache Line exists in a certain cluster, but in fact, due to the inaccuracy of the interception algorithm, the complete cache is caused. The data line Full Cache Line is likely to be in an invalid state in the cluster; (2) if the record in the intercept control unit indicates that there is no full cache data line Full Cache Line in the cluster, the cluster definitely does not contain the complete Cache data line Full Cache Line, that is, the full cache data line Full Cache Line is definitely in an invalid state in this cluster; therefore, the state of the full cache data line Full Cache Line can be accurately recorded.
本步骤中,为了避免死锁,还需要对传输事务间顺序ordering进行阻塞、处理写后写WAW和读后写RAW之间的冲突;其中,In this step, in order to avoid deadlock, it is also necessary to block the order order between the transfer transactions, handle the conflict between the write-before-write WAW and the read-after-write RAW;
所述阻塞传输事务间顺序ordering包括:所有一致性传输数据请求全部结束后,当前无一致性传输数据的请求才能发出;或者,所有无一致性传输数据请求全部结束后,当前一致性传输数据的请求才能发出。The ordering ordering of the blocking transmission transaction includes: after all the consistent transmission data requests are completed, the current non-consistent transmission data request can be sent; or, after all the unconsistent transmission data requests are completed, the current consistency transmission data is The request can be issued.
对于WAW冲突,将字节数转换后的写数据一致性请求WriteUnique地址发送至第一从接口单元中,若与所述其他写数据一致性请求之间存在冲突,则会阻塞其他写数据一致性请求,直至字节数转换后的写数据一致性请求完成操作;所述WAW冲突是指第一主设备单元对该地址区域进行写操作之后,第二主设备单元对该地址区域进行读操作;或者指第二主设备单元对该地址区域进行写操作之后,第一主设备单元对该地址区域进行读操作。For the WAW conflict, the write data consistency request WriteUnique address of the byte number conversion is sent to the first slave interface unit, and if there is a conflict with the other write data consistency request, the other write data consistency is blocked. The request until the byte number conversion of the write data consistency request completes the operation; the WAW conflict refers to the first master device unit performing a write operation on the address area, and the second master device unit performs a read operation on the address area; Or after the second master unit writes the address area, the first master unit performs a read operation on the address area.
对于RAW冲突,利用CAM保存未处理的数据一致性请求的写地址通道标识awid和写地址通道地址,读数据一致性请求的miss地址,判断读数据一致性请求的miss地址与pending地址是否相同,若相同,则返回冲突信号hazard,以保证字节数转换后的写数据一致性请求WriteUnique完成操作,只有字节数转换后的写数据一致性请求WriteUnique完成操作后,才会 向互连单元发起读数据操作;其中,所述写地址通道标识awid用于查找写响应通道标识bid以及从CAM中读取数据;所述RAW是指第一主设备单元对该地址区域进行写操作之后,第二主设备单元对该地址区域进行读操作;或者是指第一主设备单元对该地址区域进行写操作之后,第二主设备单元对该地址区域进行读操作。For RAW conflicts, use CAM to save the write address channel identifier awid and write address channel address of the unprocessed data consistency request, read the miss address of the data consistency request, and determine whether the miss address and the pending address of the read data consistency request are the same. If they are the same, the conflict signal hazard is returned to ensure that the write data consistency request after the byte number conversion request WriteUnique completes the operation, and only after the byte data conversion write data consistency request WriteUnique completes the operation, Initiating a read data operation to the interconnect unit; wherein the write address channel identifier awid is used to find the write response channel identifier bid and read data from the CAM; the RAW means that the first master device unit writes the address region After the operation, the second master device unit performs a read operation on the address region; or after the first master device unit performs a write operation on the address region, the second master device unit performs a read operation on the address region.
另外,本步骤中,当确定支持接收的数据一致性请求对应的协议时,则不需要对接收的数据一致性请求进行协议转换处理,将接收的数据一致性请求发送至所述监听控制单元,以便所述监听控制单元根据数据一致性请求,确定对应的数据一致性操作设备,对所述数据一致性操作设备进行数据一致性操作。In addition, in this step, when it is determined that the protocol corresponding to the received data consistency request is supported, the protocol conversion processing of the received data consistency request is not required, and the received data consistency request is sent to the interception control unit. The monitoring control unit determines, according to the data consistency request, a corresponding data consistency operation device, and performs data consistency operation on the data consistency operation device.
在无一致性数据传输要求的情况下,则根据FIFO缓存传输类型、数据地址冲突、传输事务间顺序ordering情况,将数据一致性请求直接发送至所述互连单元,以访问相应的从设备单元。In the case of non-conforming data transmission requirements, the data consistency request is directly sent to the interconnect unit according to the FIFO buffer transmission type, the data address conflict, and the order of the transmission transaction, to access the corresponding slave unit. .
本发明实施例提供的方案,从硬件上解决了多处理器系统中存在的共享存储数据一致性问题,减少软件干预及外部存储器的访问次数,提高系统访问效率,降低了内存访问带来的功耗。The solution provided by the embodiment of the invention solves the problem of shared storage data consistency in the multi-processor system from hardware, reduces software intervention and external memory access times, improves system access efficiency, and reduces work brought by memory access. Consumption.
并且,本发明实施例的方案所对应的装置具有监听过滤功能,减少不必要的监听操作,进一步提升系统性能。Moreover, the device corresponding to the solution of the embodiment of the present invention has a monitoring filtering function, which reduces unnecessary monitoring operations and further improves system performance.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程 图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It should be understood that the flow can be implemented by computer program instructions Each of the processes and/or blocks in the figures and/or block diagrams, and combinations of the flows and/or blocks in the flowcharts and/or block diagrams. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。 The above is only the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in Within the scope of protection of the present invention.

Claims (21)

  1. 一种实现数据一致性的装置,所述装置包括:从接口单元及监听控制单元;其中,An apparatus for implementing data consistency, the apparatus comprising: a slave interface unit and a monitoring control unit; wherein
    所述从接口单元,配置为确定不支持接收的数据一致性请求对应的协议时,对接收的数据一致性请求进行协议转换处理,并将协议转换处理后的数据一致性请求发送至所述监听控制单元;The slave interface unit, configured to determine a protocol corresponding to the received data consistency request, performs protocol conversion processing on the received data consistency request, and sends the data conversion request processed by the protocol conversion to the monitoring control unit;
    所述监听控制单元,配置为根据所述从接口单元发送的数据一致性请求,确定对应的数据一致性操作设备,对所述数据一致性操作设备进行数据一致性操作。The monitoring control unit is configured to determine, according to the data consistency request sent by the slave interface unit, a corresponding data consistency operation device, and perform data consistency operation on the data consistency operation device.
  2. 根据权利要求1所述的装置,其中,所述监听控制单元,还配置为当收到的数据一致性请求为两个以上数据一致性请求时,对收到的两个以上数据一致性请求的执行进行仲裁,根据仲裁后的数据一致性请求,确定对应的数据一致性操作设备,对所述数据一致性操作设备进行数据一致性操作。The apparatus according to claim 1, wherein the interception control unit is further configured to, when the received data consistency request is more than two data consistency requests, request the two or more data consistency requests received Performing arbitration, determining a corresponding data consistency operation device according to the data consistency request after the arbitration, and performing data consistency operation on the data consistency operation device.
  3. 根据权利要求1所述的装置,其中,所述从接口单元,还配置为确定支持接收的数据一致性请求对应的协议时,将接收的数据一致性请求发送至所述监听控制单元。The apparatus of claim 1, wherein the slave interface unit is further configured to, when configured to determine a protocol corresponding to the received data consistency request, to send the received data consistency request to the snoop control unit.
  4. 根据权利要求3所述的装置,其中,所述从接口单元包括:第一从接口单元及第二从接口单元;其中,The device according to claim 3, wherein the slave interface unit comprises: a first slave interface unit and a second slave interface unit; wherein
    所述第一从接口单元,配置为将接收的来自第一主设备单元的第一读数据一致性请求发送至所述监听控制单元;The first slave interface unit is configured to send the received first read data consistency request from the first master unit to the intercept control unit;
    所述第二从接口单元,配置为将接收的来自第二主设备单元的数据一致性请求进行协议转换处理,并将协议转换处理后的数据一致性请求发送至所述监听控制单元。The second slave interface unit is configured to perform a protocol conversion process on the received data consistency request from the second master device unit, and send the protocol conversion processed data consistency request to the interception control unit.
  5. 根据权利要求4所述的装置,其中,所述第二从接口单元,配置为: 将接收的第二主设备单元发送的支持AXI协议的数据一致性请求转换成支持ACE_Lite协议的数据一致性请求;并将协议转换后的数据一致性请求的字节数转换成完整缓存数据行Full Cache Line字节数。The apparatus of claim 4, wherein the second slave interface unit is configured to: Converting the AXI protocol-compliant data consistency request sent by the received second master unit into a data consistency request supporting the ACE_Lite protocol; and converting the number of bytes of the protocol-converted data consistency request into a full cache data line Full Cache Line Bytes.
  6. 根据权利要求5所述的装置,其中,所述第二从接口单元包括:协议转换子单元、读操作转换子单元、读接口子单元、写操作转换子单元、以及写接口子单元;其中,The apparatus according to claim 5, wherein said second slave interface unit comprises: a protocol conversion subunit, a read operation conversion subunit, a read interface subunit, a write operation conversion subunit, and a write interface subunit; wherein
    所述协议转换子单元,配置为将接收的第二主设备单元发送的支持AXI协议的数据一致性请求转换成支持ACE_Lite协议的数据一致性请求;The protocol conversion subunit is configured to convert a data consistency request sent by the received second master unit to support the AXI protocol into a data consistency request supporting the ACE_Lite protocol;
    所述读操作转换子单元,配置为当第二主设备单元发送的数据一致性请求为第二读数据一致性请求时,将协议转换后的第二读数据一致性请求的字节数转换成Full Cache Line字节数;The read operation conversion subunit is configured to convert, when the data consistency request sent by the second master device unit is the second read data consistency request, the number of bytes of the second read data consistency request after the protocol conversion is converted into Full Cache Line bytes;
    所述读接口子单元,配置为为所述字节数转换后的第二读数据一致性请求分发第二读数据一致性请求通道,复用读数据通道;The read interface sub-unit is configured to distribute a second read data consistency request channel for the second read data consistency request after the byte number conversion, and multiplex the read data channel;
    所述写操作转换子单元,配置为当第二主设备单元发送的数据一致性请求为第二写数据一致性请求时,将协议转换后的第二写数据一致性请求的字节数转换成Full Cache Line字节数;The write operation conversion subunit is configured to convert, when the data consistency request sent by the second master device unit is the second write data consistency request, the number of bytes of the second write data consistency request after the protocol conversion is converted into Full Cache Line bytes;
    所述写接口子单元,配置为为所述字节数转换后的第二写数据一致性请求分发第二写数据一致性请求通道,缓存写数据响应通道。The write interface sub-unit is configured to distribute a second write data consistency request channel for the second write data consistency request after the byte number conversion, and cache the write data response channel.
  7. 根据权利要求6所述的装置,其中,所述第二从接口单元还包括:仲裁子单元,配置为当同时收到所述读接口子单元与所述写接口子单元发送的数据一致性请求时,对所述字节数转换后的第二读数据一致性请求及所述字节数转换后的第二写数据一致性请求的执行进行仲裁,并根据仲裁后的第二读数据一致性请求或第二写数据一致性请求向所述监听控制单元发送相应的数据一致性请求。The apparatus of claim 6, wherein the second slave interface unit further comprises: an arbitration subunit configured to simultaneously receive a data consistency request sent by the read interface subunit and the write interface subunit And arbitrating the execution of the second read data consistency request after the byte number conversion and the second write data consistency request after the byte number conversion, and according to the second read data consistency after the arbitration The request or second write data consistency request sends a corresponding data consistency request to the snoop control unit.
  8. 根据权利要求6所述的装置,其中,所述读接口子单元还配置为阻 塞传输事务间顺序。The apparatus of claim 6 wherein said read interface subunit is further configured to block The plug transfers the order between transactions.
  9. 根据权利要求6所述的装置,其中,写接口子单元还配置为阻塞传输事务间顺序、处理写后写WAW和读后写RAW冲突。The apparatus of claim 6 wherein the write interface sub-unit is further configured to block the transfer inter-transaction sequence, handle the write-behind write WAW, and the post-write write RAW conflict.
  10. 根据权利要求4所述的装置,其中,所述第一从接口单元,还配置为将来自第一主设备单元的第一写数据一致性请求发送至互连单元,直接向互连单元发起写操作。The apparatus of claim 4, wherein the first slave interface unit is further configured to send a first write data consistency request from the first master unit to the interconnect unit to initiate writing directly to the interconnect unit operating.
  11. 根据权利要求4所述的装置,其中,所述监听控制单元包括标记控制子单元及数据交换子单元;其中,The apparatus according to claim 4, wherein said snoop control unit comprises a mark control subunit and a data exchange subunit; wherein
    所述标记控制子单元,配置为接收第一从接口单元发送的第一读和/或第一写数据一致性请求、第二从接口单元发送的第二读和/或第二写一致性请求及数据交换子单元发送的无效请求invalidate,并对这些请求的执行进仲裁;当仲裁后的请求是第一读数据一致性请求或第二读数据一致性请求时,根据第一读数据一致性请求或第二读数据一致性请求查找标记存储器,如果查找到标记存储器,则根据标记存储器中的Full Cache Line信息生成命中结果;若命中结果中的Full Cache Line是有效状态,则向所述数据交换子单元发送监听请求,以获取读数据;若命中结果中的Full Cache Line是无效状态或命中结果中不存在Full Cache Line,则利用互连单元获取读数据;The tag control subunit is configured to receive a first read and/or first write data consistency request sent by the first slave interface unit, a second read and/or a second write consistency request sent by the second slave interface unit And the invalidation request invalidate sent by the data exchange subunit, and arbitrate the execution of the requests; when the arbitrated request is the first read data consistency request or the second read data consistency request, according to the first read data consistency The request or the second read data consistency request looks up the tag memory, and if the tag memory is found, generates a hit result according to the Full Cache Line information in the tag memory; if the Full Cache Line in the hit result is a valid state, the data is The exchange subunit sends a listen request to obtain the read data; if the Full Cache Line in the hit result is in an invalid state or the Full Cache Line does not exist in the hit result, the read unit is used to acquire the read data;
    所述数据交换子单元,配置为根据命中信息将所述监听请求发送至第一主设备单元,接收第一主设备单元返回的监听响应和监听数据,并将监听数据发送至第一从接口单元或第二从接口单元后,向第一从接口单元或第二从接口单元发送数据一致性请求操作完成指示。The data exchange sub-unit is configured to send the interception request to the first main device unit according to the hit information, receive the intercept response and the intercept data returned by the first main unit, and send the intercept data to the first slave interface unit. Or after the second slave interface unit, send a data consistency request operation completion indication to the first slave interface unit or the second slave interface unit.
  12. 根据权利要求11所述的装置,其中,所述标记控制子单元,还配置为当监听请求无响应时,利用互连单元获取读数据。The apparatus of claim 11, wherein the flag control subunit is further configured to utilize the interconnect unit to acquire read data when the snoop request is unresponsive.
  13. 根据权利要求12所述的装置,其中,所述数据交换子单元,还配 置为收到第二从接口单元发送的无效请求后,向第二从接口单元返回无效请求响应;并向所述标记控制子单元发送对应标记存储的无效请求;The apparatus according to claim 12, wherein said data exchange subunit is further provided After receiving the invalid request sent by the second slave interface unit, returning an invalid request response to the second slave interface unit; and sending an invalid request corresponding to the tag storage to the tag control subunit;
    相应地,所述标记控制子单元,还配置为收到数据交换子单元的无效请求后,将相应标记存储器设置成无效状态,同时根据收到的写回请求中的更新消息更新标记存储器;Correspondingly, the tag control subunit is further configured to: after receiving the invalid request of the data exchange subunit, set the corresponding tag memory to an invalid state, and update the tag memory according to the update message in the received writeback request;
    第二从接口单元,还配置为收到数据交换子单元的响应后,向互连单元发起写操作。The second slave interface unit is further configured to initiate a write operation to the interconnect unit after receiving the response of the data exchange subunit.
  14. 根据权利要求11所述的装置,其中,所述监听控制单元还包括仲裁子单元,配置为:对标记控制子单元发送的读外部存储器memory请求及所述数据交换子单元发送的读外部存储器请求的执行进行仲裁,并将仲裁后的读请求发送至互连单元,接收互连单元返回的读数据。The apparatus of claim 11, wherein the snoop control unit further comprises an arbitration subunit configured to: read a read external memory request sent by the tag control subunit and a read external memory request sent by the data exchange subunit The execution is arbitrated, and the arbitrated read request is sent to the interconnect unit to receive the read data returned by the interconnect unit.
  15. 一种实现数据一致性的方法,所述方法还包括:A method for achieving data consistency, the method further comprising:
    确定不支持接收的数据一致性请求对应的协议时,对接收的数据一致性请求进行协议转换处理;When determining that the protocol corresponding to the received data consistency request is not supported, performing protocol conversion processing on the received data consistency request;
    根据协议转换处理后的数据一致性请求,确定对应的数据一致性操作设备,对所述数据一致性操作设备进行数据一致性操作。And determining, according to the data consistency request processed by the protocol conversion, the corresponding data consistency operation device, and performing data consistency operation on the data consistency operation device.
  16. 根据权利要求15所述的方法,其中,所述对接收的数据一致性请求进行协议转换处理,包括:The method of claim 15, wherein the performing a protocol conversion process on the received data consistency request comprises:
    将接收的支持AXI协议的数据一致性请求转换成支持ACE_Lite协议的数据一致性请求;并将协议转换后的数据一致性请求的字节数转换成Full Cache Line字节数。The received data consistency request supporting the AXI protocol is converted into a data consistency request supporting the ACE_Lite protocol; and the number of bytes of the data conversion request after the protocol conversion is converted into the Full Cache Line byte number.
  17. 根据权利要求16所述的方法,其中,当接收的数据一致性请求为读一致性请求时,所述根据协议转换处理后的数据一致性请求,确定对应的数据一致性操作设备,对所述数据一致性操作设备进行数据一致性操作,包括: The method according to claim 16, wherein when the received data consistency request is a read consistency request, the data consistency request is determined according to the protocol conversion process, and the corresponding data consistency operation device is determined. The data consistency operation device performs data consistency operations, including:
    根据协议转换处理后的读数据一致性请求,查找标记存储器,确定查找到标记存储器,向查找到的标记存储器对应的主设备单元发起监听,以获取读数据;确定未查找到标记存储器时,利用互连单元获取读数据。According to the read data consistency request after the protocol conversion process, the tag memory is searched, the tag memory is found, the main device unit corresponding to the tag memory is found to be monitored to obtain the read data, and the tag memory is not found. The interconnect unit acquires read data.
  18. 根据权利要求17所述的方法,其中,所述方法还包括:The method of claim 17, wherein the method further comprises:
    当监听无响应时,利用互连单元获取读数据。When the listener is not responding, the read unit is used to acquire the read data.
  19. 根据权利要求16所述的方法,其中,当接收的数据一致性请求为写一致性请求时,所述根据协议转换处理后的数据一致性请求,确定对应的数据一致性操作设备,对所述数据一致性操作设备进行数据一致性操作,包括:The method according to claim 16, wherein when the received data consistency request is a write consistency request, the data consistency request is determined according to the protocol conversion process, and the corresponding data consistency operation device is determined. The data consistency operation device performs data consistency operations, including:
    根据字节数转换后的写数据一致性请求向实现数据一致性的装置的监听控制单元发送无效请求;Sending an invalidation request to the interception control unit of the device implementing data consistency according to the write data consistency request after the byte number conversion;
    所述监听控制单元返回无效请求响应;The interception control unit returns an invalid request response;
    根据无效请求响应,向实现数据一致性的装置的互连单元发起写操作。A write operation is initiated to the interconnect unit of the device implementing data consistency based on the invalid request response.
  20. 根据权利要求15所述的方法,其中,所述方法还包括:The method of claim 15 wherein the method further comprises:
    阻塞传输事务间顺序;和/或,Blocking the order of transmission transactions; and/or,
    处理WAW和RAW冲突。Handles WAW and RAW conflicts.
  21. 一种计算机存储介质,所述计算机存储介质包括一组指令,当执行所述指令时,引起至少一个处理器执行如权利要求15至20任一项所述的实现数据一致性的方法。 A computer storage medium comprising a set of instructions that, when executed, cause at least one processor to perform the method of implementing data consistency as claimed in any one of claims 15 to 20.
PCT/CN2014/088637 2014-05-07 2014-10-15 Method and device for realizing data consistency, and computer storage medium WO2015169054A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410190727.0 2014-05-07
CN201410190727.0A CN105095254B (en) 2014-05-07 2014-05-07 Method and device for realizing data consistency

Publications (1)

Publication Number Publication Date
WO2015169054A1 true WO2015169054A1 (en) 2015-11-12

Family

ID=54392083

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/088637 WO2015169054A1 (en) 2014-05-07 2014-10-15 Method and device for realizing data consistency, and computer storage medium

Country Status (2)

Country Link
CN (1) CN105095254B (en)
WO (1) WO2015169054A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112506815A (en) * 2020-11-27 2021-03-16 海光信息技术股份有限公司 Data transmission method and data transmission device

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107656937B (en) * 2016-07-26 2021-05-25 北京京东尚科信息技术有限公司 Method and device for realizing consistency of read-write data
CN108733529B (en) * 2017-04-19 2021-08-10 龙芯中科技术股份有限公司 Verification method and device for interleaving function of AXI (advanced extensible interface) cross switch
CN109741163B (en) * 2018-09-07 2021-05-28 网联清算有限公司 Account data consistency management method and device and storage medium
CN109947677B (en) * 2019-02-27 2023-03-21 山东华芯半导体有限公司 AXI bus bit width conversion device supporting disorder function and data transmission method
CN110781120B (en) * 2019-10-23 2023-02-28 山东华芯半导体有限公司 Method for realizing cross-4 KB transmission of AXI bus host equipment
CN112558569B (en) * 2020-12-08 2022-03-15 浙江国利网安科技有限公司 Data processing method and device, electronic equipment and storage medium
CN116561056B (en) * 2023-07-07 2024-02-20 芯动微电子科技(珠海)有限公司 System on chip
CN117349214B (en) * 2023-12-05 2024-02-09 天津国芯科技有限公司 AXI protocol-to-serial communication protocol conversion bridge with unpacking and packing capacity

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6349366B1 (en) * 1998-06-18 2002-02-19 Compaq Information Technologies Group, L.P. Method and apparatus for developing multiprocessor cache control protocols using a memory management system generating atomic probe commands and system data control response commands
US8185697B1 (en) * 2005-01-07 2012-05-22 Hewlett-Packard Development Company, L.P. Methods and systems for coherence protocol tuning
US20130103912A1 (en) * 2011-06-06 2013-04-25 STMicroelectronics (R&D) Ltd. Arrangement
US20140115210A1 (en) * 2012-10-24 2014-04-24 Texas Instruments Incorporated Multi Processor Multi Domain Conversion Bridge with Out of Order Return Buffering

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6810467B1 (en) * 2000-08-21 2004-10-26 Intel Corporation Method and apparatus for centralized snoop filtering
CN101430664B (en) * 2008-09-12 2010-07-28 中国科学院计算技术研究所 Multiprocessor system and Cache consistency message transmission method
CN101446931B (en) * 2008-12-03 2010-12-08 中国科学院计算技术研究所 System and method for realizing consistency of input/output data
CN102866923B (en) * 2012-09-07 2015-01-28 杭州中天微系统有限公司 High-efficiency consistency detection and filtration device for multiple symmetric cores

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6349366B1 (en) * 1998-06-18 2002-02-19 Compaq Information Technologies Group, L.P. Method and apparatus for developing multiprocessor cache control protocols using a memory management system generating atomic probe commands and system data control response commands
US8185697B1 (en) * 2005-01-07 2012-05-22 Hewlett-Packard Development Company, L.P. Methods and systems for coherence protocol tuning
US20130103912A1 (en) * 2011-06-06 2013-04-25 STMicroelectronics (R&D) Ltd. Arrangement
US20140115210A1 (en) * 2012-10-24 2014-04-24 Texas Instruments Incorporated Multi Processor Multi Domain Conversion Bridge with Out of Order Return Buffering

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112506815A (en) * 2020-11-27 2021-03-16 海光信息技术股份有限公司 Data transmission method and data transmission device

Also Published As

Publication number Publication date
CN105095254B (en) 2023-01-10
CN105095254A (en) 2015-11-25

Similar Documents

Publication Publication Date Title
WO2015169054A1 (en) Method and device for realizing data consistency, and computer storage medium
JP3832833B2 (en) Information processing method and apparatus
TWI516933B (en) Apparatus and method for memory mirroring and migration at home agent and computer-readable medium
US7093079B2 (en) Snoop filter bypass
US9003091B2 (en) Flow control for a Serial Peripheral Interface bus
TWI311707B (en) Computer system with integrated directory and processor cache
JP4499420B2 (en) Supercharge message exchange device
US5919254A (en) Method and apparatus for switching between source-synchronous and common clock data transfer modes in a multiple processing system
TW200534110A (en) A method for supporting improved burst transfers on a coherent bus
US9952644B2 (en) Device power management state transition latency advertisement for faster boot time
US9213656B2 (en) Flexible arbitration scheme for multi endpoint atomic accesses in multicore systems
JP2009217813A (en) Data transfer between devices in integrated circuit
JP2018109965A (en) Data processing
WO2017101080A1 (en) Write request processing method, processor and computer
KR100310399B1 (en) Method and apparatus for transferring data over a processor interface bus
TW577024B (en) Method and apparatus for providing global coherence in a large-way, high performance SMP system
US9372796B2 (en) Optimum cache access scheme for multi endpoint atomic access in a multicore system
US20040044877A1 (en) Computer node to mesh interface for highly scalable parallel processing system
CN114416632A (en) Two-stage cache interconnection structure based on flexible conversion of multi-bus protocol
US20080133834A1 (en) Bit ordering for communicating an address on a serial fabric
US7043612B2 (en) Compute node to mesh interface for highly scalable parallel processing system and method of exchanging data
US6108721A (en) Method and apparatus for ensuring data consistency between an i/o channel and a processor
JPS6237752A (en) Multiple bus system possessing microprocessor having separate instruction, data interface and cash
CN116561036B (en) Data access control method, device, equipment and storage medium
US11874783B2 (en) Coherent block read fulfillment

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: 14891360

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 30/03/17)

122 Ep: pct application non-entry in european phase

Ref document number: 14891360

Country of ref document: EP

Kind code of ref document: A1