WO2021142851A1 - 一种片上系统及数据校验方法 - Google Patents

一种片上系统及数据校验方法 Download PDF

Info

Publication number
WO2021142851A1
WO2021142851A1 PCT/CN2020/073063 CN2020073063W WO2021142851A1 WO 2021142851 A1 WO2021142851 A1 WO 2021142851A1 CN 2020073063 W CN2020073063 W CN 2020073063W WO 2021142851 A1 WO2021142851 A1 WO 2021142851A1
Authority
WO
WIPO (PCT)
Prior art keywords
memory
data
storage space
memory interface
module
Prior art date
Application number
PCT/CN2020/073063
Other languages
English (en)
French (fr)
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 华为技术有限公司
Priority to CN202080093849.1A priority Critical patent/CN114981782A/zh
Priority to PCT/CN2020/073063 priority patent/WO2021142851A1/zh
Publication of WO2021142851A1 publication Critical patent/WO2021142851A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware

Definitions

  • the embodiments of the present application relate to the field of chips, and in particular to a system on chip and a data verification method.
  • a system on chip is a system that integrates multiple integrated circuits on a chip to perform specific functions set. SOC can also be called a chip-level system. SOC includes hardware system and embedded software carried on the hardware system. As an example, as shown in FIG. 1, a schematic structural diagram of an SOC provided in the prior art.
  • the SOC includes at least one functional module, a network on chip (NOC), N memory interfaces (memory interfaces), and M memories, where N and M are both integers greater than or equal to 1.
  • NOC network on chip
  • N memory interfaces memory interfaces
  • M memories where N and M are both integers greater than or equal to 1.
  • Each functional module is connected to N memory interfaces through NOC, and each memory interface is connected to at least one memory.
  • the functional module can be a central processing unit (CPU), a graphics processing unit (GPU), an artificial intelligence (AI) computing accelerator, an audio management unit, and a video (display) Management unit, high-speed serial computer expansion bus standard (peripheral component interconnect express, PCIe) equipment, Ethernet (Ethernet) interface equipment or Universal Serial Bus (Universal Serial Bus, USB), etc.
  • NOC can be a communication interconnection module in SOC, NOC is a high-speed bus connecting functional modules and memory, which can realize high-speed, high-efficiency, low-latency and low-power data communication between functional modules.
  • the memory interface can be a memory access management module for managing the connected memory.
  • the memory interface may include a memory controller (memory controller) and a home agent (home agent).
  • the function module can access the memory channel through the NOC to read or write the memory.
  • the memory channel includes a memory interface and a memory.
  • a lock step mechanism can be used to verify whether the data read from the memory is correct.
  • Fig. 2 a schematic diagram of another SOC structure provided in the prior art. Each memory channel is connected to a memory channel through a check module, and the hardware structure of the two memory channels connected through the check module is the same, and the data stored is the same.
  • the verification module verifies the data read from the memory in the two memory channels, determines whether the data is correct, and determines the logical correctness of the memory channel by checking the verification result.
  • the hardware logic overhead is relatively large.
  • the present application provides a system-on-chip and a data verification method, which solves the problem of how to ensure the reliability of data when the memory is read or written while reducing the hardware logic overhead of the SOC.
  • an SOC includes at least one functional module, NOC, at least two memory channels, a copy module, and a check module.
  • Each memory channel includes a memory interface and a memory, and each memory interface is connected to at least one memory.
  • the function module is used to access the memory in the memory channel through the NOC.
  • the copy module is used to determine the second physical address according to the first physical address, the first physical address is used to indicate the first storage space, the second physical address is used to indicate the second storage space, and the second storage space is the first storage
  • the backup space of the space, the first storage space and the second storage space belong to the storage space in the memory included in the same memory channel, or the first storage space is the storage space of the first memory included in the first memory channel, and the second storage space is The storage space is the storage space of the second memory included in the second memory channel.
  • the first storage space stores the first data
  • the second storage space stores the second data
  • the second data is obtained by copying the first data
  • the second memory also stores There are other data, other data is different from the data stored in the first memory except the first data
  • the verification module is used to verify the first data read from the first storage space and read from the second storage space If the second data is the same, if the first data and the second data are the same, the verification success response is fed back; if the first data and the second data are different, the verification failure response is fed back.
  • the first data may refer to original data
  • the second data may refer to backup data of the first data.
  • the SOC Central Plains is reused
  • the memory with the memory channel backs up the original data.
  • the backup data is read from the second storage space according to the second physical address at the same time, so as to verify the original data and backup Data, and feedback to the functional module a response to a successful verification or a response to a verification failure.
  • the hardware logic overhead of the SOC by verifying the original data and backup data, the reliability of the data when the functional module reads the memory is improved, and mirroring protects the memory channel of the memory storing the original data to ensure The correctness of the logic of the memory channel in turn guarantees the requirements for functional safety.
  • the hardware in the SOC automatically checks the data, the abnormality detection is timely and the real-time performance is high.
  • the verification data is decoupled from the specific implementation scheme of the memory channel, and the versatility and adaptability are strong.
  • the SOC also includes a decoding module.
  • the decoding module is configured to determine a first memory channel according to a first physical address, the first memory channel includes a first memory interface, and the first memory interface is connected to the first memory; the decoding module is also configured to determine a first memory channel according to the second physical address.
  • the address determines the second memory channel, the second memory channel includes a second memory interface, and the second memory interface is connected to the second memory.
  • the first memory interface is configured to read the first data from the first storage space according to the first read instruction, and the first read instruction is used to instruct to read the first data stored in the first storage space indicated by the first physical address;
  • the second memory interface is configured to read the second data from the second storage space according to the second read instruction, and the second read instruction is used to instruct to read the second data stored in the second storage space indicated by the second physical address.
  • the second read instruction may be obtained by copying the first read instruction by the copy module, NOC, decoding module or the first memory interface in the SOC.
  • the first memory interface includes a check module
  • the second memory interface is also used to feed back second data to the first memory interface. Therefore, it is convenient for the verification module to verify the original data and the backup data, and to ensure the reliability of the data when the memory is read or written.
  • the first memory interface is further configured to write first data to the first storage space according to the first write instruction, and the first write instruction is used to indicate the first storage space indicated to the first physical address Write the first data;
  • the second memory interface is also used to write the second data to the second storage space according to the second write instruction, and the second write instruction is used to instruct to write the second data to the second storage space indicated by the second physical address Two data. Therefore, the original data is backed up by multiplexing the memory of the original memory channel in the SOC, which reduces the hardware logic overhead of the SOC.
  • the first memory interface is also used to send second data to the second memory interface.
  • the first memory interface is also used to send second data to the second memory interface.
  • it is convenient to write the second data into the second storage space.
  • the decoding module is arranged in the functional module or in the NOC; or, the decoding module is connected to the functional module and the NOC respectively; or the decoding module is connected to the NOC, the first memory interface and the second Memory interface connection.
  • the copy module is arranged in the functional module, in the NOC, in the decoding module, in the first memory interface, or in the second memory interface.
  • the check module is arranged in the memory interface.
  • a data verification method is provided, which is applied to an SOC.
  • the SOC includes at least one function module, an NOC, at least two memory channels, a copy module, and a verification module.
  • Each memory channel includes a memory interface and a memory.
  • Each memory interface is connected to at least one memory, and the function module is used to access the memory in the memory channel through the NOC.
  • the method includes: a replication module determines a second physical address according to a first physical address, the first physical address is used to indicate a first storage space, the second physical address is used to indicate a second storage space, and the second storage space is the first storage space
  • the first storage space and the second storage space belong to the storage space in the memory contained in the same memory channel, or the first storage space is the storage space of the first memory contained in the first memory channel, and the second storage Space is the storage space of the second memory contained in the second memory channel.
  • the first storage space stores the first data
  • the second storage space stores the second data
  • the second data is obtained by copying the first data
  • the second memory also stores Other data, other data is different from the data stored in the first memory except the first data
  • the verification module verifies the first data read from the first storage space and the second data read from the second storage space Whether they are the same, if the first data and the second data are the same, a verification success response is fed back to the functional module, and if the first data and the second data are different, a verification failure response is fed back to the functional module. Since there is no hardware logic resource duplication in the SOC provided by this application, the original memory of the original memory channel in the SOC is reused to back up the original data.
  • the original data When the original data is read from the first storage space according to the first physical address, the original data is read from the second physical address at the same time.
  • the second storage space reads the backup data to facilitate the verification of the original data and the backup data, and feeds back a verification success response or a verification failure response to the functional module.
  • the SOC further includes a decoding module
  • the method further includes: the decoding module determines the first memory channel according to the first physical address, the first memory channel further includes a first memory interface, the first memory interface and the first memory interface A memory connection; the decoding module determines a second memory channel according to the second physical address, the second memory channel further includes a second memory interface, and the second memory interface is connected to the second memory.
  • the method further includes: the first memory interface reads the first data from the first storage space according to the first read instruction, where the first read instruction is used to instruct to read the first data stored in the first storage space indicated by the first physical address. Data; the second memory interface reads the second data from the second storage space according to the second read instruction, and the second read instruction is used to instruct to read the second data stored in the second storage space indicated by the second physical address.
  • the first memory interface includes a check module
  • the method further includes: the second memory interface feeds back the second data to the first memory interface. Therefore, it is convenient for the verification module to verify the original data and the backup data, and to ensure the reliability of the data when the memory is read or written.
  • the method further includes: the first memory interface writes the first data to the first storage space according to the first write instruction, and the first write instruction is used to indicate the first storage indicated to the first physical address. Space writes the first data; the second memory interface writes the second data to the second storage space according to the second write instruction, the second write instruction is used to instruct to write the second data to the second storage space indicated by the second physical address .
  • the original data is backed up by the memory of the original memory channel in the SOC, which reduces the hardware logic overhead of the SOC.
  • the method further includes: the first memory interface sends the second data to the second memory interface.
  • the first memory interface sends the second data to the second memory interface.
  • the decoding module is arranged in the functional module or in the NOC; or, the decoding module is connected to the functional module and the NOC respectively; or the decoding module is connected to the NOC, the first memory interface and the second Memory interface connection.
  • the copy module is provided in the function module, in the NOC, in the decoding module, in the first memory interface, or in the second memory interface.
  • the check module is arranged in the memory interface.
  • Fig. 1 is a schematic diagram of the structure of a SOC provided in the prior art
  • Fig. 2 is a schematic structural diagram of a SOC provided in the prior art
  • FIG. 3 is a schematic structural diagram of a SOC provided by this application.
  • FIG. 4 is a schematic diagram of a storage space in a mutual backup relationship provided by this application.
  • FIG. 5 is a schematic structural diagram of a SOC provided by this application.
  • Fig. 6 is a schematic structural diagram of a SOC provided by this application.
  • FIG. 7 is a schematic structural diagram of a SOC provided by this application.
  • FIG. 8 is a flowchart of a data verification method provided by this application.
  • FIG. 9 is a flowchart of a data verification method provided by this application.
  • words such as “exemplary” or “for example” are used as examples, illustrations, or illustrations. Any embodiment or design solution described as “exemplary” or “for example” in the embodiments of the present application should not be construed as being more preferable or advantageous than other embodiments or design solutions. To be precise, words such as “exemplary” or “for example” are used to present related concepts in a specific manner.
  • SOC can be used in fields with high reliability requirements such as automatic driving, industrial and aviation fields.
  • the SOC can control the equipment to achieve different functional safety.
  • the so-called functional safety refers to the activation of protection or corrective devices when a potentially dangerous situation is detected to prevent the occurrence of a dangerous event or to provide mitigation measures to reduce the consequences of a dangerous event.
  • functional safety can refer to a safety mechanism that ensures the safety of life or property from physical or natural factors through one or more automatic protection mechanisms.
  • functional safety can prevent the stove from overheating and catching fire.
  • functional safety can prevent the automatic door from closing suddenly, avoiding the automatic door from injuring the user.
  • the functional safety can make the lawnmower cut off the electricity in time to prevent the lawnmower from catching fire.
  • autonomous vehicles can make independent decisions without unmanned intervention.
  • Functional safety can control the safe driving of autonomous vehicles, prevent them from braking by mistake, causing accidents, or preventing airbags from being unintentionally opened, so as to protect users' safety.
  • Driving safety For example, when a cat suddenly rushes out of the road, functional safety can make the self-driving vehicle brake in time; and if a piece of waste paper drifts by, functional safety can prevent the self-driving vehicle from braking. In the event of an accident in an autonomous vehicle, functional safety can enable the autonomous vehicle to open the airbag in time.
  • ASIL Automotive Safety Integrity Level
  • ASIL-C Automotive Safety Integrity Level
  • ASIL-B ASIL-A
  • QM Quality Management
  • memory is an important component of the SOC system and needs to support multiple Read and write access to functional modules with functional safety levels, and need to meet the high-performance computing requirements of autonomous driving, usually requires multiple memory channels to provide sufficient memory bandwidth and capacity to ensure the safety of each function.
  • the memory channel must meet the highest ASIL-D level of functional safety requirements. For example, when someone suddenly rushes out of the road, functional safety needs to control the self-driving vehicle to brake in time. At this time, the functional module needs to access the memory and read timely braking data from the memory. If the function module fails to access the memory or the read timely brake data is wrong, a car accident may occur.
  • an embodiment of the present application provides an SOC.
  • the SOC includes at least one functional module, NOC, At least two memory channels, a copy module and a check module, each memory channel includes a memory interface and a memory, each memory interface is connected to at least one memory, and the functional module is used to access the memory in the memory channel through the NOC.
  • the copy module is used to determine the second physical address according to the first physical address, the first physical address is used to indicate the first storage space, the second physical address is used to indicate the second storage space, and the second storage space is the first storage space
  • the first storage space and the second storage space all belong to the storage space in the memory contained in the same memory channel. It is understandable that the storage space in the memory included in the same memory channel may refer to the storage space in different memories included in the same memory channel. Or, both the first storage space and the second storage space belong to storage spaces in memories included in different memory channels.
  • the first storage space is the storage space of the first memory contained in the first memory channel
  • the second storage space is the storage space of the second memory contained in the second memory channel
  • the first storage space stores the first data
  • the second storage The space stores the second data
  • the second data is obtained by copying the first data
  • the second memory also stores other data
  • the other data is different from the data stored in the first memory except the first data
  • the verification module is used for Check whether the first data read from the first storage space and the second data read from the second storage space are the same. If the first data and the second data are the same, a successful verification response will be fed back. If the first data and the second data are the same Second, the data is different, and the verification failure response is feedback.
  • the first data may refer to original data
  • the second data may refer to backup data of the first data.
  • the SOC Central Plains is reused
  • the memory with the memory channel backs up the original data.
  • the backup data is read from the second storage space according to the second physical address at the same time, so as to verify the original data and backup Data, and feedback to the functional module a response to a successful verification or a response to a verification failure.
  • the hardware logic overhead of the SOC by verifying the original data and backup data, the reliability of the data when the functional module reads the memory is improved, and mirroring protects the memory channel of the memory storing the original data to ensure The correctness of the logic of the memory channel in turn guarantees the requirements for functional safety.
  • the hardware in the SOC automatically checks the data, the abnormality detection is timely and the real-time performance is high.
  • the verification data is decoupled from the specific implementation scheme of the memory channel, and the versatility and adaptability are strong.
  • the "backup” described herein may also be referred to as mirroring.
  • the "backup space” can also be referred to as a mirror space.
  • each functional module is connected to the NOC.
  • the decoding module can be set between the NOC and the memory interface.
  • the NOC is connected to the decoding module.
  • the decoding module is respectively connected with N memory interfaces.
  • At least one memory is connected to each memory interface.
  • the number of memories connected to different memory interfaces can be different.
  • the memory interface may be connected to at least one other memory interface, and the memory connected to the other at least one memory interface and the memory connected to the memory interface are mutually mirrored spaces, and the mutually mirrored storage spaces may be Part or all of the storage space in the internal memory is not limited.
  • a memory interface and at least one memory connected to the memory interface may be referred to as a memory channel.
  • the verification module can be set in the memory interface, that is, each memory interface includes a verification module.
  • the copy module may be provided in at least one of the function module, the NOC, the decoding module, and the memory interface.
  • the function of the copy module may be implemented by a functional module, NOC, decoding module, or memory interface, that is, at least one of the function module, NOC, decoding module, and memory interface has the function of the copy module.
  • N is an integer greater than or equal to 1.
  • N is a multiple of 2.
  • the value of N can be 2, 4, 6, or 8.
  • the i-th memory interface may refer to any one of the N memory interfaces.
  • the jth memory interface may refer to any one of the N memory interfaces. If i is not equal to j, it means that the i-th memory interface and the j-th memory interface belong to different memory channels. If i is equal to j, it means that the i-th memory interface and the j-th memory interface belong to the same memory channel.
  • FIG. 3 is a schematic structural diagram of a SOC provided by an embodiment of the application.
  • the SOC 300 includes a function module 301, a NOC 302, a decoding module 303, a memory interface 304, a memory interface 305, a memory 306, and a memory 307.
  • the functional module 301 is connected to the NOC302.
  • the NOC302 is connected to the decoding module 303.
  • the decoding module 303 is connected to the memory interface 304 and the memory interface 305 respectively.
  • the memory interface 304 and the memory interface 305 are connected.
  • the memory interface 304 is connected to the memory 306.
  • the memory interface 305 is connected to the memory 307.
  • a verification module 308 is provided in the memory interface 304.
  • a verification module 309 is provided in the memory interface 305.
  • the memory interface 304 and the memory 306 may be referred to as a first memory channel.
  • the memory interface 305 and the memory 307 may be referred to as a second memory channel.
  • the function module 301 writes data to the memory 306 or the memory 307 in detail.
  • the function module 301 is configured to generate a first write instruction, and the first write instruction is used to instruct to write first data to the memory 306 or the memory 307.
  • the first write instruction is used to instruct to write the first data to the memory 306.
  • the first write instruction includes a first physical address.
  • the first write instruction is used to instruct to write the first data to the first storage space indicated by the first physical address.
  • the first storage space may be part of the storage space or the entire storage space in the memory 306.
  • the function module 301 is further configured to determine the second physical address according to the first physical address.
  • the second physical address is used to indicate the second storage space.
  • the second storage space is a backup storage space of the first storage space.
  • Storage spaces that are in a mutual backup relationship can be located in the memory of the same memory channel. Alternatively, the storage spaces in a mutual backup relationship may be located in the memories of different memory channels. For example, if the first storage space is part of the storage space in the memory 306, the second storage space is part of the storage space in the memory 307. If the first storage space is all the storage spaces in the memory 306, the second storage space is all the storage spaces in the memory 307.
  • the mutual backup relationship can also be referred to as the mutual mirroring relationship.
  • the hardware in the SOC can provide a configuration interface by accessing the memory (such as the backup register address space), and one or more sections of storage space can be configured as mutual backup space.
  • the mutual backup space includes Original storage space and backup storage space.
  • the mutual backup space can also be referred to as the mutual mirror space.
  • the original storage space is the physical address space accessible by the program running on the hardware.
  • the backup storage space is a mirror image of the original storage space, which caches data that is exactly the same as the original storage space.
  • the backup storage space is reserved in the effective memory storage space, but is automatically managed by the hardware, and the programs running by the hardware are not visible.
  • the mutual mirror space can be divided from the memory by configuring the physical address segment.
  • the backup storage space can be represented by the start address and the size of the space, and can also be represented by the start address and the end address.
  • the memory 306 includes a storage space A and a storage space B'; the memory 307 includes a storage space A'and a storage space B. Both storage space A and storage space B are original storage spaces (entity spaces). Storage space A'and storage space B'are copy storage spaces. Storage space A and storage space A'are mutually mirrored spaces, and storage space B and storage space B'are mutually mirrored spaces.
  • the first storage space may be storage space A
  • the second storage space may be storage space A'
  • the first storage space may be storage space B
  • the second storage space may be storage space B'.
  • the functional module 301 may query a pre-configured storage space backup relationship according to the first physical address to determine the second physical address corresponding to the first physical address.
  • the storage space backup relationship may be pre-configured.
  • the storage space backup relationship may be presented in the form of a table, that is, Table 1 presents the storage space backup relationship.
  • Table 1 only illustrates the storage form of the storage space backup relationship in the storage device in the form of a table, and does not limit the storage form of the storage space backup relationship in the storage device.
  • the storage space backup relationship is stored in the storage device.
  • the storage form in the device may also be stored in other forms, which is not limited in the embodiment of the present application.
  • the functional module 301 may determine the second physical address according to the first physical address according to a predetermined algorithm. This application does not limit the specific implementation manner in which the function module 301 determines the second physical address according to the first physical address.
  • the method of configuring mutually mirrored spaces described in the embodiments of the present application is also compatible with the interleaving technology, thereby ensuring bandwidth balance among multiple memory channels and avoiding congestion. It is understandable that since all the memories of the SOC can be divided according to the unit storage units, all the memories of the SOC are configured as mirror spaces as uniformly as possible.
  • the function module 301 determines the second physical address corresponding to the first physical address according to the interleaving technique.
  • the function module 301 is also used to generate a second write instruction.
  • the second write instruction includes a second physical address.
  • the second write instruction is used to instruct to write second data to the second storage space in the memory 307.
  • the function module 301 sends the first write instruction and the second write instruction to the NOC302, and the NOC302 forwards the first write instruction and the second write instruction to the decoding module 303.
  • the decoding module 303 is configured to determine the first memory channel according to the first physical address, and determine the second memory channel according to the second physical address.
  • the decoding module can determine the direction according to the first physical address.
  • the memory interface 304 in the first memory channel sends the first write command.
  • the decoding module can be based on the second physical The address determination sends a second write command to the memory interface 305 in the second memory channel.
  • the decoding module 303 may determine the first memory interface according to the first physical address, and determine the first storage space according to the first memory interface.
  • the decoding module 303 may also determine the second memory interface according to the second physical address, and determine the second storage space according to the second memory interface.
  • the memory interface 304 is configured to write the first data to the first storage space in the memory 306 according to the first write instruction.
  • the memory interface 305 is configured to write second data to the second storage space in the memory 307 according to the second write instruction.
  • the first write instruction may include first data
  • the memory interface 304 may obtain the first data from the first write instruction.
  • the function module 301 copies the first data to obtain the second data
  • the second write instruction sent to the memory interface 305 may include the second data
  • the memory interface 305 may obtain the second data from the second write instruction.
  • the second data may be obtained by copying the first data through the memory interface 304.
  • the memory interface 304 is also used to send second data to the memory interface 305.
  • the first write instruction may not include the first data.
  • the function module 301 sends the first data to the memory interface 304. After the memory interface 304 receives the first data, it copies the first data to obtain the second data, and sends the second data to the memory interface 305. Optionally, the function module 301 may send the second data to the memory interface 305.
  • the second data can also be obtained by copying the first data from other functional units in the NOC 302, the decoding module 303, or the memory 306, which is not limited in this application.
  • the second write instruction can also be obtained by copying the first write instruction from other functional units in the NOC 302, the decoding module 303 or the memory 306, which is not limited in this application.
  • the function module 301 reads data from the memory 306 in detail.
  • the function module 301 is also used to generate a first read instruction, and the first read instruction is used to instruct to read the first data from the memory 306.
  • the first read instruction includes a first physical address.
  • the first read instruction is used to instruct to read the first data stored in the first storage space in the memory 306 indicated by the first physical address.
  • first storage space For the explanation of the first storage space, reference may be made to the above description, which will not be repeated.
  • the functional module 301 is further configured to determine a second physical address according to the first physical address, the second physical address is used to indicate a second storage space, and the second storage space is a backup storage space of the first storage space.
  • the second physical address is used to indicate a second storage space
  • the second storage space is a backup storage space of the first storage space.
  • the function module 301 is also used to generate a second read instruction.
  • the second read instruction includes a second physical address.
  • the second read instruction is used to instruct to read the second data stored in the second storage space in the memory 307 indicated by the second physical address.
  • the function module 301 sends the first read instruction and the second read instruction to the NOC302, and the NOC302 forwards the first read instruction and the second read instruction to the decoding module 303.
  • the decoding module 303 is configured to determine the first memory channel according to the first physical address, and determine the second memory channel according to the second physical address.
  • the memory interface 304 is configured to read the first data from the first storage space in the memory 306 according to the first read instruction.
  • the memory interface 305 is configured to read the second data from the second storage space in the memory 307 according to the second read instruction.
  • the memory interface 305 is also used to feed back the second data to the memory interface 304.
  • the verification module 308 is used to verify whether the first data and the second data are the same. If the first data and the second data are the same, the verification success response is fed back to the function module 301. If the first data and the second data are different, the The function module 301 feeds back a response of verification failure.
  • a Cyclical Redundancy Check (CRC) method may be used to check whether the first data and the second data are the same, which is not limited in this application.
  • the verification module 308 may also feed back the first data to the function module 301.
  • the function module 301 may read the first data to control the automatic driving vehicle to brake in time. Therefore, the functional module 301 first writes the first data to the memory 306, and at the same time writes the second data to the memory 307. For example, when someone suddenly rushes out on the road and the functional safety control self-driving vehicle brakes in time, the functional module 301 accesses the memory 306 and the memory 307, reads the first data from the memory 306, and reads the second data from the memory 307. If the verification module 308 verifies that the first data and the second data are the same, the verification module 308 feeds back the first data to the function module 301 to control the automatic driving vehicle to brake in time, thereby avoiding a car accident.
  • the embodiment of the present application is described by taking the function module 301 to realize the function of the copy module as an example.
  • the function of the copy module can also be implemented by the NOC 302, the decoding module 303 or the memory interface 304, which is not limited.
  • the memory interface 304 may also send a second write instruction to the memory interface 305, so that the memory interface 305 can send a second write instruction to the memory 307 according to the second write instruction Write the second data in the second storage space.
  • the second write instruction may include second data, and the memory interface 305 obtains the second data from the second write instruction.
  • the memory interface 304 copies the first data to obtain the second data, and sends the second data to the memory interface 305.
  • the memory interface 304 may also send a second read command to the memory interface 305, so that the memory interface 305 can access the second storage space in the memory 307 according to the second read command. Read the second data.
  • the second read instruction can also be obtained by copying the first read instruction from other functional units in the NOC 302, the decoding module 303, or the memory 306, which is not limited in this application.
  • the decoding module can be arranged between the functional module and the NOC, that is, each functional module is connected to the decoding module, and the decoding module is connected to the NOC.
  • NOC can connect N memory interfaces.
  • the decoding module 303 is provided between the functional module 301 and the NOC302.
  • a decoding module can also be provided in at least one of the functional module, the NOC, and the memory interface.
  • the function module, NOC, and memory interface do not include a decoding module, and at least one of the function module, NOC, and memory interface implements the function of the decoding module, that is, the function module, NOC, and memory interface
  • At least one module has the function of a decoding module.
  • the decoding module 303 is provided in the memory interface 304.
  • the function module 301 also has the function of a decoding module.
  • the memory interface 304 connects the memory 306 and the memory 310.
  • the mutually mirrored spaces may be in different memories in the same memory channel.
  • the function module 301 determines the first memory channel according to the first physical address
  • the decoding module 303 may determine the memory 306 including the first storage space according to the first physical address, and determine the memory including the second storage space according to the second physical address. 310.
  • the memory interface 304 may write the first data to the first storage space contained in the memory 306 according to the first write instruction, or the memory interface 304 may read the first data from the first storage space contained in the memory 306 according to the first read instruction.
  • the memory interface 304 may write the second data to the second storage space contained in the memory 310 according to the second write instruction, or the memory interface 304 may read the second data from the second storage space contained in the memory 310 according to the second read instruction. data.
  • the memory interface 304 may write the second data to the second storage space contained in the memory 307 according to the second write instruction, or the memory interface 304 may read the second data from the second storage space contained in the memory 307 according to the second read instruction. data.
  • the decoding module 303 may also determine the second memory channel according to the second physical address
  • the memory interface 304 may transmit the second write command or the second read command to the memory interface 305
  • the memory interface 305 may determine the second memory channel according to the second physical address.
  • the second write instruction writes the second data to the second storage space included in the memory 307, or the memory interface 305 may read the second data from the second storage space included in the memory 307 according to the second read instruction.
  • the first write instruction or the first read instruction may carry the second physical address.
  • the verification module can be arranged between the decoding module and the memory interface, that is, the verification module is respectively connected to the decoding module and N memory interfaces.
  • the verification module is respectively connected to the decoding module and N memory interfaces.
  • the verification module 308 may be provided between the decoding module 303, the memory interface 304 and the memory interface 305.
  • the verification module 308 is connected to the decoding module 303, the memory interface 304, and the memory interface 305, respectively.
  • the memory interface 304 reads the first data and feeds it back to the verification module 308, and the memory interface 305 reads the second data and feeds it back to the verification module 308, so that the verification module 308 can verify whether the first data and the second data are same.
  • the original memory of the original memory channel in the SOC is multiplexed to back up the original data.
  • the original data is read from the first storage space according to the first physical address
  • the original data is read according to the first physical address.
  • the second physical address reads the backup data from the second storage space to facilitate the verification of the original data and the backup data, and feeds back a verification success response or a verification failure response to the functional module.
  • the hardware logic overhead of the SOC by verifying the original data and backup data, the reliability of the data when the functional module reads the memory is improved, and mirroring protects the memory channel of the memory storing the original data to ensure The correctness of the logic of the memory channel in turn guarantees the requirements for functional safety.
  • the hardware in the SOC automatically checks the data, the abnormality detection is timely and the real-time performance is high.
  • the verification data is decoupled from the specific implementation scheme of the memory channel, and the versatility and adaptability are strong.
  • the functional module reads the data from the memory, the data is fed back to the functional module.
  • the data indicates fuel level information of an autonomous vehicle.
  • FIG. 8 is a data verification method provided by an embodiment of the application. Applied to SOC. For example, it can be applied to the SOC shown in any one of FIGS. 3 and 5 to 7. Assume that the function module is used to realize the function of the copy module. The method includes the following steps.
  • the functional module determines the second physical address according to the first physical address.
  • the first physical address is used to indicate the first storage space.
  • the second physical address is used to indicate the second storage space.
  • the second storage space is a backup space of the first storage space.
  • the functional module sends the first write instruction and the second write instruction to the decoding module.
  • the functional module sends the first write instruction and the second write instruction to the decoding module through the NOC.
  • the first write instruction includes the first physical address.
  • the second write instruction includes a second physical address.
  • the first write instruction is used to instruct to write the first data to the first storage space indicated by the first physical address.
  • the second write instruction is used to instruct to write the second data to the second storage space indicated by the second physical address.
  • the decoding module receives the first write instruction and the second write instruction.
  • the decoding module determines the first memory channel according to the first physical address, and determines the second memory channel according to the second physical address.
  • the first memory channel includes a first memory interface and a first memory, the first memory interface is connected to the first memory, and the first memory includes a first storage space.
  • the second memory channel includes a second memory interface and a second memory, the second memory interface is connected to the second memory, and the second memory includes a second storage space.
  • the decoding module sends a first write instruction to the first memory interface.
  • the decoding module sends a second write instruction to the second memory interface.
  • the first memory interface receives the first write instruction.
  • the first memory interface writes the first data to the first storage space according to the first write instruction.
  • the first write instruction includes first data.
  • the second memory interface receives a second write instruction.
  • the second memory interface writes the second data to the second storage space according to the second write instruction.
  • the second write instruction includes second data.
  • the second memory interface may receive the second data from the first memory interface.
  • the second data is obtained by copying the first data.
  • the function module can also read data from the memory. As shown in Fig. 9, the specific method may further include the following steps.
  • the function module determines the second physical address according to the first physical address.
  • the first physical address is used to indicate the first storage space
  • the second physical address is used to indicate the second storage space
  • the second storage space is a backup space of the first storage space.
  • the functional module sends the first read instruction and the second read instruction to the decoding module.
  • the functional module sends the first read instruction and the second read instruction to the decoding module through the NOC.
  • the first read instruction includes the first physical address.
  • the second read command includes a second physical address.
  • the first read instruction is used to instruct to read the first data stored in the first storage space indicated by the first physical address.
  • the second read instruction is used to instruct to read the second data stored in the second storage space indicated by the second physical address.
  • the decoding module receives the first read instruction and the second read instruction.
  • the decoding module determines the first memory channel according to the first physical address, and determines the second memory channel according to the second physical address.
  • the first memory channel includes a first memory interface and a first memory, the first memory interface is connected to the first memory, and the first memory includes a first storage space.
  • the second memory channel includes a second memory interface and a second memory, the second memory interface is connected to the second memory, and the second memory includes a second storage space.
  • the decoding module sends a first read instruction to the first memory interface.
  • the decoding module sends a second read instruction to the second memory interface.
  • the first memory interface receives the first read instruction.
  • the first memory interface reads the first data from the first storage space according to the first read instruction.
  • the second memory interface receives a second read instruction.
  • the second memory interface reads the second data from the second storage space according to the second read instruction.
  • the verification module verifies whether the first data and the second data are the same.
  • the verification module feeds back a response of successful verification.
  • the second memory interface feeds back the second data to the first memory interface.
  • sequence of steps of the data verification method provided in the embodiments of the present application can be adjusted appropriately.
  • sequence between S805 and S806 can be interchanged
  • sequence between S815 and S816 can be interchanged.
  • Any person skilled in the art can easily think of changes within the technical scope disclosed in the present invention. The methods should all be covered within the protection scope of the present invention, so they will not be repeated here.
  • “at least one” refers to one or more, and “multiple” refers to two or more.
  • “And/or” describes the association relationship of the associated objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, and B exists alone, where A, B can be singular or plural.
  • the character “/” generally indicates that the associated object before and after is an “or” relationship; in the formula of this application, the character “/” indicates that the associated object before and after is a kind of "division" Relationship.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

