Control device and program storage method

By determining storage locations based on usage status and reserving space for future updates, the control device optimizes program storage in ECUs, addressing fragmentation issues and maintaining efficient program execution.

WO2026099970A1PCT designated stage Publication Date: 2026-05-15NISSAN MOTOR CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
NISSAN MOTOR CO LTD
Filing Date
2024-11-07
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

The fragmentation of program storage areas in ECUs leads to inefficient storage and performance degradation due to fragmented storage areas with small unused spaces, preventing the securement of large continuous unused areas, which affects the execution time of programs and restricts the storage of certain programs.

Method used

A control device and program storage method that determines the storage location of target programs based on the usage status of the program storage area, ensuring contiguous storage with reserved space for future updates, thereby delaying fragmentation and optimizing storage efficiency.

Benefits of technology

This approach effectively delays the progression of program storage fragmentation by optimizing storage locations and reserving space for future updates, ensuring efficient program execution and preventing the need for program division or relocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2024039535_15052026_PF_FP_ABST
    Figure JP2024039535_15052026_PF_FP_ABST
Patent Text Reader

Abstract

An ECU (100) is a vehicle (10) control device that executes each program stored in a program storage area (141) to realize each corresponding function. A program acquisition unit (110) acquires a target program that is an update program or a program to be newly added. A storage position determination unit (120) determines a target program storage position, which is a position in the program storage area (141) storing the target program, on the basis of usage status of the program storage area (141). A program storage unit (130) stores the target program at the target program storage position determined by the storage position determination unit (120).
Need to check novelty before this filing date? Find Prior Art

Description

Control Device and Program Storage Method

[0001] The present invention relates to a control device and a program storage method.

[0002] A vehicle is equipped with an ECU (Electronic Control Unit) which is a control device. Each function of the ECU is realized by a processor included in the ECU executing a software program (hereinafter referred to as a program) stored in a program storage area. Patent Document 1 discloses a technique of downloading an update program from a server and updating the program of the ECU mounted on the vehicle.

[0003] Japanese Patent Laid-Open No. 2017-149323

[0004] When updates and additions of each program stored in the program storage area of the ECU are repeated, the program storage area becomes fragmented such that the used areas are arranged discontinuously with a small unused area in between, and a large continuous unused area cannot be secured. In a fragmented program storage area, since a sufficiently large continuous unused area cannot be secured, newly added programs are often stored by being divided into a plurality of unused areas. Programs stored in a divided manner may cause a decrease in the performance of the ECU, such as taking time for scanning when the processor executes them. Also, there are programs for which divided storage is not allowed.

[0005] The present invention has been made in view of the above circumstances, and an object thereof is to provide a control device and a program storage method capable of delaying the progress of fragmentation of the program storage area.

[0006] To achieve the above objective, the control device according to the present invention is a control device that realizes corresponding functions by executing each program stored in the program storage area, and comprises a program acquisition unit, a storage location determination unit, and a program storage unit. The program acquisition unit acquires a target program, which is an update program or a newly added program. The storage location determination unit determines the target program storage location, which is the location within the program storage area where the target program is stored, based on the usage status of the program storage area. The program storage unit stores the target program in the target program storage location determined by the storage location determination unit.

[0007] This invention can slow down the progression of program storage fragmentation by determining the location of the target program within the program storage area based on the usage status of the program storage area.

[0008] This is a block diagram of a system equipped with an ECU according to an embodiment of the present invention. This is a hardware configuration diagram of an ECU according to an embodiment of the present invention. This is a flowchart of the program storage process according to an embodiment of the present invention. This is a diagram (1) showing an example of the configuration of the program storage area. This is a diagram (2) showing an example of the configuration of the program storage area. This is a diagram (3) showing an example of the configuration of the program storage area. This is a diagram showing an example of programs with mutually exclusive functions sharing a program storage area.

[0009] Hereinafter, an ECU 100 according to an embodiment of the present invention will be described with reference to the drawings. In each drawing, the same or equivalent parts are denoted by the same reference numerals.

