Processing control device and processor
The use of non-volatile flip-flops with dual banks and a store operation mechanism addresses the challenge of maintaining real-time performance and fault tolerance in processors by enabling continuous operation and reliable data recovery during power outages.
Patent Information
- Application Number
- JP2023069503
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-04-20
- Publication Date
- 2024-10-31
AI Technical Summary
Existing methods for ensuring real-time performance and fault tolerance in processors are hindered by the need to stop system processing for checkpointing, which reduces performance, and the risk of data loss during power outages due to nonvolatile element failures.
A processing control device and processor utilizing non-volatile flip-flops (NVFFs) with dual banks and a store operation mechanism to alternately save and restore data, allowing continuous operation without reboot and maintaining data integrity during power outages.
Enables real-time performance and fault tolerance by allowing uninterrupted processing and reliable data recovery after power outages, ensuring consistent system operation.
Smart Images

Figure 2024155088000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a processing control device and a processor. [Background technology]
[0002] Embedded systems used in automobiles, robots, spacecraft, wearable devices, sensor networks, etc. require real-time processing while observing time constraints, and fault tolerance against power failures, etc. When a power failure occurs, information stored in volatile memory and flip-flops is lost, making it necessary to restart the system.
[0003] In order to improve the fault tolerance of a processor system, a method is known in which information necessary for re-executing a process is periodically saved in main memory at each checkpoint, and when program execution is interrupted due to the occurrence of a fault, the state of the process is restored to the checkpoint and re-executed (see, for example, Patent Document 1).
[0004] A method is known for a microcomputer to save the program counter value and memory contents to non-volatile memory when a power outage occurs, and then restore the saved program counter value and memory contents when the power is restored (see, for example, Patent Document 2).
[0005] A non-volatile processor using a non-volatile flip-flop as a flip-flop is known (for example, see Non-Patent Document 1). [Prior art documents] [Patent documents]
[0006] [Patent Document 1] Japanese Patent Application Publication No. 9-69082 [Patent Document 2] JP 2000-39928 A [Non-patent literature]
[0007] [Non-Patent Document 1] Y. Wang, Y. Liu, S. Li, D. Zhang, B. Zhao, M. Chiang, Y. Yan, B. Sai, and H. Yang, "A 3us wake-up time nonvolatile processor based on ferroelectric flip-flops," 2012 Proceedings of the ESSCIRC (ESSCIRC), pp.149-152, 2012. [Non-Patent Document 2] K. Usami, J. Akaike, S. Akiba, M. Kudo, H. Amano, T. Ikezoe, K. Hiraga, Y. Shuto, and K. Yagami, "Energy efficient write verify and retry scheme for mtj based flip-flop and application," 2018 IEEE 7th Non-Volatile Memory Systems and Applications Symposium (NVMSA), pp.91-98, 2018. [Non-Patent Document 3] A. Kamei, T. Kojima, H. Amano, D. Yokoyama, H. Miyauchi, K. Usami, K. Hiraga, K. Suzuki, and K. Bessho, "Energy saving in a multi-context coarse grained reconfigurable array with non-volatile flip-flops," 2021 IEEE 14th International Symposium on Embedded Multicore / Many-core Systems-on-Chip (MCSoC), pp.273-280, 2021. Summary of the Invention [Problem to be solved by the invention]
[0008] In the method of saving information at each checkpoint, the system processing is stopped while the information at the checkpoint is written to memory, etc. Therefore, the shorter the checkpoint cycle, the more likely it is that processing can be resumed from a point close to the time of the power outage when the system is restored from a power outage, but the shorter the checkpoint cycle, the lower the system processing performance.
[0009] Furthermore, if a power outage or the like occurs while writing information at a checkpoint to the nonvolatile element of a nonvolatile flip-flop, the correct information may not be stored in the nonvolatile element. If this makes it impossible to restore the state at the checkpoint before the power outage, subsequent processing cannot be performed correctly. As a result, the system must be restarted, and real-time and fault tolerance are no longer met.
[0010] In view of the above problems, an object of the present invention is to provide a process control device and a processor that satisfy both real-time characteristics and fault tolerance. [Means for solving the problem]
[0011] According to one aspect, a processing control device is characterized by having a pair of banks each including one or more non-volatile flip-flops, each having a flip-flop that holds information used in processing and a non-volatile element in which the information held by the flip-flop is stored, an information storage control unit that alternately sets the pair of banks to be valid and performs a store operation of storing the information held in the flip-flop of the inactive bank in the corresponding non-volatile element and a restore operation of restoring the information held in the non-volatile element of the active bank to the corresponding flip-flop when a cut-off power supply is restored, and a processing execution unit that executes processing using the information held in the flip-flops of the active banks, which are alternately switched, and resumes processing that was interrupted due to the cut-off of the power supply using the information restored to the flip-flop of the active bank when the power supply is restored. Effect of the Invention
[0012] According to the present invention, it is possible to provide a process control device and a processor that satisfy both real-time characteristics and fault tolerance. [Brief description of the drawings]
[0013] [Figure 1] 1 is a block diagram showing an example of a system equipped with a processor according to an embodiment of the present invention. [Diagram 2] 2 is a block diagram illustrating an example of a non-volatile flip-flop module of FIG. 1. [Diagram 3] A figure showing an example of the configuration of an NVFF unit and an example of the state of the Bank when a checkpoint is being created by the NVFFM. [Figure 4] 11 is a sequence diagram showing an example of an operation in which the NVFFM restores a checkpoint after recovery from a power outage that occurred while a checkpoint was being created. FIG. [Diagram 5] FIG. 1 is a block diagram illustrating an example of a global NVDC. [Figure 6] A block diagram showing an example of a local NVDC. [Figure 7] FIG. 13 is a flow diagram illustrating an example of an SO technique for creating checkpoints. [Figure 8] FIG. 1 is a flow diagram illustrating an example of an OSS technique for creating checkpoints. [Figure 9] FIG. 11 is a flow diagram illustrating an example of a TSS technique for creating checkpoints. [Figure 10] FIG. 1 is a flow diagram illustrating an example of an MSS technique for creating checkpoints. [Figure 11] FIG. 1 is a diagram showing an outline of a chip layout of a non-stop SoC. [Figure 12] 11 is a diagram illustrating an example of the relationship between a checkpoint creation start interval, a restoration start interval, and a checkpoint creation time and a restoration time. [Figure 13] FIG. 13 is a diagram showing the relationship between the checkpoint creation cycle and IPC using the bitcount benchmark. [Figure 14] FIG. 13 is a diagram showing the relationship between the checkpoint creation cycle and IPC using the qsort benchmark. [Figure 15] FIG. 13 is a diagram showing the relationship between the checkpoint creation cycle and energy consumption in the bitcount benchmark. [Figure 16] FIG. 13 is a diagram showing the relationship between the checkpoint creation cycle and energy consumption in the qsort benchmark. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] Hereinafter, an embodiment will be described with reference to the drawings.
[0015] (Block diagram of non-stop SoC) Fig. 1 is a block diagram showing an example of a system equipped with a processor according to an embodiment of the present invention. The system SYS shown in Fig. 1 has a non-stop SoC (System-on-Chip) and a plurality of peripheral devices connected to the non-stop SoC. In Fig. 1, elements shown in thin rectangular frames indicate volatile elements, and elements shown in thick rectangular frames indicate that they include non-volatile elements.
[0016] For example, nonstop SoCs are installed as fault-tolerant embedded real-time systems in automobiles, robots, spacecraft, wearable devices, sensor networks, etc. Since nonstop SoCs do not lose data even when the power supply is temporarily cut off, they can resume the operation that was being performed before the power supply was cut off without performing a restart process after the power supply is restored. Therefore, for example, nonstop SoCs can continue to operate without performing a restart process even in an environment where the power supply is unstable, such as solar power generation, wind power generation, or hydroelectric power generation.
[0017] The non-stop SoC has an NVDC (Non-Volatile Device Controller) top module, a non-stop processor, an SRAM (Static Random Access Memory), a DMAC (Direct Memory Access Controller), an MRAM (Magnetoresistive Random Access Memory), a clock control circuit, a PWN (Pulse Width Modulation) generator, and various I / O interfaces, all of which are interconnected via an internal bus IBUS.
[0018] The NVDC top module, for example, has a global NVDC (Non-Volatile Device Controller) of one channel (CH0), a local NVDC of 31 channels (CH1-CH31), and a NVFFM (Non-Volatile Flip-Flop Module) of one channel (CH1). The NVFFM of CH1 stores control information used in the global NVDC in a non-volatile manner. The NVFFM of CH1 may be placed in the global NVDC. The non-stop processor has eight NVFFMs corresponding to CH2-CH9. The global NVDC and the local NVDC are examples of an information storage control unit. The non-stop processor is an example of a core and a processing execution unit. The MRAM is an example of a non-volatile main memory.
[0019] The global NVDC and local NVDC control the operation of the NVFFM and cause the NVFFM to perform store and restore operations (described later). The global NVDC can simultaneously control multiple NVFFMs in the nonstop SoC. Each local NVDC can control the corresponding NVFFM individually. The non-volatile device controller NVDC can flexibly absorb and control NVFFMs with various configurations and different bit widths by software settings.
[0020] Each NVFFM is controlled by the global NVDC or the NVDC of the corresponding channel. The NVFFM is a register file that has multiple NVFFs (Non-Volatile Flip-Flops) and control logic that controls the creation of checkpoints and the restoration of checkpoints for each NVFF. The configurations of the NVFFM and NVFF are shown in Figures 2 and 3.
[0021] A checkpoint indicates the point, acquisition timing, and acquired data of data before a power outage that is reproduced when recovering from a power outage or other power outage. Creating a checkpoint indicates storing data from a volatile element of the NVFF to a non-volatile element. Restoring a checkpoint indicates restoring data from a non-volatile element of the NVFF to a volatile element. In the following description, a power outage due to a power outage or other power outage is referred to as a power outage.
[0022] In the example shown in Fig. 1, the nonstop SoC has SPI (Serial Peripheral Interface: registered trademark), I2C (Inter-Integrated Circuit: registered trademark), UART (Universal Asynchronous Receiver Transmitter), GPIO (General Purpose Input / Output), and an external bus interface as I / O interfaces. Note that the I / O interfaces mounted on the nonstop SoC are not limited to the example shown in Fig. 1, and are determined according to the peripheral devices mounted on the system SYS.
[0023] The architecture of a nonstop processor is similar to that of a reduced instruction set computer (RISC) processor, and it operates in the same manner as a normal central processing unit (CPU). For this reason, like a CPU, a nonstop processor has a pipeline, a general purpose register (GPR), a floating point register (FPR), an instruction cache (ICache), a data cache (DCache), an instruction TLB (TLB: Translation Lookaside Buffer) (ITLB), a data TLB (DTLB), and a control register. Note that a nonstop processor may have only one or more of the pipeline, the general purpose register (GPR), the floating point register (FPR), the instruction cache (ICache), the data cache (DCache), the ITLB, the DTLB, and the control register.
[0024] The general purpose registers GPR and the floating point registers FPR are examples of a register file. The data cache DCache is an example of a non-volatile data cache. The instruction TLB and the data TLB are examples of a look-aside translation buffer. In the following, the general purpose registers GPR, the floating point registers FPR, the instruction cache ICache, and the data cache DCache are referred to as GPR, FPR, ICache, and DCache, respectively.
[0025] The flip-flops mounted on the pipeline, GPR, FPR, ICache, DCache, ITLB, DTLB, and control register are designed as eight NVFFMs from channel CH2 to channel CH9. In other words, all flip-flops included in all circuit blocks such as the pipelines included in the non-stop processor are NVFFs that can create and restore checkpoints. This allows all information held in the non-stop processor to be held in a non-volatile manner.
[0026] The DCache has a data storage area that holds a portion of the data stored in the MRAM, a status storage area that holds the storage state of the storage area, and a write buffer. For example, the size of the write buffer is about 10 to 20 cache lines of the DCache. The status storage area includes a stored bit that indicates whether the data has been stored in the non-volatile element of the NVFF. In order to minimize the number of writes to the MRAM, the DCache writes data only to the data storage area of the DCache when a store command is executed, does not write data to the MRAM, and sets the status storage area to a dirty state (write-back format).
[0027] Furthermore, when a cache miss occurs with a store command, the DCache reads data from the MRAM and writes the store data to the cache line, but does not write to the MRAM and sets the status storage area to a dirty state (write allocate format). Furthermore, when a write-back occurs, the write-back data is temporarily written to the write buffer, and the data written to the write buffer in the background while the non-stop processor is running is written to the MRAM (write buffer format). These three formats make it possible to maintain data consistency between the MRAM and the DCache even in the event of a power outage.
[0028] When a predetermined amount of write-back data is stored in the write buffer, the DCach requests the local NVDC of the CH6 corresponding to the DCache to create a checkpoint (i.e., to perform a store operation). For example, the predetermined amount is about half the size of the write buffer.
[0029] By providing a write buffer, the frequency of checkpoint creation can be reduced, and write-back data can be written back from the write buffer to the MRAM in bulk. As a result, the power consumption of the nonstop processor can be reduced compared to when a write buffer is not provided.
[0030] The local NVDC of CH6 controls the creation of a checkpoint by storing data held in the NVFF of the data storage area in a non-volatile area corresponding to the data held in the write buffer. Hereinafter, the operation of storing data held in the volatile area of the NVFF in a non-volatile area is also referred to as creating a checkpoint. The DCache sets a stored bit corresponding to the data for which a checkpoint has been created. Then, the DCache writes back to the MRAM the data held in the write buffer for which the stored bit has been set, that is, the data for which a checkpoint has already been created. In other words, the DCache inhibits writing of data to the MRAM until the creation of the checkpoint is completed.
[0031] By writing back only the data for which a checkpoint has been created to the MRAM, data consistency between the MRAM and the DCache can be maintained even in the event of a power outage. In contrast, if a power outage occurs after data for which a checkpoint has not been created is written back to the MRAM, the data in the DCache for which a checkpoint has not been created may be lost. As a result, data consistency between the MRAM and the DCache cannot be maintained.
[0032] While there is free space in the write buffer, the DCache can operate and the nonstop processor can operate as a CPU. On the other hand, if the write buffer becomes full, data cannot be flushed from the DCache, and data cannot be transferred from the MRAM in the event of a cache miss. For this reason, the nonstop processor stops operating until there is free space in the write buffer.
[0033] In order to prevent the degradation of computing performance caused by the nonstop processor stopping, it is necessary to write back data to the MRAM before the write buffer becomes full. Nonstop SoCs implement one of two methods to maintain data consistency using the write buffer without stopping the nonstop processor.
[0034] In the first method, the software executed by the nonstop processor monitors the data capacity of the write buffer, and executes an interrupt process when the capacity that requires the creation of a checkpoint is reached. For example, the interrupt process requests the local NVDC of CH6 corresponding to the DCache to create a checkpoint, and the local NVDC that receives the request creates the checkpoint. This method makes it possible to create checkpoints at the time intended by the programmer.
[0035] In the second technique, the hardware automatically creates a checkpoint when it detects that a data consistency aware checkpoint is required, which can reduce the time required to create a checkpoint compared to the first technique, as the checkpoint can be created without any interruption.
[0036] The SRAM stores work data and other data used in the nonstop SoC. The DMAC, for example, transfers data between two elements built into the nonstop SoC without involving the nonstop processor.
[0037] MRAM is used as the main memory of a nonstop processor and stores in a nonvolatile manner the programs executed by the nonstop processor and the data used by the nonstop processor, etc. By using a high-speed, randomly accessible nonvolatile memory as the main memory, it is possible to eliminate the need to create checkpoints for the data held in the main memory.
[0038] The SPI or I2C is connected to an ADC (Analog-to-Digital Converter) or a DAC (Digital-to-Analog Converter), etc. The UART and GPIO are connected to various I / O devices, respectively. The clock control circuit generates clocks used by various clock synchronous circuits such as flip-flops mounted on the non-stop SoC, and adjusts the clock frequency.
[0039] The PWM generator has a non-volatile PWM input (hereinafter, PWMIN), a non-volatile pulse counter register (hereinafter, PLSCNT), and a volatile PWM output (hereinafter, PWMOUT). For example, PWMIN and PLSCNT each have 2 channels (CH20, CH21 and CH22, CH23) of NVFFM, but the number of channels for each may be 1 or more.
[0040] For example, the PWM generator controls the rotation speed and direction of a motor, such as an AC (Alternating Current) motor or a DC (Direct Current) motor, connected to the non-stop SoC. Although not limited thereto, the motor may be used to control an actuator mounted on the system SYS. When the system SYS is a robot, the actuator may move an arm or wheels of the robot.
[0041] PLSCNT(NVFFM) holds information indicating the number of rotations and the direction of rotation of the motor outputted from an encoder attached to the motor. PWMIN(NVFFM) holds, for example, the pole information of the motor.
[0042] PWMOUT is an IO for motor control that includes a volatile register. PWMOUT holds the motor's rotation speed or direction as control information generated by the PWM generator according to the information such as the rotation speed held in PLSCNT and PWMIN. The PWM generator generates a PWM signal based on the control information held in PWMOUT and outputs the generated PWM signal to the motor.
[0043] By designing PWMIN and PLSCNT using NVFFM, it is possible to prevent the set values of PWMIN and PLSCNT from being lost during a momentary power outage, etc. Therefore, after the power is restored, the PWM generator can quickly restore the control information of PWMOUT, which is used to control the motor's rotation speed, based on the restored values of PWMIN and PLSCNT. As a result, after the power is restored, actuators and other devices connected to the motor can be operated in the same state as before the power was cut off.
[0044] For example, the external bus interface is connected to a ROM (Read Only Memory) or an I / O device arranged outside the non-stop SoC, and controls access to the ROM or the I / O device.
[0045] (NVFFM block diagram) Fig. 2 is a block diagram showing an example of the non-volatile flip-flop module NVFFM in Fig. 1. In Fig. 2 as well, elements shown in thin rectangular frames indicate volatile elements, and elements shown in thick rectangular frames indicate that they include non-volatile elements.
[0046] The NVFFM has a pair of banks, a valid bit, a selector SEL, and control logic. In the following, one of the pair of banks is called Bank0 and the other bank is called Bank1, and when there is no need to distinguish between Bank0 and Bank1, they are called Bank. Bank0 and Bank1 have the same configuration. Bank0 and Bank1 each have an interleave logic and N NVFF units.
[0047] When Bank0 and Bank1 are not creating a checkpoint, input data to the NVFFM is stored in both banks (Bank0 and Bank1). By storing data in both Bank0 and Bank1, the NVFFM can operate normally regardless of which Bank is selected as the active bank. Output data from the NVFFM is output from the Bank selected by the control logic. The control logic controls the operation of the NVFF units in each Bank0 and Bank1 based on instructions from the corresponding local NVDC or global NVDC.
[0048] In Bank0 and Bank1, NVFF units with the same number are assigned corresponding to one bit value input / output to the NVFFM. While one bank is creating or restoring a checkpoint, the NVFFM uses the other bank as a register file. This allows the nonstop processor and PWM generator to continue operating without stopping even while a checkpoint is being created or restored.
[0049] In addition, the Bank in which the checkpoint is being created or restored is prohibited from accepting input data by clock gating, and writing data to the Bank is prohibited. This makes it possible to prevent data held in the NVFF unit in which the checkpoint is being created or restored from being overwritten by input data.
[0050] The NVFFM alternately stores one bit value in the NVFF of Bank0 and the NVFF of Bank1 (NVFF pair), and creates checkpoints alternately in Bank0 and Bank1. This allows the NVFFM to store a normal checkpoint in one bank even if a power outage occurs while creating a checkpoint in the other bank. On the other hand, if the NVFFM has only one bank and creates a checkpoint in one bank, the NVFFM will lose the checkpoint if a power outage occurs while creating the checkpoint.
[0051] The valid bit indicates the Bank that holds the valid checkpoint. For example, a valid bit of 0 indicates that a valid checkpoint is stored in Bank 0, and a valid bit of 1 indicates that a valid checkpoint is stored in Bank 1. Therefore, the NVFFM can refer to the valid bit and restore the checkpoint in the Bank indicated by the value of the valid bit.
[0052] Since the valid bit is restored after recovery from a power outage, the valid bit must be stored in a non-volatile manner using the NVFF. Note that the NVFFM inverts the value of the valid bit after creating a checkpoint in the Bank indicated by the inverted value of the valid bit. The valid bit is an example of a validity information storage unit that holds validity information indicating a valid Bank, and the value of the valid bit is an example of validity information.
[0053] (An example of the configuration of an NVFF unit) 3 is a diagram showing an example of the configuration of an NVFF unit and an example of the state of a Bank when a checkpoint is being created by the NVFFM. Each Bank has N NVFF units (NVFF unit 0 to NVFF unit (N-1)). Each NVFF unit has M nonvolatile flip-flops NVFF (NVFF0 to NVFF (M-1)), each of which includes a flip-flop FF and a magnetic tunnel junction element MTJ. The magnetic tunnel junction element MTJ is an example of a nonvolatile element.
[0054] For example, each NVFF mounted on the NVFF unit has a flip-flop FF and a magnetic tunnel junction element MTJ used as a storage element of MRAM. Hereinafter, the flip-flop FF is also simply referred to as FF, and the magnetic tunnel junction element MTJ is also simply referred to as MTJ. The NVFFM creates a checkpoint by storing (ST) data held in the FF to the MTJ, and restores (RS) data held in the MTJ to the FF to restore the checkpoint.
[0055] NVFFM creates checkpoints alternately in Bank0 and Bank1 based on instructions from the local NVDC or global NVDC. While one bank is creating a checkpoint, the other bank operates as a simple register file that holds data to be used for processing in FFs. This allows NVFFM to operate as an N-register file while hiding the overhead of creating checkpoints.
[0056] In normal operation, one bank operates as a register file and stores input data in FFs in synchronization with the rising edge of the clock, just like a normal flip-flop. In addition, to reduce power consumption, the NVFFM may select only one bank to perform read and write operations. Hereinafter, the selected bank is referred to as the active bank.
[0057] In addition, when the main memory is formed of a resistive random access memory (ReRAM), the NVFF may be formed of a resistive element used in the memory element of the ReRAM. When the main memory is formed of a ferroelectric random access memory (FeRAM), the NVFF may be formed of a ferroelectric capacitor used in the memory element of the FeRAM.
[0058] By forming a NVFF from the memory elements used for the main memory mounted on a non-stop SoC, the main memory and the NVFF can be manufactured using a common manufacturing process, which prevents the manufacturing process of the non-stop SoC from becoming complicated. As a result, it is possible to prevent a decrease in the yield, which is the rate at which non-defective products are produced in the non-stop SoC.
[0059] In the state shown in Fig. 3, NVFF unit 0 in Bank0 has already stored data in each MTJ as the J-1th checkpoint, and each FF holds data for the J+1th checkpoint, which is two steps ahead. The other NVFF units in Bank0, NVFF unit 1 to NVFF unit (N-1), have also stored data in each MTJ as the J-1th checkpoint.
[0060] Meanwhile, NVFF unit 0 of Bank1 is creating a checkpoint and is rewriting the J-2th data already stored in each MTJ with the Jth data stored in each FF. For example, in Bank1, the Jth checkpoint has been stored in the MTJ of NVFF0-NVFF1 in NVFF unit 0, but the Jth checkpoint has not been stored in the MTJ of NVFF2-NVFF(M-1) in NVFF unit 0. Other NVFF units in Bank1, NVFF unit 1-NVFF unit (N-1), may also be updating checkpoints.
[0061] Therefore, if a power outage occurs in the state shown in Figure 3, NVFF unit 0 in Bank 1 will hold an incorrect checkpoint. There is a risk that other NVFF units 1-(N-1) in Bank 1 will also hold an incorrect checkpoint. Meanwhile, NVFF unit 0 in Bank 0 and other NVFF units 1-(N-1) have already stored the J-1th checkpoint in all MTJs.
[0062] Therefore, even if a power outage occurs while updating the checkpoint, the NVFFM can restore the checkpoint using the J-1th data held by NVFF unit 0 of Bank 0. Other NVFFMs, NVFF unit 1-NVFF unit (N-1) and other NVFFMs, can also restore checkpoints in the same way as NVFF unit 0. Therefore, even if a power outage occurs, the non-stop SoC can restore the data of all NVFFMs, and after recovery from the power outage, can quickly resume the operation that was being performed before the power outage and continue processing without rebooting.
[0063] A fault-tolerant real-time system must be able to operate normally despite various faults, such as permanent failure of MTJ elements or failure of store operations. For this reason, the NVFFM may have the functionality of encoding and decoding data using error-correcting code (ECC).
[0064] In this case, even if a permanent failure occurs in the MTJ, the system SYS can be operated normally. For example, by using a (64, 72) Hamming code as the ECC, one-bit errors can be corrected and two-bit errors can be detected. In addition, a NVFFM using VR-NVFF (Non-Patent Document 2) may be designed so that the success or failure of a store operation can be verified.
[0065] 2 and 3 may be included in a processing control device. For example, the processing control device is mounted on various devices such as robots or vehicles that require both real-time capability for executing processing while observing time constraints and fault tolerance against power supply failures, etc., and can control various mechanisms of the various devices. For example, the processing control device has multiple NVFFMs, an information storage control unit that controls switching between banks of each NVFFM, and a processing execution unit that performs data processing or information processing using information such as data stored in the NVFFM.
[0066] The information storage control unit alternately sets a pair of banks of the NVFFM to be valid, and performs a store operation to store information held in each flip-flop of an inactive bank in a non-volatile element such as an MTJ corresponding to each flip-flop. In addition, when power is restored after a power outage, the information storage control unit performs a restore operation to restore information held in each non-volatile element of an active bank to the flip-flop corresponding to each non-volatile element. The control of the NVFFM performed by the information storage control unit is similar to the operation of FIG. 4 described later.
[0067] The processing execution unit executes processing using the information stored in the flip-flops of the valid Bank, and when the power is restored, resumes the processing that was interrupted due to the power cutoff using the information restored to the flip-flops of the valid Bank. For example, the information storage control unit and the processing execution unit may be realized by a controller such as a CPU mounted on the processing control device.
[0068] (Example of restoring a checkpoint when recovering from a power outage) Fig. 4 is a sequence diagram showing an example of an operation in which the NVFFM restores a checkpoint after recovery from a power outage that occurred during the creation of the checkpoint. The operation shown in Fig. 4 is performed in parallel by all NVFFMs mounted on the nonstop SoC based on the control of the local NVDC or the global NVDC.
[0069] For example, a nonstop SoC divides a real-time task with time constraints into multiple subtasks and executes the multiple subtasks alternately using two banks, Bank0 and Bank1. NVFFM creates checkpoints for one bank while a subtask is being executed using the other bank in the background. For example, the creation of the i-th checkpoint is performed in parallel with the execution of the i+1-th subtask, so the creation of the checkpoint can be hidden.
[0070] In Figure 4, checkpoints can be created by software executed by the nonstop SoC when subtasks are completed. When creating checkpoints by software, the software generates an interrupt when it detects that a checkpoint needs to be created. The interrupt process then calls the checkpoint function, which switches banks and creates a checkpoint.
[0071] In the software-controlled checkpointing method, the programmer can set the start timing of the checkpoint and the bank switching timing as desired, but since interrupt processing is required, it may take a long time to complete the checkpointing.
[0072] On the other hand, although it is different from the operation in Fig. 4, it is possible to automatically create checkpoints by hardware. For example, the hardware automatically creates a checkpoint when it detects that it is necessary to create a checkpoint. In the method of creating checkpoints under hardware control, the programmer cannot know when a checkpoint will be created, but it is possible to create checkpoints with a reduced load on the software.
[0073] Each time a subtask is completed, NVFFM creates a checkpoint in the bank used to execute the subtask. Upon completion of the checkpoint creation, NVFFM inverts the valid bit and sets the valid bit to a value indicating the bank where the checkpoint was created.
[0074] For example, before a power outage occurs, the NVFFM starts creating the (i+2)th checkpoint C in Bank0 because the valid bit is 1 when the (i+2)th subtask E is completed using Bank0 (Fig. 4(a)). Also, the (i+3)th subtask E is started in Bank1 because the valid bit is 1 when the (i+2)th subtask E is completed (Fig. 4(b)).
[0075] Due to the occurrence of a power outage, the creation of the (i+2)th checkpoint C and the execution of the (i+3)th subtask E are interrupted (Fig. 4(c)). After recovery from the power outage, the NVFFM first restores the valid bit by restoring its value from the MTJ to the FF. In the example shown in Fig. 4, the restored valid bit is 1 (Fig. 4(d)).
[0076] Next, the MVFFM selects Bank1, which contains the latest checkpoint C, as the target bank for restore based on the value of the valid bit (=1). Bank1 outputs a control signal to each NVFF unit to control the NVFF, and performs restore operation R for each NVFF unit. Then, in Bank1, the latest (i+1)th checkpoint C is restored from the MTJ to the FF, and the checkpoint C of each NVFF is restored (Fig. 4(e)).
[0077] After restoring checkpoint C, the NVFFM may decode the ECC based on the values stored in the FFs of multiple NVFFs in Bank1, which is the bank to be restored. If the NVFFM detects a 1-bit error or a 2-bit error, it generates an interrupt corresponding to the detected error and performs error processing. In FIG. 4, it is assumed that there is no error in the restored checkpoint C.
[0078] The NVFFM selects Bank1, the bank to be restored, as the active bank. This causes each NVFF unit in Bank1 to function as an N-bit register file. The nonstop SoC then resumes the execution of the (i+2)th subtask E, which was completed in Bank0 before the power outage and for which checkpoint C has not yet been created, using Bank1, the active bank (Figure 4(f)).
[0079] As shown in Fig. 4, at least one Bank always has a correct checkpoint C. Therefore, even if a power outage occurs during the creation of checkpoint C, the nonstop SoC can restore the correct checkpoint C and resume processing immediately after recovery from the power outage.
[0080] In Bank1, after the (i+2)th subtask E is completed, the (i+3)th subtask E starts (Fig. 4(g)). While the (i+3)th subtask E is executing, the NVFFM creates the (i+2)th checkpoint C in Bank0, which is indicated by the inverted value of the valid bit (=1) (Fig. 4(h)). After creating the (i+2)th checkpoint C, the NVFFM inverts the valid bit (Fig. 4(i)). After this, the NVFFM executes subtask E alternately in Bank0 and Bank1, and while subtask E is executing in one Bank, it creates checkpoint C in the other Bank.
[0081] An example of creating checkpoint C without using a bank is shown in the brackets in Figure 4. In this case, checkpoint C must be created by stopping the execution of subtask E. Since the creation period of checkpoint C cannot be included in the execution period of subtask E, the creation of checkpoint C reduces the processing performance of subtask E.
[0082] However, when checkpoints are created in multiple NVFFMs, the time it takes for the checkpoint creation to be completed may differ for each NVFFM, and the timing for updating the valid bit may differ for each NVFFM. This may cause the following problems.
[0083] If a power outage occurs during checkpoint creation, a certain number of NVFFMs will restore the checkpoint in Bank 0, and the remaining NVFFMs will restore the checkpoint in Bank 1. This may result in the system not being able to restore the correct checkpoint.
[0084] To prevent the banks that restore the checkpoint from differing, the non-stop SoC can set one of the NVFFMs as the master NVFFM (global bank selection mode). The master NVFFM is an example of a master non-volatile flip-flop module, and the value held in the valid bit of the master NVFFM is an example of global validity information.
[0085] Each NVFFM creates a checkpoint in a bank that is not indicated by the master NVFFM's valid bit, and restores the checkpoint in a bank that is indicated by the master NVFFM's valid bit. In the following, the master NVFFM's valid bit is referred to as the global valid bit.
[0086] The global valid bit is stored in the NVFF because it must be maintained even in the event of a power outage. In the method using the global valid bit, the master NVFFM creates a checkpoint after all NVFFMs other than the master NVFFM have completed creating a checkpoint. The value of the global valid bit is stored in the MTJ from the FF of the NVFF for the global valid bit.
[0087] This ensures that the checkpoint is restored to the same bank by all NVFFMs in the global bank selection mode. As a result, even if a power outage occurs while creating a checkpoint, the checkpoint can be restored correctly across the entire nonstop SoC, and malfunctions of the nonstop SoC can be prevented when recovering from a power outage.
[0088] (Global NVDC block diagram) Figure 5 is a block diagram showing an example of a global NVDC. The global NVDC has an interrupt controller, a volatile control register (NVFFM CH1), a non-volatile control register, and a bus interface, and controls all channels (CH0-CH31) in parallel. The bus interface connects the interrupt controller, the volatile control register, and the non-volatile control register to an internal bus IBUS. Note that in Figure 1, the non-volatile control register is located outside the global NVDC and in the NVDC top module.
[0089] The interrupt controller processes an interrupt signal output when the MRAM detects an error using a Hamming code or the like, or when the MRAM corrects an error, and issues an interrupt request to the non-stop processor.
[0090] The global NVDC starts creating or restoring checkpoints of multiple NVFFMs when a value is stored in a volatile control register by an address map control register set by software or an external control signal (store request, restore request) from an IO device. In addition, the global NVDC can simultaneously output control signals to any of the multiple local NVDCs using information stored in the volatile control register and non-volatile control register in order to control multiple NVFFMs in parallel.
[0091] By storing the control information used in the global NVDC in the NVFFM (CH1), the control information can be stored without being lost even if a power outage occurs. For example, the non-volatile control register stores information indicating how to select a bank and information indicating the checkpoint creation method (SO method, OSS method, TSS method, and MSS method shown in Figures 7 to 10).
[0092] (Block diagram of local NVDC) 6 is a block diagram showing an example of a local NVDC. The local NVDC includes an interrupt controller, a control register, a control logic, and a bus interface. The interrupt controller processes interrupts from the corresponding NVFFM and issues interrupt requests to the nonstop processor.
[0093] Each local NVDC can initiate checkpoint creation or restoration for the corresponding NVFFM via the address map control register. Each local NVDC can set whether to perform ECC encoding and decoding of data stored in the corresponding NVFFM, taking into consideration the trade-off between fault tolerance and power consumption. Each local NVDC can set the checkpoint creation method for the corresponding NVFFM to one of the SO method, OSS method, TSS method, or MSS method shown in Figures 7 to 10.
[0094] As described below, each local NVDC has a function to control the switching time of the NVFF control signal, a unit interleave function, an auto store function, etc. These functions allow each local NVDC to flexibly control the NVFFM in various situations through software settings.
[0095] The method of creating a checkpoint using NVFFM is described below. Stages 1 to 5 show pre-processing for creating a checkpoint. Stages 6 to 10 show the checkpoint creation operation for storing data in each MTJ. Stages 6 to 10 correspond to the MSS method shown in Figure 10. In the OSS method, TSS method, and MSS method, part of the processing from stages 6 to 10 is omitted.
[0096] (First stage) The NVFFM selects the bank indicated by the inverted value of the valid bit as the bank for creating the checkpoint. The selected bank is called the store target bank.
[0097] (Second stage) The NVFFM sends the input data to both Bank0 and Bank1. Each NVFF in Bank0 and Bank1 stores the input data in the FF, just like a typical FF. In other words, writing input data to both Bank0 and Bank1 is permitted. Since both Bank0 and Bank1 hold the latest input data, the NVFFM can operate normally regardless of which Bank is selected as the active bank.
[0098] (Third stage) The NVFFM selects the bank indicated by the value of the valid bit as the active bank. The NVFFM can access banks other than the bank to be stored (active banks) when creating a checkpoint. Therefore, the NVFFM can continue to operate the banks other than the bank to be stored as simple N-bit register files while creating a checkpoint. This allows the NVFFM to create a checkpoint in the background while executing subtasks.
[0099] (Fourth stage) When ECC encoding and decoding are performed, the NVFFM encodes the ECC based on the value of the FF of the NVFF in the store target bank.
[0100] (5th stage) The clock control circuit in Figure 1 gates the clock of the store target bank. Therefore, the value of FF of each NVFF in the store target bank is not changed when the checkpoint is created.
[0101] (6th stage) The NVFFM performs a verify operation on each NVFF in the store target bank. If the FF value and the MTJ value are the same in all NVFFs, the NVFFM does not need to perform a store operation and skips the 7th and 8th stages.
[0102] (7th stage) Each NVFF unit of the store target bank outputs a control signal to the NVFF and performs a store operation to write the FF value to the MTJ.
[0103] (Stage 8) Each NVFF unit of the store target bank performs a verify operation after the store operation. If the MTJ value and the FF value are the same in all NVFFs, the NVFFM proceeds to stage 9. If the MTJ value and the FF value are different in the NVFFs, the NVFFM checks the retry counter for the store operation. If the retry counter value is less than or equal to a preset maximum value, the NVFFM increments the retry counter and returns to stage 7. If the retry counter value exceeds the maximum value, the NVFFM stops creating the checkpoint and generates an interrupt to handle the failure of the store operation.
[0104] (Stage 9) The NVFFM updates the valid bit by inverting its value. The updated valid bit value indicates the bank to be restored. The updated value is written to the FF of the NVFF for the valid bit. If a power outage occurs before the 9th stage, the valid bit value is not stored in the MTJ of the NVFF for the valid bit. However, the NVFFM can perform the checkpoint restoration process using a bank that holds a normal checkpoint in a non-volatile manner.
[0105] (Stage 10) The NVFFM performs a store operation on the NVFF that contains the valid bit. If a power outage occurs in stage 10, the value of the MTJ may become unstable. Therefore, it is not known whether the valid bit will be 0 or 1 when the checkpoint is restored. However, since both Bank0 and Bank1 have normal checkpoints at this point, the NVFFM can perform the correct checkpoint restoration process regardless of whether Bank0 or Bank1 is valid. Through the above 10-stage processing, the NVFFM can maintain a correct checkpoint even if a power outage occurs, while still creating checkpoints in the background.
[0106] (Checkpoint creation method (SO, OSS, TSS, MSS)) Figures 7 to 10 are flow diagrams showing methods for creating checkpoints. NVFFM supports the Store Only (SO) method shown in Figure 7, the One Step Store (OSS) method shown in Figure 8, the Two Step Store (TSS) method shown in Figure 9, and the Multi Step Store (MSS) method shown in Figure 10. The SO method, the OSS method, and the TSS method are existing methods. The MSS method is a method proposed by the present inventors.
[0107] In the SO method shown in Fig. 7, first, in step S10, the NVFFM performs the above-mentioned first to fifth stages as a front end. Next, in step S20, the NVFFM performs a long store operation for a sufficiently long time, and reliably stores data from the FF to the MTJ in one long store operation. Next, in step S30, the NVFFM updates the valid bit by inverting it, and ends the creation of the checkpoint.
[0108] The longer the MTJ store operation time, the more reliably data can be written to the MTJ, but the greater the power consumption.The shorter the MTJ store operation time, the more difficult it is to write data to the MTJ, but the less power consumption.The SO method consumes more power than other checkpoint creation methods because it takes a long time to perform store operations on a large number of NVFFs.
[0109] 8, first, in step S10, the NVFFM performs the first to fifth stages as a front end. Next, in step S12, the NVFFM performs a verify operation to determine whether the MTJ value and the FF value match.
[0110] If the MTJ value and the FF value match, the NVFFM performs step S30 without performing a store operation. If the MTJ value and the FF value do not match, the NVFFM performs a long store operation only on NVFFs whose MTJ value and FF value are different in step S20, and then performs step S30. Then, in step S30, the NVFFM updates the valid bit by inverting it, and ends the creation of the checkpoint. The OSS technique can reduce the number of NVFFs that perform a store operation, thereby reducing power consumption. However, the OSS technique takes a long time to create a checkpoint because it performs a long store operation.
[0111] 9, first, in step S10, the NVFFM performs stages 1 to 5 as a front end. Next, in step S12, the NVFFM performs a verify operation to determine whether the MTJ value and the FF value match.
[0112] If the MTJ value and the FF value match, the NVFFM performs step S30 without performing the short store operation in step S14 and the long store operation in step S20. If the MTJ value and the FF value do not match, the NVFFM performs a short store operation in step S14 only for NVFFs whose MTJ value and FF value are different, and then performs step S16. The short store operation has a shorter store time than the long store operation.
[0113] In step S16, the NVFFM performs a verify operation and determines whether the MTJ value and the FF value match. If the MTJ value and the FF value match, the NVFFM performs step S30 without performing the long store operation of step S20. If the MTJ value and the FF value do not match, the NVFFM performs a long store operation in step S20 only for NVFFs whose MTJ value and FF value are different, and then performs step S30. Then, in step S30, the NVFFM updates the valid bit by inverting it, and ends the creation of the checkpoint.
[0114] In most NVFFs, the data held in the FF can be written to the MTJ by the short store operation in step S14. Therefore, the TSS method can reduce the time required for the store operation by first performing a short store operation, thereby reducing power consumption.
[0115] 10, first, in step S10, the NVFFM performs stages 1 to 5 as a front end. Next, in step S12, the NVFFM performs a verify operation to determine whether the MTJ value and the FF value match.
[0116] If the MTJ value and the FF value match, the NVFFM performs step S30 without performing the short store operation in step S14 and the long store operation in step S20. If the MTJ value and the FF value do not match, the NVFFM performs a short store operation in step S14 only for NVFFs whose MTJ value and FF value are different, and then performs step S16.
[0117] In step S16, the NVFFM performs a verify operation and determines whether the MTJ value and the FF value match. If the MTJ value and the FF value match, the NVFFM performs step S30 without performing the long store operation of step S20. If the MTJ value and the FF value do not match, the NVFFM performs step S17.
[0118] In step S17, the NVFFM determines whether the number of retries for the long store operation is equal to or less than a preset maximum value max. If the number of retries is equal to or less than the maximum value max, the NVFFM increments the retry counter in step S18 and executes step S20. If the number of retries exceeds the maximum value max, the NVFFM aborts the store operation to handle the failure in step S19, and generates an interrupt to force the MSS method to terminate.
[0119] In step S20, a long store operation is performed only on NVFFs whose MTJ value and FF value are different, and then the process returns to step S 16. In step S30, the NVFFM updates the valid bit by inverting it, and the creation of the checkpoint is completed.
[0120] The MSS method can improve fault tolerance by repeating the verify and store operations until the FF values are stored in the MTJ for all NVFFs. In addition, by generating an interrupt when the number of verify operations exceeds the number of retries, it is possible to notify the upper system that the checkpoint could not be created.
[0121] (NVFF store operation time switching) In NVFF, there is a correlation between the store operation time (the time to pass current through the MTJ) during the store operation and the probability that correct data is written to the MTJ. For example, if data cannot be written to the MTJ within the store operation time, a checkpoint cannot be created. In addition, when using a control method that dynamically changes the operating voltage and operating frequency, such as DVFS (Dynamic Voltage and Frequency Scaling), the store operation time changes due to the change in clock frequency, and data may not be written to the MTJ.
[0122] To address such situations, the global NVDC and local NVDC can control the number of clock cycles of a store operation, taking into account the trade-off between the time it takes to create or restore a checkpoint and the probability that the store or restore to the MTJ is successful.
[0123] (Unit interleave function) The fastest way to create or restore a checkpoint is to perform store or restore operations simultaneously on multiple NVFFs. However, the more NVFFs that perform store or restore operations simultaneously, the higher the peak current becomes. To reduce the peak current, each Bank of the NVFFM is divided into NVFF units that contain multiple NVFFs as shown in Figure 3, and a store operation can be performed for each NVFF unit.
[0124] The NVFFM has a unit interleave function that can change the number of clock cycles Cs from the start of a store operation of one NVFF unit to the start of a store operation of the next NVFF unit. Similarly, the NVFFM has a unit interleave function that can change the number of clock cycles Cr from the start of a restore operation of one NVFF unit to the start of a restore operation of the next NVFF unit. The unit interleave function can shift the timing of starting a store operation for each NVFF unit including a predetermined number of non-volatile flip-flops, and can change the store operation time or restore operation time and peak current.
[0125] As the number of clock cycles Cs or Cr is increased, the time to create or restore a checkpoint increases, but the peak current is reduced because the maximum number of NVFFs simultaneously performing a store operation or restore operation decreases. As the number of clock cycles Cs or Cr is decreased, the time to create or restore a checkpoint decreases, but the peak current is increased because the maximum number of NVFFs simultaneously performing a store operation or restore operation increases.
[0126] The number of clock cycles Cs and Cr can be set for the global NVDC and the local NVDC by a unit interleave function, taking into consideration the trade-off between the time to create or restore a checkpoint and the peak current. This allows the time to create or restore a checkpoint and the peak current to be appropriately set.
[0127] (Auto store function) When the address map control register is used to cause the local NVDC or global NVDC to initiate a checkpoint, software intervention is required for each checkpoint, which may result in a decrease in performance of the nonstop processor if checkpoints are taken too frequently.
[0128] To avoid performance degradation due to checkpoint creation, the local NVDC and global NVDC have an autostore function. The autostore function automatically creates checkpoints periodically using only hardware, so the processing performance of the nonstop processor does not decrease. For example, the autostore function creates a checkpoint every time the timer value of a dedicated hardware timer reaches a preset value.
[0129] (Implementation of non-stop SoC) Figure 11 is a diagram showing an overview of the chip layout of the non-stop SoC. The non-stop SoC was designed using NVFF provided as a standard cell by SONY and MRAM of SONY's 40 nm process. The NVFF is placed in the shaded area in Figure 11. The MRAM is placed in the lower right part of Figure 11 and is wired densely to supply sufficient power.
[0130] Since a non-stop SoC uses a large number of NVFFs (approximately 160k), some of the NVFFs may not work. However, by equipping the NVFFM and NVDC with the error correction and error detection functions described above, a non-stop SoC can operate normally even if it contains a non-working NVFF. As a result, the yield of the non-stop SoC can be improved and the manufacturing cost can be reduced.
[0131] (Non-stop SoC evaluation) We performed an evaluation of the nonstop SoC through RTL simulation using the Synopsys VCS simulator, emulating a power-off state in which all reset signals are set to enabled and all NVFFs are assigned undefined values.
[0132] The parameters used in the evaluation are shown in Tables 1 to 3.
[0133] [Table 1]
[0134] [Table 2]
[0135] [Table 3]
[0136] The pass rate (PR) shown in Table 3 L , P.R. S , P.R. VS ) indicates the probability that the value of the FF is correctly written to the MTJ in the NVFF. In addition, in Non-Patent Document 3, which describes an actual chip designed using the VR-NVFF, the relationship between the store operation time and the pass rate is evaluated.
[0137] The long store operation time (T L ), Short store operation time (T S ), Very short operation time (T VS ) was determined by considering the corresponding pass rate. L ) is the pass rate (PR L The short store operation time (T S ) is the pass rate of short store operations (PR S ) is set to 40ns under the condition that the average operating time (T VS ) is the pass rate (PR) of the very short store operation VS ) was set to 20 ns under the condition that the average
[0138] In the following, the first store operation time is T VS The creation of a checkpoint using the TSS technique where the first store operation time is T SThe creation of a checkpoint using the TSS technique where the first store operation time is T VS The creation of a checkpoint using the MSS technique where the first store operation time is T S Creating a checkpoint using the MSS technique is called an MSS-S checkpoint.
[0139] Since the verify operation is a restore operation that returns the value of the MTJ to the verify circuit, the verify operation time in Table 3 is assumed to be the same as the restore operation time, and the verify energy in Table 3 is assumed to be the same as the restore energy.
[0140] (Trade-off between checkpoint creation time, recovery time and peak current) 12 is a diagram showing an example of the relationship between the checkpoint creation start interval and the restoration start interval and the checkpoint creation time and the restoration time. The number of NVFFs operating simultaneously is approximately proportional to the peak current.
[0141] In Fig. 12, the relationship between the MSS-S checkpoint creation start interval and creation time, and the relationship between the checkpoint restoration start interval and restoration time are calculated using the unit interleave function. As described above, the unit interleave function makes it possible to change the number of clock cycles from the start of a store operation of one NVFF unit to the start of a store operation of the next NVFF unit in each of the checkpoint creation operation and restoration operation.
[0142] (Create a checkpoint) For example, in the evaluation of the creation of the MSS-S checkpoint, the first short store operation time in step S14 of FIG. S (40ns), and the second and subsequent long store operation times in step S20 are set to T L (140ns).
[0143] When creating checkpoints, as the creation start interval increases, the time it takes to create a checkpoint increases (proportional relationship), but the number of NVFFs operating simultaneously (hereinafter referred to as the number of simultaneous operations) decreases (inversely proportional relationship). When the creation start interval is within the range of 14 clock cycles or less, the number of simultaneous operations decreases rapidly as the creation start interval increases.
[0144] When the creation start interval is between 15 and 42 clock cycles, the number of concurrent operations decreases slightly as the creation start interval increases. When the creation start interval is 43 or more clock cycles, the number of concurrent operations remains constant. For example, the checkpoint creation time when the number of concurrent operations was minimized was 27.48 μs.
[0145] When the creation start interval was 0, the creation time was 1.86 μs. When the creation start interval was 0, all NVFF units started creating checkpoints at the same time, so the checkpoint creation time was equal to the checkpoint creation time of a single NVFF unit.
[0146] The creation time until all checkpoints are created and the restoration time until all checkpoints are restored increase as the creation start interval and restoration start interval increase. Therefore, in creating and restoring checkpoints, the more NVFFs in which data is stored simultaneously, the shorter the time until the operation is completed and the larger the peak current becomes.
[0147] Nonstop processors need to support a variety of applications. For this reason, it is necessary to consider whether to increase the peak current and shorten the time to complete the operation, or to increase the time to complete the operation and reduce the peak current. Nonstop SoCs can control the trade-off between the time it takes to create and restore a checkpoint and the peak current by using the unit interleaving function.
[0148] (Checkpoint restore) In the evaluation of checkpoint restoration, the restoration operation time is TR (50ns). In the case of checkpoint restoration, as the restoration start interval increases, the checkpoint restoration time increases (proportional relationship), but the number of simultaneous NVFF operations decreases (inversely proportional relationship).
[0149] When the recovery start interval is 5 clock cycles or less, the number of concurrent operations decreases rapidly as the recovery start interval increases. When the recovery start interval is 6 clock cycles or more, the number of concurrent operations remains constant even if the recovery start interval increases. For example, the checkpoint recovery time when the number of concurrent operations was minimized was 4.99 μs.
[0150] When the restoration start interval was 0, the restoration time was 1.94 μs. When the restoration start interval was 0, all units started checkpoint restoration at the same time, so the checkpoint restoration time was equal to the checkpoint restoration time of a single NVFF unit.
[0151] (Benchmark results) 13 to 16 are diagrams showing examples of results of benchmarks that periodically create checkpoints. The inventors performed a number of types of benchmarks that periodically create checkpoints, and evaluated the time required to create checkpoints by measuring the IPC (Instruction Per Clock Cycle) of each benchmark.
[0152] In each figure, the symbol W / O cc indicates an evaluation without checking data consistency, where data is written back to the MRAM without looking at the stored bit. The symbol W / cc indicates an evaluation with a data consistency check, where only data for which a checkpoint has already been created and the stored bit has been set is written back to the MRAM. Additionally, baseline indicates the benchmark evaluation result.
[0153] 13 and 14 show the relationship between the checkpointing cycle and IPC in the bitcount benchmark and the qsort benchmark, respectively.
[0154] Evaluations without data consistency checks (W / O cc) show that the IPC for each benchmark is the same as the baseline IPC, regardless of the checkpoint frequency and checkpointing technique, i.e., the IPC does not change even if the checkpoint frequency is reduced.
[0155] In the evaluation with data consistency check (W / cc), the IPC fluctuates in the qsort benchmark due to the condition imposed on the write from the write buffer to the MRAM. On the other hand, the bitcount benchmark shows that the IPC of all checkpoint creation periods and all checkpoint methods is the same as the baseline IPC.
[0156] The following are some of the possible causes of IPC fluctuations. For example, if the frequency with which DCache acquires the bus decreases, the frequency with which ICache acquires the bus increases relatively, causing an increase in IPC. Also, if the write buffer becomes full more frequently, the frequency with which the nonstop processor stalls increases, causing a decrease in IPC.
[0157] 15 and 16 are diagrams showing the relationship between the checkpointing cycle and energy consumption in the bitcount benchmark and the qsort benchmark, respectively.
[0158] In the bitcount benchmark, there is no difference in energy consumption between the evaluation without data consistency check (W / O cc) and the evaluation with data consistency check (W / cc) for each checkpoint method. In the qsort benchmark, when the checkpoint creation period is 1 ms, the evaluation with data consistency check (W / cc) consumes more energy than the evaluation without data consistency check (W / O cc). For other creation periods, there is no difference in energy consumption between the evaluation without data consistency check (W / O cc) and the evaluation with data consistency check (W / cc).
[0159] (Energy consumption of checkpoint restoration) In the checkpoint restoration, the valid bit is restored, the bank in which the checkpoint is valid is selected, and the NVFF restore operation is performed. Therefore, the energy consumption of the checkpoint restoration E R is the total number of NVFFs that perform the restore operation, N R and the restore energy, the calculation is performed according to formula (1). In formula (1), the sign * indicates multiplication.
[0160] E R =N R *Restore Energy...(1) Each parameter in equation (1) and the total energy Er during checkpoint restoration calculated using equation (1) are shown in Table 4. In the non-stop SoC in Figure 1, the total energy Er during checkpoint restoration is approximately 180 nJ.
[0161] [Table 4]
[0162] (Effects of the embodiment) By storing a single bit value alternately in Bank0 and Bank1 and creating checkpoints alternately in Bank0 and Bank1, even if a power outage occurs while creating a checkpoint in one Bank, the checkpoint can be stored in the other Bank without being lost.
[0163] The NVFFM alternately creates checkpoints in Bank0 and Bank1 based on instructions from the local NVDC or global NVDC. While one bank is creating a checkpoint, the nonstop processor can use the other bank as a simple register file. This allows checkpoints to be created in the background of the system SYS processing without affecting the processing of the system SYS. As a result, a processing control device and a processor that satisfy both real-time and fault tolerance can be provided.
[0164] By providing a valid bit in the NVFFM to indicate the bank that holds a valid checkpoint, the NVFFM can refer to the valid bit and restore the checkpoint to the bank indicated by the value of the valid bit.
[0165] By creating and restoring checkpoints for all NVFFMs using the valid bit of the master NVFFM, one of multiple NVFFMs, as the global valid bit, it is possible to guarantee that checkpoints are restored in the same Bank by all NVFFMs. As a result, even if a power outage occurs while creating a checkpoint, the checkpoint can be restored correctly across the entire nonstop SoC, and it is possible to prevent the nonstop SoC from malfunctioning when recovering from a power outage.
[0166] The unit interleave function makes it possible to set the number of clock cycles Cs, which is the start interval of the store operation of the NVFF unit, and the number of clock cycles Cr, which is the start interval of the store operation of the NVFF unit. This makes it possible to appropriately set the checkpoint creation time or restoration time and the peak current, taking into account the trade-off between the checkpoint creation time or restoration time and the peak current.
[0167] By preventing data stored in the DCache from being written to the MRAM until the checkpoint creation is complete, data consistency can be maintained between the MRAM and the DCache even in the event of a power outage.
[0168] By creating a checkpoint based on a predetermined amount of write-back data being held in the write buffer, the frequency of creating checkpoints can be reduced, and the power consumption of the nonstop processor can be reduced. Also, by collectively writing back the write-back data for which a checkpoint has been created to the MRAM, the power consumption of the nonstop processor can be reduced.
[0169] All flip-flops in all circuit blocks, such as the pipeline, GPR, FPR, ICache, DCache, ITLB, DTLB, and control registers, included in the nonstop processor are formed by NVFFs that can create and restore checkpoints. In addition, data in each NVFF is stored alternately in one Bank0 and Bank1. This allows all information stored in the nonstop processor to be stored in a nonvolatile manner even if a power outage occurs.
[0170] By creating checkpoints in accordance with the execution of subtasks by software executed by the non-stop SoC, checkpoints can be created at times intended by the programmer.
[0171] The Bank in which the checkpoint is being created or restored is prohibited from accepting input data by clock gating, and data writing to the Bank is prohibited. This makes it possible to prevent data held in the NVFF unit in which the checkpoint is being created or restored from being overwritten by input data.
[0172] Although the present invention has been described above based on the embodiments, the present invention is not limited to the requirements shown in the above embodiments. These points can be changed without departing from the spirit of the present invention, and can be appropriately determined according to the application form. [Explanation of symbols]
[0173] Bank0, Bank1 Bank DCache Data Cache FF Flip-Flop IBUS Internal Bus ICache Instruction Cache NVDC Non-Volatile Device Controller NVFFM Non-Volatile Flip-Flop Module PLSCNT Pulse counter register PWM input PWMOUT PWM output SYS system
Claims
1. a pair of banks each including one or more non-volatile flip-flops, each bank having a flip-flop for holding information used in processing and a non-volatile element in which the information held by the flip-flop is stored; an information storage control unit that alternately sets the pair of banks to be valid and executes a store operation for storing the information held in the flip-flop of the inactive bank in the corresponding non-volatile element, and a restore operation for restoring the information held in the non-volatile element of the active bank to the corresponding flip-flop when a power supply that has been cut off is restored; a processing execution unit that executes processing using the information stored in the flip-flops of the valid bank that are alternately switched over, and resumes processing that was interrupted due to the interruption of the power supply using the information restored to the flip-flops of the valid bank when the power supply is restored. A processing control device comprising:
2. a validity information holding unit for holding validity information indicating the valid bank in a non-volatile manner; The information storage control unit rewrites the validity information held by a validity information holding unit based on the completion of the store operation of the invalid bank, thereby switching the invalid bank to a valid bank. The processing control device according to claim 1 .
3. A core having a plurality of non-volatile flip-flop modules each having a pair of banks each including a plurality of non-volatile flip-flops for alternately holding information used in processing; an information storage control unit that controls the information stored in each of the nonvolatile flip-flop modules; Each of the plurality of non-volatile flip-flops includes a flip-flop that holds the information, and a non-volatile element in which the information held by the flip-flop is stored; the information storage control unit alternately sets the pair of banks of the plurality of nonvolatile flip-flop modules to be valid, and executes a store operation for storing the information held in the flip-flop of the inactive bank in the corresponding nonvolatile element, and a restore operation for restoring the information held in the nonvolatile element of the active bank to the corresponding flip-flop when a power supply that has been cut off is restored; The core executes processing using the information stored in the flip-flops of the valid bank that are alternately switched over, and resumes processing that was interrupted due to the interruption of the power supply using the information restored to the flip-flops of the valid bank when the power supply is restored. A processor characterized by:
4. each of the plurality of non-volatile flip-flop modules includes a validity information storage unit that stores validity information indicating a valid bank in a non-volatile manner; The information storage control unit rewrites the validity information held by a validity information holding unit based on the completion of the store operation of the invalid bank, thereby switching the invalid bank to a valid bank. The processor of claim 3 .
5. the information storage control unit holds global validity information in the validity information holding unit of a master non-volatile flip-flop module which is one of the plurality of non-volatile flip-flop modules, performs the restore operation of the bank of the plurality of non-volatile flip-flop modules indicated by the held global validity information, and performs the store operation of the bank of the plurality of non-volatile flip-flop modules not indicated by the held global validity information. The processor of claim 4 .
6. the nonvolatile flip-flop module has an interleave function for shifting the timing of starting the store operation for each of a predetermined number of nonvolatile flip-flops; The amount of deviation in timing is changeable. A processor according to any one of claims 3 to 5, characterized in that
7. A non-volatile main memory for storing data used by the core; a non-volatile data cache provided in the core and configured to hold a portion of data held in the non-volatile main memory in the non-volatile flip-flop module; The non-volatile data cache writes back to the non-volatile main memory the data for which the store operation has been completed in the non-volatile data cache. A processor according to any one of claims 3 to 5, characterized in that
8. The nonvolatile data cache has a write buffer for holding write-back data to be written back to the nonvolatile main memory, and writes back to the nonvolatile main memory, among the write-back data held in the write buffer, the write-back data for which the store operation has been completed. The processor of claim 7 .
9. the non-volatile data cache holds the write-back data for which the store operation has not been completed in the write buffer, and when a predetermined amount of the write-back data is held in the write buffer, requests the information storage control unit to perform the store operation of the predetermined amount of the write-back data, and writes back the write-back data for which the store operation has been completed to the non-volatile main memory. The processor of claim 8 .
10. the core having one or more of a pipeline including the non-volatile flip-flop module, a register file, an instruction cache, a data cache, and a look-aside buffer, each of which holds information used in the processing; A processor according to any one of claims 3 to 5, characterized in that
11. The timing of switching the bank by the information storage control unit and the timing of starting the store operation can be set by software. A processor according to any one of claims 3 to 5, characterized in that
12. When writing the information to the nonvolatile flip-flop, each of the plurality of nonvolatile flip-flop modules permits writing of the information to both of the flip-flops of the pair of banks except during execution of the store operation or the restore operation, and prohibits writing of the information to the bank during execution of the store operation or the restore operation. A processor according to any one of claims 3 to 5, characterized in that
Citation Information
Patent Citations
Multiprocessor system
JP1997069082A
Microcomputer
JP2000039928A