一种片上系统及数据校验方法,涉及芯片领域,解决了如何在降低SOC(300)的硬件逻辑开销的情况下,保障对内存(306, 307)进行读操作或写操作时数据的可靠性的问题。SOC(300)包括复制模块和校验模块(308, 309)。其中,复制模块根据第一物理地址确定第二物理地址,第一物理地址用于指示第一存储空间,第二物理地址用于指示第二存储空间,第二存储空间为第一存储空间的备份空间,以便于第二存储空间备份存储第一存储空间存储的数据。第一存储空间和第二存储空间均属于同一个内存通道或不同内存通道包含的内存(306, 307)中的存储空间。校验模块(308, 309)校验从第一存储空间读取的第一数据和从第二存储空间读取的第二数据是否相同,若相同,反馈校验成功响应,若不同,反馈校验失败响应。

Description

一种片上系统及数据校验方法 技术领域
本申请实施例涉及芯片领域,尤其涉及一种片上系统及数据校验方法。
背景技术
片上系统(System On Chip,SOC)是一个在芯片上集成多个集成电路的系统,用于执行设置的特定功能。SOC也可以称为芯片级系统。SOC包含硬件系统和在硬件系统上承载的嵌入式软件。示例的,如图1所示,为现有技术提供的一种SOC的结构示意图。所述SOC包含至少一个功能模块、片上网络(Network On Chip,NOC)、N个内存接口(memory interface)和M个内存,N和M均为大于或等于1的整数。每个功能模块通过NOC与N个内存接口连接,每个内存接口连接至少一个内存。其中,功能模块可以是中央处理单元(Central Processing Unit,CPU)、图形处理器(Graphics Processing Unit,GPU)、人工智能(Artificial Intelligence,AI)运算加速器、音频(audio)管理单元、视频(display)管理单元、高速串行计算机扩展总线标准(peripheral component interconnect express,PCIe)设备、以太网(Ethernet)接口设备或通用串行总线(Universal Serial Bus,USB)等。NOC可以是SOC内的通信互联模块,NOC是连接功能模块和内存的高速总线,可实现各功能模块间的高速、高效、低延迟和低功耗的数据通信。内存接口可以是一个内存访问管理模块,用于管理所连接的内存。例如,内存接口可以包括内存控制器(memory controller)和本地代理(home agent)等。
通常,功能模块可以通过NOC访问内存通道,对内存进行读操作或写操作。内存通道包括内存接口和内存。为了保障功能安全(function safety)需求,保障对内存进行读操作或写操作时数据的可靠性,以及内存通道逻辑的正确性。通常,可以采用锁步(lock step)机制校验从内存中读取的数据是否正确。如图2所示,为现有技术提供的另一种SOC的结构示意图。每个内存通道通过校验模块连接一个内存通道,通过校验模块连接的两个内存通道的硬件结构相同,且存储的数据相同。校验模块对从两个内存通道中的内存读取的数据进行校验,确定数据是否正确,通过检查校验结果确定内存通道逻辑的正确性。但是,通过复制内存通道的硬件逻辑,校验复制逻辑输出的结果,硬件逻辑开销较大。
因此,如何在降低SOC的硬件逻辑开销的情况下,保障对内存进行读操作或写操作时数据的可靠性是一个亟待解决的问题。
发明内容
本申请提供一种片上系统及数据校验方法,解决了如何在降低SOC的硬件逻辑开销的情况下,保障对内存进行读操作或写操作时数据的可靠性的问题。
为达到上述目的,本申请采用如下技术方案:
第一方面,提供了SOC,该SOC包括至少一个功能模块、NOC、至少两个内存通道、复制模块和校验模块,每个内存通道包括内存接口和内存,每个内存接口连接 至少一个内存,功能模块用于通过NOC访问内存通道中的内存。其中,复制模块,用于根据第一物理地址确定第二物理地址,第一物理地址用于指示第一存储空间,第二物理地址用于指示第二存储空间,第二存储空间为第一存储空间的备份空间,第一存储空间和第二存储空间均属于同一个内存通道包含的内存中的存储空间,或者,第一存储空间是第一内存通道包含的第一内存的存储空间,第二存储空间是第二内存通道包含的第二内存的存储空间,第一存储空间存储第一数据,第二存储空间存储第二数据,第二数据是复制第一数据得到的,第二内存还存储有其他数据,其他数据为不同于第一内存存储的除第一数据之外的数据;校验模块,用于校验从第一存储空间读取的第一数据和从第二存储空间读取的第二数据是否相同,若第一数据和第二数据相同,反馈校验成功响应,若第一数据和第二数据不同,反馈校验失败响应。可理解的,第一数据可以是指原始数据,第二数据可以是指第一数据的备份数据。相对于通过复制内存通道的硬件逻辑,校验复制逻辑输出的结果,保障内存通道逻辑的正确性和功能安全的需求而言,由于本申请提供的SOC中无硬件逻辑资源复制,复用SOC中原有内存通道的内存备份原始数据,在根据第一物理地址从第一存储空间读取原始数据时,同时根据第二物理地址从第二存储空间读取备份数据,以便于校验原始数据和备份数据,向功能模块反馈校验成功响应或校验失败响应。从而,在降低了SOC的硬件逻辑开销的情况下,通过校验原始数据和备份数据,提高了功能模块对内存进行读操作时数据的可靠性,镜像保护存储原始数据的内存的内存通道,保障内存通道逻辑的正确性,进而保障功能安全的需求。另外,由于SOC中的硬件自动对数据进行校验,异常检测及时,实时性较高。校验数据与内存通道的具体实现方案解耦,通用性和适配性较强。
在一种可能的设计中,所述SOC还包括译码模块。所述译码模块,用于根据第一物理地址确定第一内存通道,第一内存通道包括第一内存接口,第一内存接口与第一内存连接;译码模块,还用于根据第二物理地址确定第二内存通道,第二内存通道包括第二内存接口,第二内存接口与第二内存连接。从而,以便于将读指令路由到正确的内存通道,从内存中读取数据,或者,将写指令路由到正确的内存通道,将数据写入内存。
其中,第一内存接口,用于根据第一读指令从第一存储空间读取第一数据,第一读指令用于指示读取第一物理地址指示的第一存储空间存储的第一数据;第二内存接口,用于根据第二读指令从第二存储空间读取第二数据,第二读指令用于指示读取第二物理地址指示的第二存储空间存储的第二数据。其中,第二读指令可以是SOC中的复制模块、NOC、译码模块或第一内存接口复制第一读指令得到的。
在另一种可能的设计中,第一内存接口包括校验模块,第二内存接口还用于向第一内存接口反馈第二数据。从而,以便于校验模块校验原始数据和备份数据,保障对内存进行读操作或写操作时数据的可靠性。
在另一种可能的设计中,第一内存接口还用于根据第一写指令向第一存储空间写入第一数据,第一写指令用于指示向第一物理地址指示的第一存储空间写入第一数据;第二内存接口还用于根据第二写指令向第二存储空间写入第二数据,第二写指令用于指示向第二物理地址指示的第二存储空间写入第二数据。从而,复用SOC中原有内存 通道的内存备份原始数据,降低了SOC的硬件逻辑开销。
在另一种可能的设计中,第一内存接口还用于向第二内存接口发送第二数据。从而,以便于将第二数据写入第二存储空间。
在另一种可能的设计中,译码模块设置于功能模块内或NOC内;或者,译码模块分别与功能模块和NOC连接;或者,译码模块分别与NOC、第一内存接口和第二内存接口连接。
在另一种可能的设计中,复制模块设置于功能模块内、NOC内、译码模块内、第一内存接口内或第二内存接口内。
在另一种可能的设计中,校验模块设置于内存接口内。
在另一种可能的设计中,不同的功能模块具有不同功能安全等级的功能。
第二方面,提供一种数据校验方法,应用于SOC,该SOC包括至少一个功能模块、NOC、至少两个内存通道、复制模块和校验模块,每个内存通道包括内存接口和内存,每个内存接口连接至少一个内存,功能模块用于通过NOC访问内存通道中的内存。该方法包括:复制模块根据第一物理地址确定第二物理地址,第一物理地址用于指示第一存储空间,第二物理地址用于指示第二存储空间,第二存储空间为第一存储空间的备份空间,第一存储空间和第二存储空间均属于同一个内存通道包含的内存中的存储空间,或者,第一存储空间是第一内存通道包含的第一内存的存储空间,第二存储空间是第二内存通道包含的第二内存的存储空间,第一存储空间存储第一数据,第二存储空间存储第二数据,第二数据是复制第一数据得到的,第二内存还存储有其他数据,其他数据为不同于第一内存存储的除第一数据之外的数据;校验模块校验从第一存储空间读取的第一数据和从第二存储空间读取的第二数据是否相同,若第一数据和第二数据相同,向功能模块反馈校验成功响应,若第一数据和第二数据不同,向功能模块反馈校验失败响应。由于本申请提供的SOC中无硬件逻辑资源复制,复用SOC中原有内存通道的内存备份原始数据,在根据第一物理地址从第一存储空间读取原始数据时,同时根据第二物理地址从第二存储空间读取备份数据,以便于校验原始数据和备份数据,向功能模块反馈校验成功响应或校验失败响应。从而,在降低了SOC的硬件逻辑开销的情况下,通过校验原始数据和备份数据,提高了功能模块对内存进行读操作时数据的可靠性,镜像保护存储原始数据的内存的内存通道,保障内存通道逻辑的正确性,进而保障功能安全的需求。
在一种可能的设计中,SOC还包括译码模块,方法还包括:译码模块根据第一物理地址确定第一内存通道,第一内存通道还包括第一内存接口,第一内存接口与第一内存连接;译码模块根据第二物理地址确定第二内存通道,第二内存通道还包括第二内存接口,第二内存接口与第二内存连接。从而,以便于将读指令路由到正确的内存通道,从内存中读取数据,或者,将写指令路由到正确的内存通道,将数据写入内存。
进一步地,方法还包括:第一内存接口根据第一读指令从第一存储空间读取第一数据,第一读指令用于指示读取第一物理地址指示的第一存储空间存储的第一数据;第二内存接口根据第二读指令从第二存储空间读取第二数据,第二读指令用于指示读取第二物理地址指示的第二存储空间存储的第二数据。
在另一种可能的设计中,第一内存接口包括校验模块,方法还包括:第二内存接 口向第一内存接口反馈第二数据。从而,以便于校验模块校验原始数据和备份数据,保障对内存进行读操作或写操作时数据的可靠性。
在另一种可能的设计中,方法还包括:第一内存接口根据第一写指令向第一存储空间写入第一数据,第一写指令用于指示向第一物理地址指示的第一存储空间写入第一数据;第二内存接口根据第二写指令向第二存储空间写入第二数据,第二写指令用于指示向第二物理地址指示的第二存储空间写入第二数据。从而,复用SOC中原有内存通道的内存备份原始数据,降低了SOC的硬件逻辑开销。
在另一种可能的设计中,方法还包括:第一内存接口向第二内存接口发送第二数据。从而,以便于将第二数据写入第二存储空间。
在另一种可能的设计中,译码模块设置于功能模块内或NOC内;或者,译码模块分别与功能模块和NOC连接;或者,译码模块分别与NOC、第一内存接口和第二内存接口连接。
在另一种可能的设计中,复制模块设置于所述功能模块内、所述NOC内、所述译码模块内、所述第一内存接口内或所述第二内存接口内。
在另一种可能的设计中,校验模块设置于内存接口内。
在另一种可能的设计中,不同的功能模块具有不同功能安全等级的功能。
附图说明
图1为现有技术提供的一种SOC的结构示意图;
图2为现有技术提供的一种SOC的结构示意图;
图3为本申请提供的一种SOC的结构示意图;
图4为本申请提供的一种互为备份关系的存储空间的示意图;
图5为本申请提供的一种SOC的结构示意图;
图6为本申请提供的一种SOC的结构示意图;
图7为本申请提供的一种SOC的结构示意图;
图8为本申请提供的一种数据校验方法的流程图;
图9为本申请提供的一种数据校验方法的流程图。
具体实施方式
本申请说明书和权利要求书及上述附图中的术语“第一”、“第二”和“第三”等是用于区别不同对象,而不是用于限定特定顺序。
在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
通常,SOC可以应用于自动驾驶领域、工业领域和航空领域等可靠性要求高的领域中,SOC作为设备的主要控制单元,可以控制该设备实现不同的功能安全。所谓功能安全是指检测到潜在的危险情况时启动保护或纠正装置,以防止发生危险事件或提供缓解措施以减少危险事件的后果。可理解的,功能安全可以是指通过一种或多种自动保护机制确保人生安全或财产安全免于物理或自然因素而受损的安全机制。比如,功能安全可以防止炉子过热而着火。在用户穿过自动门时,功能安全可以使自动门不 会猛然关闭,避免自动门碰伤用户。在除草机倾翻时,功能安全可以使除草机及时断电,避免除草机着火。在自动驾驶领域,自动驾驶车辆可以在无人干预的情况下独立决策,功能安全可以控制自动驾驶车辆安全行驶,防止自动驾驶车辆错误刹车、引发事故或阻止安全气囊在无意中打开,保障用户的行车安全。例如,当路上有猫突然冲出时,功能安全可以使自动驾驶车辆及时刹车;而如果是一片废纸飘过,则功能安全可以使自动驾驶车辆不会刹车。在自动驾驶车辆发生事故的情况下,功能安全可以使自动驾驶车辆及时打开安全气囊。在拥堵路段,功能安全可以使自动驾驶车辆不会加速。在自动驾驶车辆行驶在高速路上时,功能安全可以使自动驾驶车辆不会突然进入泊车模式。需要说明的是,不同的功能安全具有不同的功能安全等级。比如,国际标准化组织(International Organization for Standardization,ISO)26262中规定了汽车安全完整性等级(Automotive Safety Integrity Level,ASIL)-D、ASIL-C、ASIL-B、ASIL-A和质量管理(Quality Management,QM)。其中,ASIL-D是功能安全等级中最高的等级,ASIL-D、ASIL-C、ASIL-B、ASIL-A和QM依次排序。
随着汽车智能化发展趋势,L3/L4+等级的自动驾驶技术快速发展,而SOC作为自动驾驶车辆的主要控制单元,为了满足功能安全的需求,内存作为SOC系统的重要组件,需同时支持多个功能安全等级的功能模块的读写访问,且需要满足自动驾驶的高性能计算需求,通常需要多个内存通道提供足够的内存带宽和容量,保障各功能安全的需求。内存通道最高需满足ASIL-D等级的功能安全的需求。例如,当路上有人突然冲出时,功能安全需要控制自动驾驶车辆及时刹车,此时,功能模块需要访问内存,从内存中读取及时刹车数据。如果功能模块访问内存失败或者读取的及时刹车数据错误,可能导致发生车祸。
为了解决如何在降低SOC的硬件逻辑开销的情况下,保障对内存进行读操作或写操作时数据的可靠性的问题,本申请实施例提供一种SOC,该SOC包括至少一个功能模块、NOC、至少两个内存通道、复制模块和校验模块,每个内存通道包括内存接口和内存,每个内存接口连接至少一个内存,功能模块用于通过NOC访问内存通道中的内存。其中,复制模块用于根据第一物理地址确定第二物理地址,第一物理地址用于指示第一存储空间,第二物理地址用于指示第二存储空间,第二存储空间为第一存储空间的备份空间,第一存储空间和第二存储空间均属于同一个内存通道包含的内存中的存储空间。可理解的,同一个内存通道包含的内存中的存储空间可以是指同一个内存通道包含的不同内存中的存储空间。或者,第一存储空间和第二存储空间均属于不同内存通道包含的内存中的存储空间。例如,第一存储空间是第一内存通道包含的第一内存的存储空间,第二存储空间是第二内存通道包含的第二内存的存储空间,第一存储空间存储第一数据,第二存储空间存储第二数据,第二数据是复制第一数据得到的,第二内存还存储有其他数据,其他数据为不同于第一内存存储的除第一数据之外的数据;校验模块用于校验从第一存储空间读取的第一数据和从第二存储空间读取的第二数据是否相同,若第一数据和第二数据相同,反馈校验成功响应,若第一数据和第二数据不同,反馈校验失败响应。可理解的,第一数据可以是指原始数据,第二数据可以是指第一数据的备份数据。
相对于通过复制内存通道的硬件逻辑,校验复制逻辑输出的结果,保障内存通道 逻辑的正确性和功能安全的需求而言,由于本申请提供的SOC中无硬件逻辑资源复制,复用SOC中原有内存通道的内存备份原始数据,在根据第一物理地址从第一存储空间读取原始数据时,同时根据第二物理地址从第二存储空间读取备份数据,以便于校验原始数据和备份数据,向功能模块反馈校验成功响应或校验失败响应。从而,在降低了SOC的硬件逻辑开销的情况下,通过校验原始数据和备份数据,提高了功能模块对内存进行读操作时数据的可靠性,镜像保护存储原始数据的内存的内存通道,保障内存通道逻辑的正确性,进而保障功能安全的需求。另外,由于SOC中的硬件自动对数据进行校验,异常检测及时,实时性较高。校验数据与内存通道的具体实现方案解耦,通用性和适配性较强。
可选的,本文所述的“备份”也可以称为镜像。“备份空间”也可以称为镜像空间。
下面对SOC的具体实现方式进行详细阐述。
在第一种可能的设计中,每个功能模块和NOC连接。译码模块可以设置于NOC和内存接口之间。NOC和译码模块连接。译码模块分别与N个内存接口连接。每个内存接口连接至少一个内存。可选的,不同的内存接口连接的内存的个数可以不同。对于每个内存接口而言,该内存接口可以与其他至少一个内存接口连接,所述其他至少一个内存接口连接的内存与该内存接口连接的内存互为镜像空间,互为镜像的存储空间可以是内存中的部分存储空间或全部存储空间,不予限定。一个内存接口和与该内存接口连接的至少一个内存可以称为一个内存通道。校验模块可以设置于内存接口内,即每个内存接口中包含一个校验模块。在一些实施例中,复制模块可以设置于功能模块、NOC、译码模块和内存接口中的至少一个模块。在另一些实施例中,复制模块的功能可以由可以功能模块、NOC、译码模块或内存接口来实现,即功能模块、NOC、译码模块和内存接口中至少一个模块具有复制模块的功能。其中,N为大于或等于1的整数。可选的,N为2的倍数。例如,N的取值可以是2、4、6或8。假设互为镜像空间的内存连接的内存接口是第i内存接口和第j内存接口,i为整数,i∈[1,N],j为整数,j∈[1,N]。第i内存接口可以是指N个内存接口中的任意一个内存接口。第j内存接口可以是指N个内存接口中的任意一个内存接口。若i不等于j,表示第i内存接口和第j内存接口属于不同的内存通道。若i等于j,表示第i内存接口和第j内存接口属于同一个的内存通道。
在这里假设N=2,即SOC包括两个内存接口,每个内存接口连接一个内存。功能模块用于实现复制模块的功能。图3为本申请实施例提供的一种SOC的结构示意图,如图3所示,SOC300包括功能模块301、NOC302、译码模块303、内存接口304、内存接口305、内存306和内存307。其中,功能模块301与NOC302连接。NOC302与译码模块303连接。译码模块303分别与内存接口304和内存接口305连接。内存接口304和内存接口305连接。内存接口304连接内存306。内存接口305连接内存307。内存接口304中设置一个校验模块308。内存接口305中设置一个校验模块309。内存接口304和内存306可以称为第一内存通道。内存接口305和内存307可以称为第二内存通道。
接下来,对功能模块301向内存306或内存307写入数据进行详细阐述。
功能模块301用于生成第一写指令,所述第一写指令用于指示向内存306或内存307写入第一数据。
在本申请实施例中,假设第一写指令用于指示向内存306写入第一数据。可选的,所述第一写指令包括第一物理地址。第一写指令用于指示向第一物理地址指示的第一存储空间写入第一数据。第一存储空间可以是内存306中的部分存储空间或全部存储空间。
功能模块301还用于根据第一物理地址确定第二物理地址。第二物理地址用于指示第二存储空间。第二存储空间为第一存储空间的备份存储空间。互为备份关系的存储空间可以位于同一内存通道的内存。或者,互为备份关系的存储空间可以位于不同的内存通道的内存。例如,若第一存储空间是内存306中的部分存储空间,第二存储空间是内存307中的部分存储空间。若第一存储空间是内存306中的全部存储空间,第二存储空间是内存307中的全部存储空间。互为备份关系也可以称为互为镜像关系。
本申请实施例中,SOC中的硬件(如:功能模块)可以提供配置接口通过访问内存(如:备份寄存器地址空间),可配置一段或多段存储空间作为互为备份空间,互为备份空间包括原始存储空间和备份存储空间。互为备份空间也可以称为互为镜像空间。原始存储空间为硬件运行的程序可访问的物理地址空间。备份存储空间空间为原始存储空间的镜像,缓存与原始存储空间完全相同的数据。备份存储空间在有效的内存的存储空间内预留,但由硬件自动管理,硬件运行的程序不可见。互为镜像空间可以通过配置物理地址段来从内存中划分出来。备份存储空间可以通过起始地址和空间大小来表示,也可以通过起始地址和结束地址来表示。
示例的,如图4所示,假设内存306包括存储空间A和存储空间B’;内存307包括存储空间A’和存储空间B。存储空间A和存储空间B均为原始存储空间(实体(entity)空间)。存储空间A’和存储空间B’为备份(copy)存储空间。存储空间A与存储空间A’互为镜像空间,存储空间B与存储空间B’互为镜像空间。
例如,第一存储空间可以是存储空间A,第二存储空间可以是存储空间A’。又例如,第一存储空间可以是存储空间B,第二存储空间可以是存储空间B’。
在一些实施例中,功能模块301可以根据第一物理地址查询预先配置的存储空间备份关系确定第一物理地址对应的第二物理地址。存储空间备份关系可以是预先配置的。例如,存储空间备份关系可以以表格的形式呈现,即表1呈现了存储空间备份关系。
表1
Figure PCTCN2020073063-appb-000001
由表1可知,第一物理地址指示的存储空间A与第二物理地址指示的存储空间A’互为备份关系。第三物理地址指示的存储空间B与第四物理地址指示的存储空间B’互为备份关系。
需要说明的是,表1只是以表格的形式示意存储空间备份关系在存储设备中的存 储形式,并不是对存储空间备份关系在存储设备中的存储形式的限定,当然,存储空间备份关系在存储设备中的存储形式还可以以其他的形式存储,本申请实施例对此不做限定。
在另一些实施例中,功能模块301可以根据预先的算法根据第一物理地址确定第二物理地址。本申请对功能模块301根据第一物理地址确定第二物理地址的具体实现方式不予限定。
可选的,本申请实施例所述的配置互为镜像空间方法也兼容交织技术,从而保障多内存通道间的带宽均衡,避免发生拥塞的现象。可理解的,由于可以根据单位存储单元划分SOC的所有内存,在SOC的所有内存间尽量均匀配置互为镜像空间,例如,功能模块301依据交织技术确定第一物理地址对应的第二物理地址。
功能模块301还用于生成第二写指令。可选的,所述第二写指令包括第二物理地址。所述第二写指令用于指示向内存307中的第二存储空间写入第二数据。
功能模块301向NOC302发送第一写指令和第二写指令,NOC302向译码模块303转发第一写指令和第二写指令。
译码模块303,用于根据第一物理地址确定第一内存通道,以及根据第二物理地址确定第二内存通道。
由于第一物理地址指示内存306包含的第一存储空间,内存306与内存接口304连接,内存306和内存接口304可以称为第一内存通道,因此,译码模块可以根据第一物理地址确定向第一内存通道内的内存接口304发送第一写指令。
同理,由于第二物理地址指示内存307包含的第二存储空间,内存307与内存接口305连接,内存307和内存接口305可以称为第二内存通道,因此,译码模块可以根据第二物理地址确定向第二内存通道内的内存接口305发送第二写指令。
可选的,译码模块303可以根据第一物理地址确定第一内存接口,并根据第一内存接口确定第一存储空间。译码模块303还可以根据第二物理地址确定第二内存接口,并根据第二内存接口确定第二存储空间。
内存接口304,用于根据第一写指令向内存306中的第一存储空间写入第一数据。
内存接口305,用于根据第二写指令向内存307中的第二存储空间写入第二数据。
在一些实施例中,第一写指令可以包含第一数据,内存接口304可以从第一写指令中获取第一数据。功能模块301复制第一数据得到第二数据,向内存接口305发送的第二写指令可以包含第二数据,内存接口305可以从第二写指令中获取第二数据。
可选的,第二数据可以由内存接口304复制第一数据得到的。内存接口304还用于向内存接口305发送第二数据。
在另一些实施例中,第一写指令可以不包含第一数据。功能模块301向内存接口304发送第一数据,内存接口304接收到第一数据后,复制第一数据得到第二数据,并向内存接口305发送第二数据。可选的,功能模块301可以向内存接口305发送第二数据。
可选的,第二数据也可以由NOC302、译码模块303或内存306中的其他功能单元复制第一数据得到,本申请对此不作限定。
可选的,第二写指令也可以由NOC302、译码模块303或内存306中的其他功能 单元复制第一写指令得到,本申请对此不作限定。
接下来,对功能模块301从内存306读取数据进行详细阐述。
功能模块301还用于生成第一读指令,所述第一读指令用于指示从内存306中读取第一数据。
可选的,所述第一读指令包括第一物理地址。第一读指令用于指示读取第一物理地址指示的内存306中的第一存储空间存储的第一数据。关于第一存储空间的解释可以参考上述阐述,不予赘述。
功能模块301还用于根据第一物理地址确定第二物理地址,第二物理地址用于指示第二存储空间,第二存储空间为第一存储空间的备份存储空间。关于根据第一物理地址确定第二物理地址的具体解释可以参考上述阐述,不予赘述。
功能模块301还用于生成第二读指令。可选的,所述第二读指令包括第二物理地址。所述第二读指令用于指示读取第二物理地址指示的内存307中的第二存储空间存储的第二数据。
功能模块301向NOC302发送第一读指令和第二读指令,NOC302向译码模块303转发第一读指令和第二读指令。
译码模块303,用于根据第一物理地址确定第一内存通道,以及根据第二物理地址确定第二内存通道。
内存接口304,用于根据第一读指令从内存306中的第一存储空间读取第一数据。
内存接口305,用于根据第二读指令从内存307中的第二存储空间读取第二数据。
内存接口305,还用于向内存接口304反馈第二数据。
校验模块308,用于校验第一数据和第二数据是否相同,若第一数据和第二数据相同,向功能模块301反馈校验成功响应,若第一数据和第二数据不同,向功能模块301反馈校验失败响应。例如,可以利用循环冗余校验(Cyclical Redundancy Check,CRC)方式校验第一数据和第二数据是否相同,本申请不予限定。
可选的,若第一数据和第二数据相同,校验模块308还可以向功能模块301反馈第一数据。
示例的,假设第一数据是控制自动驾驶车辆及时刹车的数据,功能模块301可以读取第一数据控制自动驾驶车辆及时刹车。因此,功能模块301先向内存306写入第一数据,同时向内存307写入第二数据。例如,当路上有人突然冲出,功能安全控制自动驾驶车辆及时刹车时,功能模块301访问内存306和内存307,从内存306中读取第一数据,从内存307中读取第二数据。如果校验模块308校验第一数据和第二数据相同,校验模块308向功能模块301反馈第一数据,控制自动驾驶车辆及时刹车,从而避免发生车祸。
本申请实施例是以功能模块301实现复制模块的功能为例进行说明的。当然,复制模块的功能还可以由NOC302、译码模块303或内存接口304来实现,不予限定。
示例的,如果由内存接口304根据第一物理地址确定第二物理地址。由于第二物理地址指示的第二存储空间属于第二内存通道中的内存307,内存接口304还可以向内存接口305发送第二写指令,以便于内存接口305根据第二写指令向内存307中的第二存储空间写入第二数据。第二写指令可以包括第二数据,内存接口305从第二写 指令中的获取第二数据。可选的,内存接口304复制第一数据得到第二数据,向内存接口305发送第二数据。
如果由内存接口304根据第一物理地址确定第二物理地址,内存接口304还可以向内存接口305发送第二读指令,以便于内存接口305根据第二读指令从内存307中的第二存储空间读取第二数据。
可选的,第二读指令也可以由NOC302、译码模块303或内存306中的其他功能单元复制第一读指令得到,本申请对此不作限定。
在第二种可能的设计中,译码模块可以设置于功能模块和NOC之间,即每个功能模块均与译码模块连接,译码模块与NOC连接。NOC可以连接N个内存接口。示例的,如图5所示,译码模块303设置于功能模块301和NOC302之间。其他详细解释可以参考上述第一种可能的设计的阐述,不予赘述。
在第三种可能的设计中,也可以在功能模块、NOC和内存接口的至少一个模块内设置译码模块。或者,也可以理解为,功能模块、NOC和内存接口均不包括译码模块,由功能模块、NOC和内存接口中的至少一个模块实现译码模块的功能,即功能模块、NOC和内存接口中至少一个模块具有译码模块的功能。其他详细解释可以参考上述第一种可能的设计的阐述,不予赘述。
示例的,如图6所示,译码模块303设置于内存接口304内。功能模块301也具有译码模块的功能。内存接口304连接内存306和内存310。在一些实施例中,互为镜像空间可以是同一个内存通道中的不同内存中。例如,功能模块301根据第一物理地址确定第一内存通道,译码模块303可以根据第一物理地址确定包括第一存储空间的内存306,以及根据第二物理地址确定包括第二存储空间的内存310。内存接口304可以根据第一写指令向内存306包含的第一存储空间写入第一数据,或者,内存接口304可以根据第一读指令从内存306包含的第一存储空间读取第一数据。或者,内存接口304可以根据第二写指令向内存310包含的第二存储空间写入第二数据,或者,内存接口304可以根据第二读指令从内存310包含的第二存储空间读取第二数据。
或者,内存接口304可以根据第二写指令向内存307包含的第二存储空间写入第二数据,或者,内存接口304可以根据第二读指令从内存307包含的第二存储空间读取第二数据。
在另一些实施例中,译码模块303还可以根据第二物理地址确定第二内存通道,内存接口304可以将第二写指令或第二读指令传输至内存接口305,内存接口305可以根据第二写指令向内存307包含的第二存储空间写入第二数据,或者,内存接口305可以根据第二读指令从内存307包含的第二存储空间读取第二数据。
可选的,第一写指令或第一读指令可以携带第二物理地址。
在第四种可能的设计中,校验模块可以设置于译码模块和内存接口之间,即校验模块分别与译码模块和N个内存接口连接。其他详细解释可以参考上述第一种可能的设计的阐述,不予赘述。
示例的,如图7所示,校验模块308可以设置于译码模块303、内存接口304和内存接口305之间。校验模块308分别与译码模块303、内存接口304和内存接口305连接。内存接口304读取到第一数据后反馈给校验模块308,内存接口305读取到第 二数据后反馈给校验模块308,以便于校验模块308校验第一数据和第二数据是否相同。
本申请实施例提供的SOC,由于SOC中无硬件逻辑资源复制,复用SOC中原有内存通道的内存备份原始数据,在根据第一物理地址从第一存储空间读取原始数据时,同时根据第二物理地址从第二存储空间读取备份数据,以便于校验原始数据和备份数据,向功能模块反馈校验成功响应或校验失败响应。从而,在降低了SOC的硬件逻辑开销的情况下,通过校验原始数据和备份数据,提高了功能模块对内存进行读操作时数据的可靠性,镜像保护存储原始数据的内存的内存通道,保障内存通道逻辑的正确性,进而保障功能安全的需求。另外,由于SOC中的硬件自动对数据进行校验,异常检测及时,实时性较高。校验数据与内存通道的具体实现方案解耦,通用性和适配性较强。
需要说明的是,如果功能安全的等级较低,可以无需对读取的数据进行校验,功能模块从内存中读取到数据后,将数据反馈给功能模块。例如,数据指示自动驾驶车辆的油量信息。
图8为本申请实施例提供的一种数据校验方法。应用于SOC。例如,可以应用于如图3、图5至图7中任一个所示的SOC。假设功能模块用于实现复制模块的功能。所述方法包括以下步骤。
S801、功能模块根据第一物理地址确定第二物理地址。
第一物理地址用于指示第一存储空间。第二物理地址用于指示第二存储空间。第二存储空间为第一存储空间的备份空间。
S802、功能模块向译码模块发送第一写指令和第二写指令。
在一些实施例中,功能模块通过NOC向译码模块发送第一写指令和第二写指令。第一写指令包括第一物理地址。第二写指令包括第二物理地址。第一写指令用于指示向第一物理地址指示的第一存储空间写入第一数据。第二写指令用于指示向第二物理地址指示的第二存储空间写入第二数据。
S803、译码模块接收第一写指令和第二写指令。
S804、译码模块根据第一物理地址确定第一内存通道,并根据第二物理地址确定第二内存通道。
第一内存通道包括第一内存接口和第一内存,第一内存接口与第一内存连接,第一内存包括第一存储空间。第二内存通道包括第二内存接口和第二内存,第二内存接口与第二内存连接,第二内存包括第二存储空间。
S805、译码模块向第一内存接口发送第一写指令。
S806、译码模块向第二内存接口发送第二写指令。
S807、第一内存接口接收第一写指令。
S808、第一内存接口根据第一写指令向第一存储空间写入第一数据。
可选的,第一写指令包括第一数据。
S809、第二内存接口接收第二写指令。
S810、第二内存接口根据第二写指令向第二存储空间写入第二数据。
可选的,第二写指令包括第二数据。或者,若第二写指令不包括第二数据,第二 内存接口可以接收来自第一内存接口的第二数据。第二数据是复制第一数据得到的。
其中,功能模块向第一存储空间写入第一数据,以及向第二存储空间写入第二数据的详细解释可以参考上述实施例的详述,不予赘述。
进一步,功能模块还可以从内存中读取数据。如图9所示,具体的该方法还可以包括以下步骤。
S811、功能模块根据第一物理地址确定第二物理地址。
第一物理地址用于指示第一存储空间,第二物理地址用于指示第二存储空间,第二存储空间为第一存储空间的备份空间。
S812、功能模块向译码模块发送第一读指令和第二读指令。
在一些实施例中,功能模块通过NOC向译码模块发送第一读指令和第二读指令。第一读指令包括第一物理地址。第二读指令包括第二物理地址。第一读指令用于指示读取第一物理地址指示的第一存储空间存储的第一数据。第二读指令用于指示读取第二物理地址指示的第二存储空间存储的第二数据。
S813、译码模块接收第一读指令和第二读指令。
S814、译码模块根据第一物理地址确定第一内存通道,并根据第二物理地址确定第二内存通道。
第一内存通道包括第一内存接口和第一内存,第一内存接口与第一内存连接,第一内存包括第一存储空间。第二内存通道包括第二内存接口和第二内存,第二内存接口与第二内存连接,第二内存包括第二存储空间。
S815、译码模块向第一内存接口发送第一读指令。
S816、译码模块向第二内存接口发送第二读指令。
S817、第一内存接口接收第一读指令。
S818、第一内存接口根据第一读指令从第一存储空间读取第一数据。
S819、第二内存接口接收第二读指令。
S820、第二内存接口根据第二读指令从第二存储空间读取第二数据。
S821、校验模块校验第一数据和第二数据是否相同。
若第一数据和第二数据相同,执行S822,若第一数据和第二数据不同,执行S823。
S822、校验模块反馈校验成功响应。
S823、校验模块反馈校验失败响应。
可选的,第二内存接口向第一内存接口反馈第二数据。
其中,功能模块从第一存储空间读取第一数据,以及从第二存储空间读取第二数据的详细解释可以参考上述实施例的详述,不予赘述。
需要说明的是,本申请实施例提供的数据校验方法步骤的先后顺序可以进行适当调整。示例的,如S805和S806之间的前后顺序可以互换,S815和S816之间的前后顺序可以互换,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化的方法,都应涵盖在本发明的保护范围之内,因此不再赘述。
在本申请的各个实施例中,如果没有特殊说明以及逻辑冲突,不同的实施例之间的术语和/或描述具有一致性、且可以相互引用,不同的实施例中的技术特征根据其内在的逻辑关系可以组合形成新的实施例。
本申请中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。在本申请的文字描述中,字符“/”,一般表示前后关联对象是一种“或”的关系;在本申请的公式中,字符“/”,表示前后关联对象是一种“相除”的关系。
可以理解的是,在本申请的实施例中涉及的各种数字编号仅为描述方便进行的区分,并不用来限制本申请的实施例的范围。上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定。