[0010] As shown in Figure 1, the ECU 100 according to an embodiment of the present invention is mounted on a vehicle 10. The ECU 100 is a vehicle control device for driver assistance that has multiple functions to assist in driving the vehicle 10. For example, the ECU 100 has functions to assist in driving, such as emergency braking (FEB), rear emergency braking (RAEB), lane departure prevention (LDP), rear side collision prevention (BSI), autonomous driving (AD), parking assistance (APA), preceding vehicle departure notification (LCDN), and exit safety assistance (OSE). These functions of the ECU 100 are independent of each other, and a program for realizing each function is stored in the program storage area 141. The ECU 100 controls in-vehicle components such as the engine, brakes, steering, and car navigation system by executing each program stored in the program storage area 141. In this way, the ECU 100 realizes each of the driver assistance functions.

[0011] Furthermore, the ECU 100 is connected to the data center 30 wirelessly via the communication device 20, enabling communication. This allows the ECU 100 to obtain update programs from the data center 30 via OTA (Over The Air) and update each program stored in the program storage area 141 to the latest version. The ECU 100 can also obtain new programs from the data center 30 via OTA (Over The Air) and store (install) them in the program storage area 141.

[0012] Next, the hardware configuration of the ECU 100 will be described. The ECU 100 is, for example, a microcomputer. As shown in Figure 2, the ECU 100 comprises a processor 11, RAM (Random Access Memory) 12, ROM (Read Only Memory) 13, flash memory 14, and a communication interface (indicated as communication I / F in the figure) 15, all connected to each other via a bus 16.

[0013] The processor 11 comprises, for example, one or more CPUs (Central Processing Units) and their peripheral circuits, and performs various arithmetic operations. The processor 11 executes a control program 131 stored in the ROM 13, thereby performing program update operations, such as updating programs stored in the program storage area 141 of the flash memory 14 or adding new programs to the program storage area 141. Details of the program update operations will be described later. The processor 11 also implements various functions to support the operation of the vehicle 10 by executing each program stored in the program storage area 141. The processor 11 may further include arithmetic circuits such as a logic unit and a numerical unit.

[0014] The RAM 12 functions as the work memory for the processor 11. The ROM 13 stores the control program 131 described above. The control program 131 may also be stored in the flash memory 14.

[0015] The flash memory 14 is a non-volatile semiconductor memory. The flash memory 14 has a program storage area 141. The program storage area 141 stores programs corresponding to each function for assisting the operation of the vehicle 10, which are executed by the processor. In addition, the flash memory 14 stores various data used for processing by the processor 11 in areas other than the program storage area 141. For example, the flash memory 14 stores an update log file 142 as an example of various data. The flash memory 14 may be provided outside the ECU 100. Alternatively, storage such as an HDD (Hard Disk Drive) or SSD (Solid State Drive) may be provided in or outside the ECU 100, and the program storage area 141 and the update log file 142 may be stored in such storage.

[0016] The update log file 142 records the history of additions and updates to each program stored in the program storage area 141. For example, the update log file 142 records the storage date and time, update date and time, size, number of updates to date, and the size of any reserve area (described later) if one is set up, for each program stored in the program storage area 141.

[0017] The communication interface 15 includes an interface circuit for connecting the ECU 100 to an in-vehicle network compliant with standards such as CAN (Controller Area Network). The communication interface 15 receives signals from in-vehicle components such as brakes and engines, and the navigation system, and passes them to the processor 11. The communication interface 15 also receives update programs and newly added programs from the data center 30 via the communication device 20 and passes them to the processor 11.

[0018] Furthermore, the communication interface 15 transmits control signals generated by the processor 11 to the in-vehicle components. The control signals received from the communication interface 15 control in-vehicle components such as the engine and brakes, thereby realizing the various driver assistance functions of the ECU 100.

[0019] For example, the ECU 100 implements the functions shown in Figure 1 by the processor 11 executing the control program 131 stored in the ROM 13. That is, the ECU 100 implements the functions of the program acquisition unit 110, the storage location determination unit 120, and the program storage unit 130. These units are functionally configured for updating or adding programs stored in the program storage area 141 via OTA. The configuration related to the driver assistance functions, which are the original functions of the ECU 100, and other functional configurations are omitted in Figure 1.

[0020] The program acquisition unit 110 acquires update programs or newly added programs from the data center 30 via the communication device 20. In the following description, the program acquired by the program acquisition unit 110 will be referred to as the target program.

[0021] The storage location determination unit 120 determines the location within the program storage area 141 where the target program will be stored (the target program storage location) based on the usage status of the program storage area 141. Specifically, if the target program does not require a reserve area that takes into account increments due to future updates (an area where increments due to updates of the target program are stored), the storage location determination unit 120 decides to store the target program in the smallest unused area within the program storage area 141 where the target program can be stored. If the target program requires a reserve area, the storage location determination unit 120 sets the size of the reserve area by referring to the update log file 142. Then, the storage location determination unit 120 decides to store the target program in a contiguous unused area within the program storage area 141 where both the target program and the reserve area can be secured. Details of the processing by the storage location determination unit 120 will be described later.

[0022] The program storage unit 130 stores the target program at the location within the program storage area 141 determined by the storage location determination unit 120.

[0023] Next, the operation of the program update process performed by the ECU 100 configured as described above will be explained with reference to the flowchart in Figure 3. For example, when the program acquisition unit 110 of the ECU 100 acquires an update program for updating a program stored in the program storage area 141, or a program to be newly added to the program storage area 141 (hereinafter, both will be collectively referred to as the target program), from the data center 30 via the communication device 20 via OTA, the program update process is started.

[0024] First, the storage location determination unit 120 determines whether the target program is an update program or not (step S10). If the target program is an update program (step S10; Yes), the storage location determination unit 120 determines whether the target program can be stored in the storage location of the program to be updated (overwritten) by the target program, such as whether sufficient reserve area is set (step S20). If the target program can be stored in the storage location of the program to be updated (step S20; Yes), the storage location determination unit 120 decides to store the target program in that storage location (step S30). Then, the process moves to step S113.

[0025] On the other hand, if the target program is not an update program (step S10; No), or if the target program is an update program but cannot be stored in the storage location of the program to be updated (step S20; No), the storage location determination unit 120 extracts a contiguous unused area from the program storage area 141 that can serve as a candidate location for storing the target program (step S101). Here, if an existing program stored in the program storage area 141 has a reserve area set up, the storage location determination unit 120 excludes that reserve area from the unused area. Also, if the target program is an update program, the storage location determination unit 120 determines that the area in the program storage area 141 where the program to be updated is stored is unused and extracts a contiguous unused area. This is because when a program is updated, the program to be updated is deleted, and the area where the program to be updated was stored becomes unused.

[0026] Here, the process of step S101 will be explained using a specific example. For example, as shown in Figure 4A, assume that programs A to E are stored in the program storage area 141. Also, assume that a reserve area is provided in the area adjacent to the end of program A in preparation for future updates. The target program is to be newly added. In this case, the storage position determination unit 120 extracts three consecutive unused areas: area a between the reserve area of ​​program A and program B, area b between program B and program C, and area c between program D and program E.

[0027] On the other hand, the target program is a program for updating program B. In this case, the storage location determination unit 120 determines that the storage area for program B to be updated is unused and extracts a continuous unused area. That is, in this case, the storage location determination unit 120 extracts two continuous unused areas: an area consisting of the storage area for program B and adjacent areas a and b, and an area c between program D and program E.

[0028] Returning to Figure 3, the storage location determination unit 120 then determines whether the target program requires a reserve area to account for the increase in capacity due to future updates (step S102). For example, programs for safety functions such as emergency braking (FEB), lane departure prevention (LDP), and rear emergency braking (RAEB) are generally not updated, or their capacity does not change even if they are updated. Therefore, if the target program is such a safety function program, the storage location determination unit 120 determines that it is a target program that does not require a reserve area. Also, by referring to the update log file 142, if it is confirmed that the size of the target program has hardly changed with previous updates, the storage location determination unit 120 determines that it is a target program that does not require a reserve area. If the target program is anything other than these, the storage location determination unit 120 determines that it is a target program that requires a reserve area. Note that the above is just one example, and various methods can be used to determine whether or not a reserve area is required.