Claims (20)

  1. 一种片上系统SOC,其特征在于,所述SOC包括至少一个功能模块、片上网络NOC、至少两个内存通道、复制模块和校验模块,每个内存通道包括内存接口和内存,每个所述内存接口连接至少一个内存,所述功能模块用于通过NOC访问内存通道中的内存,其中,
    所述复制模块,用于根据第一物理地址确定第二物理地址,所述第一物理地址用于指示第一存储空间,所述第二物理地址用于指示第二存储空间,所述第二存储空间为所述第一存储空间的备份空间,所述第一存储空间和所述第二存储空间均属于同一个内存通道包含的内存中的存储空间,或者,所述第一存储空间是第一内存通道包含的第一内存的存储空间,所述第二存储空间是第二内存通道包含的第二内存的存储空间,所述第一存储空间存储第一数据,所述第二存储空间存储第二数据,所述第二数据是复制所述第一数据得到的,所述第二内存还存储有其他数据,所述其他数据为不同于所述第一内存存储的除所述第一数据之外的数据;
    所述校验模块,用于校验从所述第一存储空间读取的所述第一数据和从所述第二存储空间读取的所述第二数据是否相同,若所述第一数据和所述第二数据相同,向所述功能模块反馈校验成功响应,若所述第一数据和所述第二数据不同,向所述功能模块反馈校验失败响应。
  2. 根据权利要求1所述的SOC,其特征在于,所述SOC还包括译码模块,其中,
    所述译码模块,用于根据所述第一物理地址确定所述第一内存通道,所述第一内存通道还包括第一内存接口,所述第一内存接口与所述第一内存连接;
    所述译码模块,还用于根据所述第二物理地址确定所述第二内存通道,所述第二内存通道还包括第二内存接口,所述第二内存接口与所述第二内存连接。
  3. 根据权利要求2所述的SOC,其特征在于,
    所述第一内存接口,用于根据第一读指令从所述第一存储空间读取所述第一数据,所述第一读指令用于指示读取所述第一物理地址指示的第一存储空间存储的第一数据;
    所述第二内存接口,用于根据第二读指令从所述第二存储空间读取所述第二数据,所述第二读指令用于指示读取所述第二物理地址指示的第二存储空间存储的第二数据。
  4. 根据权利要求3所述的SOC,其特征在于,所述第一内存接口包括所述校验模块,
    所述第二内存接口,还用于向所述第一内存接口反馈所述第二数据。
  5. 根据权利要求2-4中任一项所述的SOC,其特征在于,
    所述第一内存接口,还用于根据第一写指令向所述第一存储空间写入所述第一数据,所述第一写指令用于指示向所述第一物理地址指示的第一存储空间写入第一数据;
    所述第二内存接口,还用于根据第二写指令向所述第二存储空间写入所述第二数据,所述第二写指令用于指示向所述第二物理地址指示的第二存储空间写入第二数据。
  6. 根据权利要求5所述的SOC,其特征在于,
    所述第一内存接口,还用于向所述第二内存接口发送所述第二数据。
  7. 根据权利要求2-6中任一项所述的SOC,其特征在于,所述译码模块设置于所述功能模块内或所述NOC内;或者,所述译码模块分别与所述功能模块和所述NOC 连接;或者,所述译码模块分别与所述NOC、所述第一内存接口和所述第二内存接口连接。
  8. 根据权利要求7所述的SOC,其特征在于,所述复制模块设置于所述功能模块内、所述NOC内、所述译码模块内、所述第一内存接口内或所述第二内存接口内。
  9. 根据权利要求8所述的SOC,其特征在于,所述校验模块设置于内存接口内。
  10. 根据权利要求1-9中任一项所述的SOC,其特征在于,不同的功能模块具有不同功能安全等级的功能。
  11. 一种数据校验方法,其特征在于,应用于片上系统SOC,所述SOC包括至少一个功能模块、片上网络NOC、至少两个内存通道、复制模块和校验模块,每个内存通道包括内存接口和内存,每个所述内存接口连接至少一个内存,所述功能模块用于通过NOC访问内存通道中的内存,所述方法包括:
    所述复制模块根据第一物理地址确定第二物理地址,所述第一物理地址用于指示第一存储空间,所述第二物理地址用于指示第二存储空间,所述第二存储空间为所述第一存储空间的备份空间,所述第一存储空间和所述第二存储空间均属于同一个内存通道包含的内存中的存储空间,或者,所述第一存储空间是第一内存通道包含的第一内存的存储空间,所述第二存储空间是第二内存通道包含的第二内存的存储空间,所述第一存储空间存储第一数据,所述第二存储空间存储第二数据,所述第二数据是复制所述第一数据得到的,所述第二内存还存储有其他数据,所述其他数据为不同于所述第一内存存储的除所述第一数据之外的数据;
    所述校验模块校验从所述第一存储空间读取的所述第一数据和从所述第二存储空间读取的所述第二数据是否相同,若所述第一数据和所述第二数据相同,向所述功能模块反馈校验成功响应,若所述第一数据和所述第二数据不同,向所述功能模块反馈校验失败响应。
  12. 根据权利要求11所述的方法,其特征在于,所述SOC还包括译码模块,所述方法还包括:
    所述译码模块根据所述第一物理地址确定所述第一内存通道,所述第一内存通道还包括第一内存接口,所述第一内存接口与所述第一内存连接;
    所述译码模块根据所述第二物理地址确定所述第二内存通道,所述第二内存通道还包括第二内存接口,所述第二内存接口与所述第二内存连接。
  13. 根据权利要求12所述的方法,其特征在于,所述方法还包括:
    所述第一内存接口根据第一读指令从所述第一存储空间读取所述第一数据,所述第一读指令用于指示读取所述第一物理地址指示的第一存储空间存储的第一数据;
    所述第二内存接口根据第二读指令从所述第二存储空间读取所述第二数据,所述第二读指令用于指示读取所述第二物理地址指示的第二存储空间存储的第二数据。
  14. 根据权利要求13所述的方法,其特征在于,所述第一内存接口包括所述校验模块,所述方法还包括:
    所述第二内存接口向所述第一内存接口反馈所述第二数据。
  15. 根据权利要求12-14中任一项所述的方法,其特征在于,所述方法还包括:
    所述第一内存接口根据第一写指令向所述第一存储空间写入所述第一数据,所述 第一写指令用于指示向所述第一物理地址指示的第一存储空间写入第一数据;
    所述第二内存接口根据第二写指令向所述第二存储空间写入所述第二数据,所述第二写指令用于指示向所述第二物理地址指示的第二存储空间写入第二数据。
  16. 根据权利要求15所述的方法,其特征在于,所述方法还包括:
    所述第一内存接口向所述第二内存接口发送所述第二数据。
  17. 根据权利要求12-16中任一项所述的方法,其特征在于,所述译码模块设置于所述功能模块内或所述NOC内;或者,所述译码模块分别与所述功能模块和所述NOC连接;或者,所述译码模块分别与所述NOC、所述第一内存接口和所述第二内存接口连接。
  18. 根据权利要求17所述的方法,其特征在于,所述复制模块设置于所述功能模块内、所述NOC内、所述译码模块内、所述第一内存接口内或所述第二内存接口内。
  19. 根据权利要求18所述的方法,其特征在于,所述校验模块设置于内存接口内。
  20. 根据权利要求11-19中任一项所述的方法,其特征在于,不同的功能模块具有不同功能安全等级的功能。