[0029] If it is determined that the target program does not require a spare area (step S102; No), the storage location determination unit 120 determines whether there is an unused area larger than the target program among the unused areas extracted in step S101 (step S103).

[0030] If there is no unused area larger than the target program (step S103; No), the process moves to step S111. On the other hand, if there is an unused area larger than the target program (step S103; Yes), the storage location determination unit 120 determines the smallest unused area among these unused areas as the storage location for the target program (step S104). This allows the target program to be stored in a location that is as close to the exact location as possible. Then, the process moves to step S113.

[0031] On the other hand, if the storage location determination unit 120 determines that the target program requires a spare area (step S102; Yes), it refers to the update history of the target program recorded in the update log file 142 and sets the size of the spare area for the target program (step S105). For example, the storage location determination unit 120 sets the size of the spare area to the increase in capacity from the previous update of the target program. For example, since large-scale program updates are generally more frequent in the early stages of a release, the storage location determination unit 120 sets the size of the spare area to be larger the fewer times the target program has been updated. For example, the storage location determination unit 120 calculates the update frequency by dividing the number of updates of the target program by the number of days from the release date of the target program to the present, and sets the size of the spare area to be larger the more frequently it is updated. If the target program is a newly added program for which no update history is recorded in the update log file 142, the storage location determination unit 120 can obtain the update history of the target program by requesting it from the data center 30 and then set the spare area. Alternatively, the storage location determination unit 120 may set the size of the reserve area to a predetermined percentage of the target program (for example, 10 percent of the target program) or a fixed value. Note that the method for determining the size of the reserve area is arbitrary, and it may be determined by methods other than those described above.

[0032] Next, the storage location determination unit 120 sets the size of the required storage area, which is the area necessary to store the target program in the program storage area 141 (step S106). The required storage area is the sum of the size of the target program and the size of the reserve area set in step S105. For example, if the size of the target program is 500 MB and the size of the reserve area is 100 MB, the storage location determination unit 120 sets the size of the required storage area to 600 MB.

[0033] Next, the storage location determination unit 120 determines whether there is a storable area among the unused areas extracted in step S101 that is larger than the size of the required storage area set in step S106 (step S107).

[0034] If there is a storable area (step S107; Yes), the storage location determination unit 120 determines this storable area as the storage location for the target program (step S108). This allows the target program to be stored in a location that reserves a spare area considering the increase in capacity due to future updates. If there are multiple storable areas, the storage location determination unit 120 determines the smallest of these storable areas as the storage location. The process then proceeds to step S113.

[0035] On the other hand, if there is no available storage area (step S107; No), the storage location determination unit 120 determines whether there is an area larger than the size of the target program among the extracted unused areas (step S109).

[0036] If there is no unused area larger than the size of the target program (step S109; No), the process moves to step S111. On the other hand, if there is an unused area larger than the size of the target program (step S109; Yes), the storage location determination unit 120 determines the largest unused area among these unused areas as the storage location for the target program (step S110). This ensures that a minimum amount of reserve area is secured, allowing the target program to be stored in a contiguous unused area. The process then moves to step S113.

[0037] In step S111, the storage location determination unit 120 determines whether the target program can be stored by dividing it into multiple unused areas. If there are almost no unused areas, or if the target program is not permitted to be stored in divided form, it is determined that it cannot be divided (step S111; No), and the program storage area 141 is not updated, and the program update process ends. At this time, the ECU 100 may output an error message indicating that the target program could not be stored via the communication device 20 to the smartphone of the vehicle owner 10 that has been registered in advance, or to an in-vehicle device (e.g., a speaker). The ECU 100 may also include a message in this error message prompting the deletion of unnecessary functions in order to free up capacity in the program storage area 141.

[0038] On the other hand, if it is determined that the program can be divided and stored (step S111; Yes), the storage location determination unit 120 determines the storage location for each divided file of the target program (step S112). There are various methods for how to divide the target program. For example, the storage location determination unit 120 can determine the storage location for each divided file so that unused area is used as efficiently as possible. Alternatively, the storage location determination unit 120 can determine the storage location for each divided file so that the number of divisions is kept to a minimum.

[0039] In step S113, the program storage unit 130 stores the target program sequentially from the beginning of the area within the program storage region 141, which was determined to be the storage location in any of steps S30, S104, S108, S110, or S112. If the target program is an update program, the program storage unit 130 deletes the program to be updated from the program storage region 141 before storing the target program.

[0040] Then, the program storage unit 130 records the details related to the storage of the target program in the update log file 142 (step S114). This completes the program update process.

[0041] Next, I will explain the program update process described above with a specific example. Figure 4A shows the program storage area 141 where programs A to E are stored. Only program A has a spare area provided in the adjacent area behind it. This program storage area 141 has the following continuous unused areas: a 600MB area a between the spare area of ​​program A and program B, a 400MB area b between program B and program C, and a 300MB area c between program D and program E. Now, suppose a program update process is executed to newly store program F, which has a size of 300MB, in this program storage area 141. This program F is a program that does not require a spare area.

[0042] In this case, although the program F can be stored in any of the areas a to c in terms of size, it will be stored in the smallest area c among them by the program update process. Therefore, after the completion of the program update process, the program storage area 141 will be in the state shown in FIG. 4B. As a result, it becomes possible to arrange the program F in the area c without excess or deficiency rather than storing it in the areas a and b.

[0043] Also, assume that a program update process for newly storing a 300 MB program G in the program storage area 141 shown in FIG. 4A is executed. This program G is a program that requires a 150 MB spare area.

[0044] In this case, the required storage area for the program G is 450 MB, and an unused area of 450 MB or more is required. Therefore, the program G is stored in the area a. Therefore, after the program update process, the program storage area 141 will be in the state shown in FIG. 4C. In this way, it becomes possible to arrange the program G at a position where a continuous spare area can be secured.

[0045] As described above, when storing the target program in the program storage area 141, the ECU 100 which is a control device according to the present embodiment determines the position within the program storage area 141 for storing the target program based on the usage status of the program storage area 141, and stores the target program at that position. Therefore, since the target program is stored at an appropriate position, it becomes possible to delay the progress of fragmentation of the program storage area 141 when storing the target program.

[0046] Further, the ECU 100 according to the present embodiment stores the target program at a position within the program storage area 141 where a spare area considering the increment due to future updates of the target program can be secured. Also, the size of this spare area is set based on the increment in the size of the target program at the previous update or the number of updates of the target program so far. Thereby, it is possible to prevent a situation where the continuous free capacity becomes insufficient due to future updates and the program has to be moved or divided.

[0047] Also, for a target program that does not require a preliminary area, the ECU 100 according to the present embodiment stores it in the smallest unused area among the unused areas within the program storage area 141 where it can be placed. As a result, it becomes possible to place the target program at a position in the program storage area 141 with as little waste as possible, and an effect of delaying the progress of fragmentation of the program storage area 141 can be expected.

[0048] (Modification) The present invention is not limited to the above-described embodiment, and various modifications and applications are possible. For example, partial omission, replacement, addition of an arbitrary configuration, etc. of the above-described embodiment are possible. Also, the hardware configuration, functional configuration, flowchart, etc. shown in the above-described embodiment are examples and can be changed as appropriate.

[0049] For example, among the driving support functions of the ECU 100, parking support (APA) and autonomous driving (AD) do not operate simultaneously, and are functions in an exclusive relationship where the other function is necessarily stopped when one function is operating. Therefore, it is not necessary to simultaneously hold the programs of the functions in an exclusive relationship in the program storage area 141 in a complete state. That is, as shown in FIG. 5, one of the programs J, K of the functions in an exclusive relationship that are currently stopped is stubbed and compressed into a program with only input / output functions, and the program K, J of the other function in an exclusive relationship that is currently operating is stored in the area secured by the compression in the program storage area 141, enabling sharing of the program storage area 141.

[0050] In order to enable such sharing of the program storage area 141, in the program update process, when a program of a function in an exclusive relationship with the function of the target program is stored in the program storage area 141, the storage determination unit 120 may preferentially determine the storage position of the target program to be an unused area adjacent to the program.