PCT/CN2020/073063 2020-01-19 2020-01-19 一种片上系统及数据校验方法 WO2021142851A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080093849.1A CN114981782A (zh) 2020-01-19 2020-01-19 一种片上系统及数据校验方法
PCT/CN2020/073063 WO2021142851A1 (zh) 2020-01-19 2020-01-19 一种片上系统及数据校验方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/073063 WO2021142851A1 (zh) 2020-01-19 2020-01-19 一种片上系统及数据校验方法

Publications (1)

Publication Number Publication Date
WO2021142851A1 true WO2021142851A1 (zh) 2021-07-22

Family

ID=76863456

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/073063 WO2021142851A1 (zh) 2020-01-19 2020-01-19 一种片上系统及数据校验方法

Country Status (2)

Country Link
CN (1) CN114981782A (zh)
WO (1) WO2021142851A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101169750A (zh) * 2007-12-10 2008-04-30 杭州华三通信技术有限公司 内存镜像系统、装置和内存镜像方法
US20100205383A1 (en) * 2009-02-12 2010-08-12 International Business Machines Corporation Memory Controller for Improved Read Port Selection in a Memory Mirrored System
CN108664362A (zh) * 2017-03-31 2018-10-16 龙芯中科技术有限公司 内存镜像的处理方法、内存控制器及用户设备

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101169750A (zh) * 2007-12-10 2008-04-30 杭州华三通信技术有限公司 内存镜像系统、装置和内存镜像方法
US20100205383A1 (en) * 2009-02-12 2010-08-12 International Business Machines Corporation Memory Controller for Improved Read Port Selection in a Memory Mirrored System
CN108664362A (zh) * 2017-03-31 2018-10-16 龙芯中科技术有限公司 内存镜像的处理方法、内存控制器及用户设备