[0051] In the above embodiment, the ECU 100 is not limited to a driver assistance system ECU, but may also be a multimedia system ECU, a power supply system ECU, etc. A multimedia system ECU is a general term for an ECU that controls the multimedia system of the vehicle 10. Examples of multimedia system ECUs include a navigation control ECU that controls the navigation system of the vehicle 10, and an audio control ECU that controls the audio equipment of the vehicle 10. A power supply system ECU is a general term for an ECU that controls the power supply system of the vehicle 10. Examples of power supply system ECUs include a power supply control ECU that controls the ACC (accessory) power and IG (ignition) power installed in the vehicle 10. Furthermore, the present invention is also applicable in a configuration in which the vehicle 10 is equipped with multiple types of such ECUs and each of these ECUs shares the program storage area 141.

[0052] Furthermore, the present invention is applicable to control devices other than the ECU 100, which is a control device for controlling the vehicle 10. For example, the present invention is applicable to control devices for industrial robots and machine tools that operate by executing programs corresponding to each function. In addition, the program storage method of the present invention can be applied when storing the programs for each function in the program storage area 141 of the flash memory 14 during the manufacturing stage of the ECU 100.

[0053] Furthermore, in the above embodiment, an example was described in which the processor 11 of the ECU 100 executes the control program 131 to realize the functions of the program acquisition unit 110, the storage position determination unit 120, and the program storage unit 130. However, the processor 11 may also be configured with dedicated hardware to realize each function.

[0054] Furthermore, the control program 131 for executing the operations of the above embodiment may be stored in a recording medium such as a computer-readable CD-ROM (Compact Disc Read-Only Memory), DVD (Digital Versatile Disc), MO (Magneto Optical Disc), or memory card and distributed, and the program can be installed in a computer to realize each function. This can then be used to configure the program acquisition unit 110, the storage location determination unit 120, and the program storage unit 130 of the ECU 100. When the functions of the program acquisition unit 110, the storage location determination unit 120, and the program storage unit 130 are realized through a division of labor between the OS (Operating System) and the application, or through cooperation between the OS and the application, only the parts other than the OS may be stored in the recording medium.

[0055] The present invention allows for various embodiments and modifications without departing from the broad spirit and scope of the invention. Furthermore, the embodiments described above are for illustrative purposes only and do not limit the scope of the invention. In other words, the scope of the invention is indicated by the claims, not by the embodiments. Various modifications made within the scope of the claims and the equivalent significance of disclosure are considered to be within the scope of the invention.

[0056] 10 Vehicle, 20 Communication device, 30 Data center, 100 ECU, 11 Processor, 12 RAM, 13 ROM, 131 Control program, 14 Flash memory, 141 Program storage area, 142 Update log file, 15 Communication interface, 16 Bus, 110 Program acquisition unit, 120 Storage location determination unit, 130 Program storage unit.

Claims

1. A control device that realizes corresponding functions by executing each program stored in a program storage area, comprising: a program acquisition unit that acquires a target program which is an update program or a newly added program; a storage location determination unit that determines a target program storage location which is the location within the program storage area where the target program is stored, based on the usage status of the program storage area; and a program storage unit that stores the target program at the target program storage location determined by the storage location determination unit.

2. The control device according to claim 1, wherein the storage position determination unit determines the storage position of the target program to a position that can secure a reserve area that takes into account the increment due to future updates of the target program.

3. The control device according to claim 2, wherein the storage position determination unit sets the size of the reserve area based on the size increment at the time of the previous update of the target program.

4. The control device according to claim 2 or 3, wherein the storage position determination unit determines the size of the reserve area based on the number of updates the target program has been updated to date.

5. The control device according to claim 1, wherein the storage position determination unit determines the location of the smallest unused area within the program storage area where the target program can be placed as the target program storage position.

6. The control device according to claim 1, wherein, if a program for a function that is mutually exclusive with the function of the target program is stored in the program storage area, the storage location determination unit preferentially determines the location of an unused area adjacent to the program as the target program storage location.

7. The control device according to claim 1, wherein the control device is a vehicle control device.

8. A method for storing a program in a program storage area by a computer, wherein the computer obtains a target program, which is an update program or a newly added program; determines a target program storage location, which is a location within the program storage area where the target program is stored, based on the usage status of the program storage area; and stores the target program in the target program storage location.