Also Published As

Publication number Publication date
CN114981782A (zh) 2022-08-30

Similar Documents

Publication Publication Date Title
US9798556B2 (en) Method, system, and apparatus for dynamic reconfiguration of resources
US7194663B2 (en) Protective bus interface and method
EP1839156B1 (en) Managing multiprocessor operations
US8375184B2 (en) Mirroring data between redundant storage controllers of a storage system
US6112311A (en) Bridge failover system
US7293068B2 (en) Method and system for storing duplicate data
US20040103104A1 (en) Snapshot creating method and apparatus
US20110167189A1 (en) Storage apparatus and its data transfer method
US8171248B2 (en) Storage system controlling method, switch device and storage system
US7861095B2 (en) Data processing apparatus security
US20100049902A1 (en) Storage subsystem and storage system including storage subsystem
JP2000056931A (ja) 格納管理システム
US10565108B2 (en) Write-back cache for storage controller using persistent system memory
WO2015142339A1 (en) Storage system transactions
WO2010097925A1 (ja) 情報処理装置
CN115357926B (zh) 基于SoC芯片的AXI总线协议访问权限控制方法及装置
WO2021142851A1 (zh) 一种片上系统及数据校验方法
JP2004164047A (ja) 記憶システム
JPH0830398A (ja) 光ディスクシステム
US11216390B2 (en) Storage device, memory access control system, and memory access control method
US20190073147A1 (en) Control device, method and non-transitory computer-readable storage medium
WO2022141128A1 (zh) 一种安全隔离装置和方法
CN111338998B (zh) 基于amp系统的flash访问处理方法及装置
US20060106996A1 (en) Updating data shared among systems
US10789168B2 (en) Maintaining multiple cache areas

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20913661

Country of ref document: EP

Kind code of ref document: A1