On-board processing device
The on-vehicle processing device efficiently acquires log data from within ECUs using read and snoop modes, addressing limitations of conventional methods to support advanced vehicle systems.
Patent Information
- Application Number
- JP2021123550
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-07-28
- Publication Date
- 2025-11-10
- Estimated Expiration
- 2041-07-28
AI Technical Summary
Conventional methods for collecting log data from vehicle ECUs are limited to information flowing on the bus line, unable to acquire large amounts of detailed data within the ECU, and are constrained by bus line communication speeds, making them unsuitable for advanced systems like ADAS and autonomous driving.
An on-vehicle processing device with a calculation unit, storage unit, data management unit, and log collection unit that allows selective acquisition of log data from within the ECU, using read and snoop modes to manage and output data efficiently.
Enables the acquisition of large amounts of log data with low processing load, suitable for sophisticated ECU functions in ADAS and autonomous driving systems.
Smart Images

Figure 0007766424000001 
Figure 0007766424000002 
Figure 0007766424000003
Abstract
Description
[Technical Field]
[0001] The present invention relates to an on-vehicle processing device. [Background technology]
[0002] In recent years, there has been a growing need to record internal information from vehicle ECUs (Electronic Control Units) as logs or to collect it externally via communication networks. Traditionally, these logs were used for fault diagnosis and program defect analysis, but in recent years they have been used for a wider range of purposes, such as analyzing the situation after an accident, detecting security intrusions, and analyzing signs of failure. However, collecting all log information would result in a huge amount of data and processing load, so it is necessary to be able to dynamically select log content according to the situation and purpose of analysis, and to be able to collect logs with low load so as not to affect the original operation.
[0003] In response to such a demand, conventionally, information transmitted and received between a plurality of ECUs on a bus line is collected by a separate log collection node on the bus line (see, for example, Patent Document 1). [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Japanese Patent Application Laid-Open No. 2000-67390 Summary of the Invention [Problem to be solved by the invention]
[0005] Conventional methods such as those described in Patent Document 1 simply capture information already flowing on the bus line for the original processing, so there is no additional processing load. Also, by selecting the information to be acquired from the bus line, selective collection of logs becomes possible.
[0006] Meanwhile, with the recent advances in ADAS (Advanced Driver Assistance Systems) and autonomous driving, ECU internal functions have become more sophisticated and complex, creating a need to acquire large amounts of detailed log data from within the ECU. However, logs that can be collected using conventional methods are limited to information flowing between ECUs, and it is not possible to collect information from within the ECU. In addition, due to limitations on bus line communication speeds, there is a limit to the amount of data that can be transmitted, making these methods unsuitable for collecting large amounts of log data.
[0007] In view of the above, the main object of the present invention is to acquire a large amount of log data from within an ECU with a low load. [Means for solving the problem]
[0008] The present invention First aspect of The in-vehicle processing device according to the present invention is mounted on a vehicle and includes a calculation unit that calculates output data based on input data, a storage unit that stores data, a data management unit that manages the data stored in the storage unit, and a log collection unit that collects logs inside the in-vehicle processing device and outputs them to the outside, and the data management unit inputs the data stored in the storage unit to the calculation unit as the input data, and stores the output data output from the calculation unit in the storage unit, the data management unit has a read mode for reading data stored in the storage unit and managing the data as read data, and a snoop mode for referencing the data stored in the storage unit and managing the data as referenced data, and when data stored in the storage unit is input to the calculation unit as the input data, the data is read from the storage unit using the read mode, and when the log collection unit references and acquires the data stored in the storage unit, the data is referenced from the storage unit using the snoop mode; The log collection unit references and acquires the data stored in the storage unit, and outputs the data to the outside as the log. An on-vehicle processing device according to a second aspect of the present invention is mounted on a vehicle and includes a calculation unit that calculates output data based on input data, a storage unit that stores data, a data management unit that manages the data stored in the storage unit, and a log collection unit that collects logs inside the on-vehicle processing device and outputs them to the outside, wherein the data management unit inputs data stored in the storage unit as the input data to the calculation unit and stores the output data output from the calculation unit in the storage unit, and the data management unit has a read mode for reading out data stored in the storage unit and managing the data as read data, and a log collection unit that refers to the data stored in the storage unit and manages the data as referenced data. and a snoop mode for managing the data as data, and when an overwrite request is made for data stored in the storage unit, the log collection unit determines whether the data is the read data, and if the data is not the read data, reserves the data without overwriting it, and if the data is the read data, overwrites the data regardless of whether the data is the referenced data, and when overwriting of the read data but not the referenced data is performed, invalidates the data the next time the log collection unit references it, and the log collection unit references and acquires the data stored in the storage unit and outputs it to the outside as the log. [Effects of the Invention]
[0009] According to the present invention, a large amount of log data inside an ECU can be acquired with a low load. [Brief explanation of the drawings]
[0010] [Figure 1] FIG. 1 is a functional block diagram showing an example of the configuration of a vehicle system including an on-board processing device according to an embodiment of the present invention. [Figure 2] Processing unit configuration diagram [Figure 3] FIG. 10 is a diagram showing an example of application input / output data stored in a ring buffer. [Figure 4] A logical block diagram showing an example of a configuration in which multiple applications are connected via multiple ring buffers. [Figure 5] A diagram showing the structure of information that manages the ring buffer [Figure 6] Flowchart showing the process of the write operation of the data management unit [Figure 7] Flowchart showing the process of the read operation of the data management unit [Figure 8] Flowchart showing the process of the reference operation of the data management unit [Figure 9] An example of the configuration of a log selection table DETAILED DESCRIPTION OF THE INVENTION
[0011] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. In this embodiment, a device that performs processing to realize driving assistance or driving control of a vehicle in an ADAS or an autonomous driving system will be described as an example of an in-vehicle processing device to which the present invention is applied.
[0012] (Vehicle system configuration) 1 is a functional block diagram showing an example of the configuration of a vehicle system including an on-board processing device according to an embodiment of the present invention. The vehicle system according to this embodiment is a system that is mounted on a vehicle 1 and performs appropriate driving assistance or driving control after recognizing the status of obstacles such as roads and surrounding vehicles around the vehicle 1. As shown in FIG. 1, the vehicle system includes an on-board processing device 10, an external sensor group 20, a vehicle sensor group 30, a map information management device 40, an actuator group 50, an exterior vehicle communication terminal 60, etc.
[0013] The external sensor group 20 is a collection of external sensors that detect the state around the vehicle 1, and includes, for example, a camera device, millimeter-wave radar, LIDAR (Light Detection and Ranging), sonar, etc. The external sensor group 20 is configured to detect information on environmental elements such as obstacles (other vehicles, bicycles, pedestrians, fallen objects, etc.) within a predetermined range from the vehicle 1, road shapes (white lines, road edges, etc.), and traffic rules (road signs, traffic lights, etc.), and to output the detected information to the on-vehicle processing device 10 via an on-vehicle network such as a CAN (Controller Area Network).
[0014] The vehicle sensor group 30 is a collection of vehicle sensors that detect various state quantities (e.g., traveling speed, steering angle, accelerator operation amount, brake operation amount, etc.) related to the state of the vehicle 1. The vehicle sensor group 30 periodically outputs the detected state quantities to the on-board processing device 10 via an on-board network such as a CAN. The vehicle system is configured so that each device, including the on-board processing device 10, connected to the on-board network can acquire the required state quantities from the vehicle sensor group 30 via the on-board network.
[0015] The map information management device 40 is a device that manages and provides digital map information about the area around the vehicle 1, and is, for example, a navigation device. The map information management device 40 is provided with digital road map data that represents, for example, an entire predetermined area or an area around the vehicle 1, and is configured to identify the map position of the vehicle 1 (the road, lane, etc. on which the vehicle is traveling) on the map data based on the position information of the vehicle 1 determined via a Global Navigation Satellite System (GNSS) receiving device or the like. The map information management device 40 is also configured to provide the identified map position of the vehicle 1 and map data about its surroundings to the on-board processing device 10.
[0016] The actuator group 50 is a group of devices that control control elements such as steering, braking, and accelerator that determine the movement of the vehicle 1. The actuator group 50 is configured to control the movement of the vehicle 1 based on operation information of the steering wheel, brake pedal, accelerator pedal, etc. by the driver and control information output from the on-vehicle processing device 10.
[0017] The off-vehicle communication terminal 60 is, for example, a fifth-generation mobile communication terminal, and is configured to transfer data output from the on-vehicle processing device 10 to a center not shown, and to transmit commands from the center to the on-vehicle processing device 10.
[0018] 1, the on-board processing device 10 exchanges information with any of the hardware among the external sensor group 20, the vehicle sensor group 30, the map information management device 40, the actuator group 50, and the off-vehicle communication terminal 60, depending on the content of the processing. In other words, the types of external hardware with which the multiple on-board processing devices 10 actually installed in the vehicle system exchange information differ depending on the type of on-board processing device 10.
[0019] (Configuration of on-board processing device) The on-vehicle processing device 10 is, for example, an ECU mounted on the vehicle 1, and includes a processing unit 100, a memory unit 110, and a communication unit 120. Note that various types of on-vehicle processing devices 10 are actually mounted in a vehicle system depending on the content of the processing to be realized and the devices to be controlled, but FIG. 1 shows one of them as a representative example.
[0020] The processing unit 100 is configured to include, for example, a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), an FPGA (Field-Programmable Gate Array), etc. The processing unit 100 executes application software 111 stored in a storage unit 110 to perform processing to realize the functions of the in-vehicle processing device 10. The processing unit 100 includes, as its functions, a sensor input unit 101, a calculation unit 102, an actuator output unit 103, a data management unit 104, and a log collection unit 105.
[0021] The sensor input unit 101 acquires output values (hereinafter simply referred to as "output values") from the external sensor group 20, the vehicle sensor group 30, the map information management device 40, the actuator group 50, and the exterior communication terminal 60, and stores, based on these output values, ambient environment information related to the periphery of the vehicle 1 and vehicle sensor information related to the movement of the vehicle 1 in a ring buffer 112 (described later). The ambient environment information is, for example, information about obstacles present around the vehicle 1 and information about features indicating the characteristics of the road around the vehicle 1, and is represented by information included in the output values from the external sensor group 20 and the map information management device 40. Information about other vehicles and the like received by the exterior communication terminal 60 from a center may also be included in the ambient environment information. Note that examples of obstacles present around the vehicle 1 include moving objects such as other vehicles, bicycles, and pedestrians moving around the vehicle 1, as well as parked vehicles, fallen objects, and installed objects that are stationary on the road around the vehicle 1. On the other hand, the vehicle sensor information is, for example, information such as the position of the vehicle 1, the traveling speed, the steering angle, the amount of accelerator operation, the amount of brake operation, etc., and is represented by information included in the output values from the vehicle sensor group 30 and the actuator group 50. The surrounding environment information and vehicle sensor information acquired by the sensor input unit 101 are stored in the storage unit 110 as a ring buffer 112.
[0022] The calculation unit 102 executes each application included in the application software 111 using one or more CPUs constituting the processing unit 100 in the on-board processing device 10. At this time, the calculation unit 102 determines the execution timing of each application based on information on a preset execution schedule and the number of threads. The execution scheduling information defines the timing of operation start and end when an application is run sequentially or in parallel, as well as an execution period. For example, for an application set with a period of 10 ms, the calculation unit 102 executes the application every 10 ms. For an application set with data parallelism, the calculation unit 102 controls the application to be executed on one or more CPUs at a predetermined timing. Information on the execution results of the application is output by the data management unit 104 to the storage unit 110 and stored in the ring buffer 112.
[0023] The actuator output unit 103 acquires the control information for the actuator group 50, which is obtained by the calculation unit 102 executing the application, from the ring buffer 112 via the data management unit 104, and outputs it to the actuator group 50 connected to the in-vehicle network. This causes the actuator group 50 to operate, controlling the movement of the vehicle 1.
[0024] The data management unit 104 controls data input / output between applications executed by the calculation unit 102. In other words, the data management unit 104 controls data input / output between different applications. Data input / output between applications is collectively managed as a ring buffer 112, and all data input / output to the ring buffer 112 is performed by write and read operations, which will be described later, under the ring buffer control of the data management unit 104.
[0025] The data management unit 104 controls data input and output not only between applications, but also between the application and the sensor input unit 101, and between the application and the actuator output unit 103. That is, the data management unit 104 also handles input data from the sensor input unit 101 and output data to the actuator output unit 103 as targets for writing and reading data to and from the ring buffer.
[0026] The log collection unit 105 collects input / output data of the application from the ring buffer 112, stores the data as log record data 114 in the storage unit 110, and outputs the data as a log to the outside of the vehicle via the communication unit 120 and the exterior communication terminal 60. When the log collection unit 105 collects data from the ring buffer, it is also under the control of the ring buffer of the data management unit 104, but is performed by a reference operation to be described later.
[0027] The storage unit 110 includes storage devices such as a RAM (Random Access Memory), an HDD (Hard Disk Drive), a flash memory, and a ROM (Read Only Memory). The storage unit 110 stores application software 111, which is a program for implementing the functions of the on-board processing device 10, as well as a ring buffer 112 that stores input / output data of the application software 111 in chronological order, a log selection table 113 that indicates conditions for selecting logs to be collected by the log collection unit 105, and log record data 114. The storage unit 110 is also used as a main memory when the processing unit 100 executes the application software 111.
[0028] The application software 111 includes any number of applications. The applications constituting the application software 111 are arbitrary, but examples thereof include control programs for ADAS and autonomous driving. Examples of control programs for autonomous driving include a sensor fusion application, a map fusion application, a behavior prediction application, and a trajectory generation application.
[0029] Information input to and output from the application is stored in the ring buffer 112. Specifically, surrounding environment information relating to the periphery of the vehicle 1, vehicle sensor information relating to the movement of the vehicle 1, and information processed by the application are stored.
[0030] In this embodiment, each block of data stored in the ring buffer 112 is called a "record," and data is managed and manipulated in units of records. Records include, for example, detection targets of the external sensor group 20 and the vehicle sensor group 30, control targets of actuators, and calculation results of applications.
[0031] The communication unit 120 communicates with other devices mounted on the vehicle 1 based on various communication protocols. The communication unit 120 is configured to include a network card that complies with communication standards such as IEEE802.3 or CAN. Note that the connection between the communication unit 120 and other devices is not limited to a wired connection such as Ethernet, and may be a short-range wireless connection such as Bluetooth (registered trademark) or a wireless LAN (Local Area Network).
[0032] (Configuration of processing unit) 2 is a configuration diagram of the processing unit 100 of this embodiment. As described above, the processing unit 100 includes the calculation unit 102, the data management unit 104, the log collection unit 105, the sensor input unit 101, and the actuator output unit 103.
[0033] The calculation unit 102 controls the execution of two or more applications included in the application software 111. In this embodiment, as an example, the applications whose execution is controlled by the calculation unit 102 will be described as four: a sensor fusion application 202A, a map fusion application 202B, a behavior prediction application 202C, and a trajectory generation application 202D. When these applications access output data output from the sensor input unit 101 or input / output data of other applications, data is exchanged via a ring buffer operation interface (hereinafter referred to as a "ring buffer operation IF") 210 provided in the data management unit 104.
[0034] The sensor input unit 101 includes one or more components such as a sensor A input unit 201A and a sensor B input unit 201B as components corresponding to each sensor such as a camera or radar included in the external sensor group 20. The sensor input unit 101 may acquire input from each sensor as sensor data, or may perform some kind of calculation on the data input from each sensor and then acquire it as sensor data.
[0035] The actuator output unit 103 includes one or more components such as an actuator A output unit 203A and an actuator B output unit 203B, which correspond to each actuator included in the actuator group 50. The actuator output unit 103 may output the data output from the data management unit 104 as is to each actuator, or may perform some kind of calculation on the data output from the data management unit 104 and output the calculation result to each actuator.
[0036] Similar to the sensor fusion application 202A, map fusion application 202B, behavior prediction application 202C, and trajectory generation application 202D executed by the calculation unit 102, when each component of the sensor input unit 101 or the actuator output unit 103 accesses the ring buffer 112, data is exchanged via the ring buffer operation IF 210 provided in the data management unit 104.
[0037] The log collection unit 105 refers to the application input / output data stored in the ring buffer 112, and collects data that matches predetermined log conditions specified in the log selection table 113. When the log collection unit 105 accesses the ring buffer 112, data is exchanged via the ring buffer operation IF 210 provided in the data management unit 104. That is, the log collection unit 105 can refer to and acquire the data of the ring buffer 112 stored in the storage unit 110 via the data management unit 104, and output the data to the outside as an internal log of the on-board processing device 10.
[0038] In this way, each application of the calculation unit 102, the sensor input unit 101, the actuator output unit 103, and the log collection unit 105 access the ring buffer 112 via the ring buffer operation IF 210 provided in the data management unit 104, and exchange data with each other.
[0039] (application input / output data) 3 is a diagram showing an example of application input / output data stored in the ring buffer 112 of this embodiment. The application input / output data is a collection of data managed by the data management unit 104 on the storage unit 110. The application input / output data is composed of one or more records corresponding to data input / output between applications in the calculation unit 102, or data input / output between an application and the sensor input unit 101 or actuator output unit 103. Each record includes a data type 301, a data ID 302, a timestamp 303, and a data unique attribute group 304.
[0040] The data type 301 indicates the conceptual type of each piece of data. Examples of the data type 301 include other vehicles, pedestrians, white lines, and signs. The data ID 302 is an identifier for uniquely identifying target data among a data group for which a common type is set in the data type 301. The same value is set in the data ID 302 for each piece of data indicating the same target element, for example, the same vehicle. Note that the data ID 302 may be duplicated among data groups with different data types 301.
[0041] The timestamp 303 is time information that accompanies the data. For example, the time information corresponds to the target time represented by the data. If the sensor input unit is the data generator, the time information corresponds to the time when the sensor detected the data. The timestamp 303 is expressed in a format in which the year, month, day, hour, minute, second, and the number of seconds to three decimal places are connected by slashes. For example, "2021 / 1 / 1 / 01 / 00 / 00 / 001" on the first line of Figure 3 represents January 1, 2021, 1:00:0.001 seconds.
[0042] The above three points, i.e., data type 301, data ID 302, and timestamp 303, are information that is held by all data regardless of the data type. On the other hand, data specific attribute group 304, which will be described next, is information specific to each data, and its configuration differs depending on the type of data indicated by data type 301. Data specific attribute group 304 is made up of one or more pieces of data specific information, the number of which differs depending on the type of data. For example, as shown in the first record in FIG. 3, data whose data type 301 is "own vehicle" has three-dimensional position information as data specific information 1 and three-dimensional speed information as data specific information 2.
[0043] In the storage unit 110 of this embodiment, ring buffers 112 for storing the above-described data are stored for each data input / output application, sensor input unit 101, and actuator output unit 103. The data stored in each ring buffer 112 differs depending on the type of application, sensor input unit 101, or actuator output unit 103 that exchanges data via the ring buffer 112.
[0044] (Logical configuration of ring buffer connection) 4 is a logical block diagram showing an example of a configuration in which a plurality of applications are connected via a plurality of ring buffers 112 of this embodiment. The sensor fusion application 202A reads records from two ring buffers, namely, the ring buffer 112A that stores input data from the sensor A input unit 201A and the ring buffer 112B that stores input data from the sensor B input unit 201B, performs processing such as identifying and integrating records for the same target element detected by the plurality of external sensors included in the external sensor group 20, and interpolating missing data based on time-series information, and writes the processing results to the ring buffer 112C.
[0045] Furthermore, the behavior prediction application 202C reads out the sensor fusion results written in the ring buffer 112C, performs processing to predict the future behavior and movement trajectory of the moving object detected by the external sensor, and writes the prediction results in the ring buffer 112D.
[0046] The log collection unit 105 constantly refers to the records in these ring buffers 112A, 112B, 112C, and 112D. Then, it determines the trigger conditions for log acquisition specified in the log selection table 113, and when a record that matches the conditions is obtained, it selects and extracts data to be taken out as a log from the reference data in the ring buffer, and outputs it to the outside of the vehicle via the communication unit 120 or the off-vehicle communication terminal 60. The log selection table 113 describes the conditions for collecting data stored in each ring buffer as a log.
[0047] (Log Selection Table Configuration) 9 shows an example of the configuration of the log selection table 113. The log selection table 113 is made up of one or more rows (log conditions), and each log condition includes a trigger buffer ID 901, a trigger condition 902, a log collection buffer ID 903, and log collection field information 904.
[0048] The trigger buffer ID 901 specifies which ring buffer to refer to when determining the trigger condition for log acquisition. For example, for ring buffers 112A, 112B, 112C, and 112D in FIG. 4, ID numbers for identifying these ring buffers are stored in the trigger buffer ID 901.
[0049] The trigger condition 902 specifies the conditions under which log acquisition is to be started (triggered) for the record referenced from the ring buffer specified by the trigger buffer ID 901. For example, in the log condition on the second line in Figure 9, the information "Indicator type = Pause" is stored in the trigger condition 902 to specify the field in the record and its value. In addition, the third log condition specifies the offset in bytes in the record and its value, and the information "byte
[0100] = 0x21" is stored in the trigger condition 902.
[0050] The log collection buffer ID 903 and the log collection field information 904 specify which field in which ring buffer is to be referenced and output as a log when a record that meets the above-mentioned trigger condition is referenced and log output is started.
[0051] (Ring buffer management information) 5 shows the structure of information used to manage the ring buffers 112 of this embodiment. A write pointer (WP) 510, a read pointer (RP) 520, and a snoop pointer (SP) 530 are set in each ring buffer 112. Information about these pointers is stored in the storage unit 110 along with the ring buffer 112, and is used in data management performed by the data management unit 104.
[0052] The write pointer 510 indicates the position in the ring buffer 112 where data should be written next, and is composed of a write cycle number 511 indicating the number of times the ring buffer 112 has been circulated for data writing, and a write index number 512 indicating the address of the real memory area in the ring buffer 112. The read pointer 520 indicates the position in the ring buffer 112 where data should be read next, and is composed of a read cycle number 521 indicating the number of times the ring buffer 112 has been circulated for data reading, and a read index number 522 indicating the address of the real memory area in the ring buffer 112. The snoop pointer 530 indicates the position in the ring buffer 112 where data should be referenced next, and is composed of a snoop cycle number 531 indicating the number of times the ring buffer 112 has been circulated for data reference, and a snoop index number 532 indicating the address of the real memory area in the ring buffer 112.
[0053] 5, N records are stored in the ring buffer 112. In this case, the index numbers 512, 522, and 532 of the write pointer 510, read pointer 520, and snoop pointer 530 each take a value from 0 to N-1. Therefore, after the record with index N-1, the record returns to the beginning, and becomes the record with index 0. In this way, the number of times the index number of each pointer has returned from the end to the beginning is represented by the cycle numbers 511, 521, and 531 of each pointer.
[0054] Here, any two of the write pointer 510, read pointer 520, and snoop pointer 530 for the same ring buffer 112 are designated as pointers A and B, and the distance D between pointers A and B is defined as shown in the following equation (1). In equation (1), Ca and Cb represent the cycle numbers of pointers A and B, respectively, and Ia and Ib represent the index numbers of pointers A and B, respectively. D=(Ca×N+Ia)-(Cb×N+Ib) ···(1)
[0055] In equation (1), if the write pointer 510 is pointer A and the read pointer 520 (or snoop pointer 530) is pointer B, the value of the distance D between them indicates the number of valid records that can be read (or referenced) in the ring buffer 112. Furthermore, the value obtained by subtracting the distance D from the number of records N in the ring buffer 112 indicates the number of records that have been read (or referenced) in the ring buffer 112, i.e., the number of records that can be written by overwriting.
[0056] Here, if the distance D is less than the number of records N, the write pointer 510 and the read pointer 520 (or snoop pointer 530) are on the same cycle, and if the distance D is equal to or greater than the number of records N, the read pointer 520 (or snoop pointer 530) is one or more cycles behind the write pointer 510. Also, if the distance D is 0, this indicates that the ring buffer 112 is empty, that is, all records in the ring buffer 112 have been read (or referenced), and there is no data in the ring buffer 112 to be read (or referenced). On the other hand, if the distance D is the same as the number of records N, this indicates that the ring buffer 112 is full, that is, all records in the ring buffer 112 have not been read, and no more data can be written to the ring buffer 112.
[0057] As long as the data management unit 104 is executing the processing described below in the ring buffer operation IF 210, the distance D between the write pointer 510 and the read pointer 520 will never be greater than the number of records N, but the distance D between the write pointer 510 and the snoop pointer 530 may become greater than the number of records N. This indicates that the previous write process has overtaken the reference process, causing an unreferenced record to be overwritten. In this case, the overwritten record may have inconsistent data or may not be arranged in the original chronological order, so the referenced record must be invalidated and discarded.
[0058] Each ring buffer 112 may have a plurality of read pointers 520 and a plurality of snoop pointers 530. In this case, the value of the distance D from the write pointer 510 expressed by the above-mentioned formula (1) is calculated for each read pointer 520 (or each snoop pointer 530). In the following example, it is assumed that each ring buffer 112 has k read pointers 520 and l snoop pointers 530.
[0059] (Ring buffer operation IF) As described above, the data management unit 104 includes the ring buffer operation IF 210. By using this ring buffer operation IF 210 to operate the ring buffer 112, data input from the sensor input unit 101 and output data from each application executed by the calculation unit 102 are stored in the ring buffer 112 and then stored in the storage unit 110. The data stored in the ring buffer 112 is also read from the storage unit 110 and output to the calculation unit 102 as input data for each application, or output to the actuator output unit 103. This allows management of data exchanged between the sensor input unit 101, the calculation unit 102, and the actuator output unit 103 via the ring buffer 112. The data management unit 104 performs three types of data operations on the ring buffer 112 using the ring buffer operation IF 210: write operation (write), read operation (read), and reference operation (snoop). The processing performed by the data management unit 104 during these operations will be described below with reference to the flowcharts of FIGS. 6, 7, and 8, respectively. In the following description, the k read pointers 520 in the ring buffer 112 are represented as RP1 to RPk, and the l snoop pointers 530 are represented as SP1 to SPl.
[0060] 6 is a flowchart showing the process of the write operation of the data management unit 104. When data is output from the sensor input unit 101 or the calculation unit 102 at a predetermined cycle, the data management unit 104 is set to a write mode for performing a write operation on the storage unit 110. At this time, the process shown in the flowchart of FIG.
[0061] First, in step 601, for all read pointers RP1 to RPk, the distance D from the write pointer is calculated using the above-mentioned formula (1).
[0062] Next, in step 602, it is confirmed whether all distances D calculated in step 601 are smaller than the number of records N in the ring buffer 112, that is, whether all read pointers are on the same track as the write pointer. If the distance D of all read pointers is smaller than the number of records N, it is determined that all read pointers are on the same track as the write pointer (step 602: Yes), it is determined that data can be written to the ring buffer 112, and the process proceeds to step 603. On the other hand, if the distance D of any read pointer is equal to or greater than the number of records N, it is determined that the read pointer is behind the write pointer (step 602: No), it is determined that data cannot be written to the ring buffer 112, and the process proceeds to step 605.
[0063] The determination process of step 602 described above corresponds to determining whether or not the data is already read data when a request to overwrite data stored as a record in the ring buffer 112 in the storage unit 110 is made, that is, when writing new data at the position of a record where data is already stored. Specifically, if the distance D of all read pointers is smaller than the number of records N and all read pointers are in the same rotation as the write pointer, it can be determined that the data to be overwritten is already read data. On the other hand, if the distance D of any read pointer is equal to or greater than the number of records N and that read pointer is a rotation behind the write pointer, it can be determined that the data to be overwritten is not already read data.
[0064] In step 603, the data output from the sensor input unit 101 and the calculation unit 102 is stored as a record at the position indicated by the write index number 512 in the ring buffer 112. At this time, if data is already stored at the position of the record, that data is overwritten with new data. As a result, the data is written to the storage unit 110 as part of the ring buffer 112.
[0065] Next, in step 604, 1 is added to the value of the write index number 512, and the write pointer is advanced by 1. If the value of the write index number 512 before the addition is the maximum value N-1, 1 is added to the write cycle number 511, and the value of the write index number 512 is set to 0.
[0066] In step 605, the process waits until the next execution cycle of the application (for example, 10 ms later), and when data is output from sensor input unit 101 or calculation unit 102 in the next execution cycle, the process returns to step 601. If any of the read pointers RP1 to RPk is determined to be out of sync in step 602, no more data can be written to ring buffer 112, so the process proceeds to step 605 without executing steps 603 and 604, and the process waits for the next execution cycle. In this case, a write operation instruction in response to data output from sensor input unit 101 or calculation unit 102 is determined by data management unit 104 to be a request to overwrite data that has not yet been read, and the instruction is ignored.
[0067] It should be noted that the determination of the same cycle in step 602 is made only for the k read pointers RP1 to RPk, and not for the l snoop pointers SP1 to SPl. This configuration allows the ring buffer 112 to retain unread data (unread data) without overwriting it when a request to overwrite data stored as records in the ring buffer 112 is made in the storage unit 110, i.e., when writing new data to a record location where data has already been stored. Therefore, data synchronization, which is one of the functions of the ring buffer 112, is performed for input data to each application executed by the calculation unit 102. On the other hand, data overwriting is performed for read data, regardless of whether the data has been referenced. This configuration allows the log collection performed by the log collection unit 105 to overwrite unreferenced data in the ring buffer 112 and write new data. Therefore, the write process, which is one of the functions of the ring buffer 112, can be performed without waiting. When unreferenced data is overwritten, the write process overtakes the reference process as described above.
[0068] 7 is a flowchart showing the processing of a read operation by the data management unit 104. When outputting data at a predetermined cycle to the calculation unit 102 or the actuator output unit 103 for any one of the read pointers RP1 to RPk, the data management unit 104 performs a read operation on the storage unit 110 and is set to a read mode for managing the read data as read data. At this time, the processing shown in the flowchart of FIG. 7 is executed.
[0069] First, in step 701, the distance D between the write pointer and the read pointer is calculated using the above-mentioned formula (1).
[0070] Next, in step 702, it is confirmed whether the distance D calculated in step 701 is greater than 0. As a result, if the distance D is greater than 0 (step 702: Yes), it is determined that data can be read from the ring buffer 112, and the process proceeds to step 703. On the other hand, if the distance D is 0 (step 702: No), it is determined that no more data can be read from the ring buffer 112, and the process proceeds to step 705.
[0071] In step 703, data is extracted from the record at the position indicated by the read index number 522 in the ring buffer 112. As a result, the data is read from the ring buffer 112 and input to the calculation unit 102 and the actuator output unit 103.
[0072] Next, in step 704, 1 is added to the value of the read index number 522, the read pointer is advanced by one, and the record from which data was extracted in step 703 is marked as having been read. Note that if the value of the read index number 522 before the addition is the maximum value N-1 at this time, 1 is added to the read cycle number 521, and the value of the read index number 522 is set to 0.
[0073] In step 705, the process waits until the next execution cycle of the application (for example, 10 ms later), and returns to step 701 when data is input to the calculation unit 102 or the actuator output unit 103 in the next execution cycle. Note that if it is determined in step 702 that the distance D is 0, no more data can be read from the ring buffer 112, so the process proceeds to step 705 without executing steps 703 and 704, and waits for the next execution cycle.
[0074] FIG. 8 is a flowchart showing the process of the reference operation of the data management unit 104. When the data management unit 104 starts the log acquisition by the log collection unit 105 by satisfying the trigger condition shown in the log selection table 113 for the record corresponding to any one of the snooping pointers SP1 to SPl, it performs a reference operation on the storage unit 110 and is set to the snooping mode for managing the retrieved data as the referenced data. At this time, the process shown in the flowchart of FIG. 8 is executed.
[0075] First, in step 801, the distance D between the write pointer and the snooping pointer is obtained by the above-mentioned formula (1).
[0076] Next, in step 802, it is confirmed whether the distance D calculated in step 801 is greater than 0 and whether it is greater than the number of records N in the ring buffer 112. As a result, if the distance D is greater than 0 and less than or equal to the number of records N (step 802: 0 < D ≤ N), it is determined that the ring buffer 112 can be referenced and the process proceeds to step 803. On the other hand, if the distance D is 0 (step 802: D = 0), it is determined that no more data can be referenced from the ring buffer 112 and the process proceeds to step 805. Further, if the distance D is greater than the number of records N (step 802: D > N), it is determined that data overwrite to the record due to overtaking has occurred in the previous write to the ring buffer 112, and data inconsistency will occur when referring to that record, and the process proceeds to step 806.
[0077] In step 803, data is referenced from the record at the position indicated by the snooping index number 532 in the ring buffer 112. The referenced data is output from the data management unit 104 to the log collection unit 105. Thereby, the data is retrieved from the ring buffer 112 and output to the outside as a log by the log collection unit 105.
[0078] Next, in step 804, 1 is added to the value of snoop index number 532, the snoop pointer is advanced by one, and the record whose data was referenced and acquired in step 803 is marked as referenced. Note that if the value of snoop index number 532 before the addition is the maximum value N-1 at this time, 1 is added to snoop cycle number 531, and the value of snoop index number 532 is set to 0.
[0079] In step 805, the process waits until the next log collection cycle (for example, 10 ms later) by the log collection unit 105, and when acquiring a log in the next log collection cycle, the process returns to step 801. Note that if it is determined in step 802 that the distance D is 0, no more data can be referenced from the ring buffer 112, so the process proceeds to step 805 without executing steps 803 and 804, and the process waits for the next log collection cycle.
[0080] Furthermore, if it is determined in step 802 that the distance D is greater than the number of records N, this means that unreferenced data was overwritten in the previous write to the ring buffer 112, i.e., data was overwritten on a record due to overtaking, and referencing that record would result in data inconsistency. In this case, in step 806, 1 is added to the value of the snoop index number 532, and the snoop pointer is advanced by one. Thereafter, the process proceeds to step 805, where the process waits until the next log collection cycle, and then returns to step 801. This process is continued until the distance D becomes equal to or less than the number of records N, thereby enabling the ring buffer 112 to be cue up to the referenced record and invalidating the overwritten data.
[0081] According to the embodiment of the present invention described above, the log collection unit 105 references and acquires the ring buffer 112 storing the input / output data of the application via the data management unit 104, and the data obtained in this way is output to the outside as an internal log of the on-board processing device 10. Therefore, no extra data copying is generated for log collection, and large volumes of logs can be collected with low load.
[0082] In addition, the log collection unit 105 detects records that match the conditions specified in the log selection table 113 from each record in the ring buffer 112 and collects logs, so that logs according to any conditions can be selectively acquired.
[0083] Furthermore, in the reference operation for log collection, even unreferenced records are overwritten by the write operation, so even if the log collection process is delayed and the reference operation is no longer performed, the write and read operations required to run the application will not be affected.
[0084] According to the embodiment of the present invention described above, the following advantageous effects are achieved.
[0085] (1) The on-board processing device 10 mounted on the vehicle 1 includes a calculation unit 102 that calculates output data based on input data, a memory unit 110 that stores data, a data management unit 104 that manages the data stored in the memory unit 110, and a log collection unit 105 that collects logs from within the on-board processing device 10 and outputs them to the outside. The data management unit 104 inputs data stored in the memory unit 110 as input data to the calculation unit 102, and stores output data output from the calculation unit 102 in the memory unit 110. The log collection unit 105 references and acquires the data stored in the memory unit 110 via the data management unit 104 and outputs it to the outside as a log. This configuration makes it possible to acquire a large amount of log data from within the on-board processing device 10, which is an ECU, with a low load.
[0086] (2) The log collection unit 105 references and acquires data that matches predetermined log conditions from the data stored in the storage unit 110 and managed by the data management unit 104, and outputs the data to the outside as a log. This allows for selective acquisition of desired logs.
[0087] (3) The storage unit 110 stores a log selection table 113 that indicates log conditions. The log collection unit 105 determines whether the data stored in the storage unit 110 matches the log conditions indicated in the log selection table 113, and starts outputting the log if it determines that the data matches. This allows the timing of log output to be selected arbitrarily.
[0088] (4) The data management unit 104 has a read mode for reading data stored in the storage unit 110 and managing the data as read data, and a snoop mode for referencing data stored in the storage unit 110 and managing the data as referenced data. As a result, the data stored in the storage unit 110 can be managed appropriately in each mode.
[0089] (5) When data stored in the memory unit 110 is input to the calculation unit 102 as input data, the data management unit 104 reads the data from the memory unit 110 using the read mode, and when the log collection unit 105 references and acquires the data stored in the memory unit 110, the data management unit 104 references the data from the memory unit 110 using the snoop mode. In this way, the data stored in the memory unit 110 can be managed using an appropriate mode in each case.
[0090] (6) When a request to overwrite data stored in the storage unit 110 is made, the data management unit 104 determines whether the data is data that has already been read (step 602). As a result, if the data is not data that has already been read (step 602: No), the data management unit 104 reserves the data without overwriting it, and if the data is data that has already been read (step S602: Yes), the data management unit 104 overwrites the data regardless of whether the data is data that has already been referenced (step S603). In this way, data synchronization can be ensured for input data to each application executed by the calculation unit 102, while preventing data output from each application from being hindered by log collection performed by the log collection unit 105.
[0091] (7) When the data management unit 104 overwrites data that has been read but not referenced (step 802: D>N), the data management unit 104 invalidates the data the next time the log collection unit 105 references the data via the data management unit 104 (step 806). This makes it possible to prevent data inconsistencies and out-of-order data from occurring in the logs collected by the log collection unit 105.
[0092] (8) The data management unit 104 manages data as a ring buffer 112 on the storage unit 110, and manages the position in the ring buffer 112 where the data is to be operated on by a combination of cycle numbers 511, 521, 531 that indicate the number of times the data has circulated around the ring buffer 112 and index numbers 512, 522, 532 that indicate the storage position of the data in the ring buffer 112. This allows the data stored in the storage unit 110 to be managed accurately in response to data operations performed on the storage unit 110.
[0093] (9) Data operations performed by the data management unit 104 include a write operation for writing data to the ring buffer 112, a read operation for reading data from the ring buffer 112, and a reference operation for obtaining data by referring to the ring buffer 112. The data management unit 104 calculates the distance D between the position in the ring buffer 112 where the last read operation was performed and the position in the ring buffer where the next write operation will be performed, based on the cycle numbers 511, 521 and index numbers 512, 522 of the write pointer 510 and the read pointer 520 (step 601). Then, based on the calculated distance D, it determines whether the read operation and the write operation are in the same cycle (step 602). If it determines that the read operation and the write operation are not in the same cycle (step 602: No), it determines that the write operation instruction is a request to overwrite data that has not been read, and ignores the instruction. By doing this, when a read operation is lagging behind a write operation, this can be reliably detected, and data synchronization can be ensured for input data to each application executed by the calculation unit 102.
[0094] The embodiment described above is merely an example, and the present invention is not limited to this. In other words, various applications are possible, and all embodiments are included in the scope of the present invention.
[0095] For example, in the above embodiment, the on-board processing device 10 has one processing unit 100 and one storage unit 110, and each process in the on-board processing device 10 is described as being executed using this processing unit 100 and storage unit 110. However, the on-board processing device 10 may have a plurality of processing units 100 and storage units 110, and each process may be executed using a plurality of processing units 100 and storage units 110. In that case, for example, processing software having a similar configuration may be loaded into separate storage units 110, and the plurality of processing units 100 may share and execute the process.
[0096] In the above embodiment, each process of the on-board processing device 10 is realized by executing a predetermined operation program using the processor and RAM constituting the processing unit 100 and the storage unit 110, respectively, but it is also possible to realize it by using original hardware as needed. In the above embodiment, the on-board processing device 10, the external sensor group 20, the vehicle sensor group 30, the map information management device 40, the actuator group 50, and the exterior communication terminal 60 are described as individual devices, but it is also possible to realize it by combining any two or more of them as needed.
[0097] In the above embodiment, an example has been described in which the present invention is applied to software for the on-board processing device 10 used in a vehicle system mounted on the vehicle 1, but the present invention can also be applied to software for processing devices or arithmetic devices mounted on other systems. For example, the present invention can also be applied to software for an arithmetic device mounted on a robot system that executes various arithmetic processes related to the control of the robot.
[0098] The drawings show control lines and information lines that are considered necessary for explaining the embodiments, but do not necessarily show all of the control lines and information lines included in an actual product to which the present invention is applied. In reality, it can be considered that almost all components are interconnected. [Explanation of symbols]
[0099] 1...Vehicle 10...On-board processing device 100...Processing section 101...Sensor input section 102...Arithmetic section 103... Actuator output section 104...Data Management Department 105...Log collection unit 110...Storage section 111...Application software 112...Ring buffer 113...Log selection table 114...Log record data 120…Communications Department 210...Ring buffer operation interface
Claims
1. An on-board processing device mounted on a vehicle, a calculation unit that calculates output data based on input data; a storage unit for storing data; a data management unit that manages the data stored in the storage unit; a log collection unit that collects logs from the on-board processing device and outputs the logs to an external device, the data management unit inputs the data stored in the storage unit as the input data to the calculation unit, and stores the output data output from the calculation unit in the storage unit; The data management unit a read mode for reading data stored in the storage unit and managing the data as read data; a snoop mode for referencing data stored in the storage unit and managing the data as referenced data, When data stored in the storage unit is to be input to the calculation unit as the input data, the data is read from the storage unit using the read mode; When the log recorder refers to and acquires data stored in the storage unit, the log recorder refers to the data from the storage unit using the snoop mode; the log collection unit refers to and acquires the data stored in the storage unit, and outputs the data to an external device as the log; On-board processing unit.
2. An on-board processing device mounted on a vehicle, a calculation unit that calculates output data based on input data; a storage unit for storing data; a data management unit that manages the data stored in the storage unit; a log collection unit that collects logs from the on-board processing device and outputs the logs to an external device, the data management unit inputs the data stored in the storage unit as the input data to the calculation unit, and stores the output data output from the calculation unit in the storage unit; The data management unit a read mode for reading data stored in the storage unit and managing the data as read data; a snoop mode for referencing data stored in the storage unit and managing the data as referenced data, When a request to overwrite data stored in the storage unit is made, it is determined whether the data is the already-read data; If the data is not the read data, the data is not overwritten but reserved; If the data is the read data, overwriting the data is performed regardless of whether the data is the referenced data or not; When the data that has been read but is not the referenced data is overwritten, the data is invalidated the next time the log recorder references the data; the log collection unit refers to and acquires the data stored in the storage unit, and outputs the data to an external device as the log; On-board processing unit.
3. 3. The on-board processing device according to claim 1, the log collection unit references and acquires data that matches a predetermined log condition from the data stored in the storage unit and managed by the data management unit, and outputs the data to an external device as the log; On-board processing unit.
4. 4. The on-board processing device according to claim 3, the storage unit stores a log selection table indicating the log conditions; the log collection unit determines whether the data stored in the storage unit matches the log conditions indicated in the log selection table, and starts outputting the log when it determines that the data matches. On-board processing unit.
5. 2. The on-board processing device according to claim 1, The data management unit When a request to overwrite data stored in the storage unit is made, it is determined whether the data is the already-read data; If the data is not the read data, the data is not overwritten but reserved; If the data is the read data, overwriting of the data is performed regardless of whether the data is the referenced data. On-board processing unit.
6. 6. The on-board processing device according to claim 5, When the data management unit overwrites the data that has been read but is not the referenced data, the data management unit invalidates the data the next time the log collection unit references the data. On-board processing unit.
7. 6. The on-board processing device according to claim 2 or 5, The data management unit managing the data as a ring buffer on the storage unit; a position in the ring buffer that is the target of data manipulation is managed by a combination of a cycle number that indicates the number of times the data has circulated around the ring buffer and an index number that indicates the storage position of the data in the ring buffer; On-board processing unit.
8. The on-board processing device according to claim 7, the data operations include a write operation for writing the data into the ring buffer, a read operation for reading the data from the ring buffer, and a reference operation for obtaining the data by referencing the ring buffer; The data management unit Calculating a distance between a position in the ring buffer where the read operation was last performed and a position in the ring buffer where the write operation will next be performed based on the cycle number and the index number; determining whether the read operation is in the same orbit as the write operation based on the calculated distance; If it is determined that the read operation is not in the same cycle as the write operation, the instruction for the write operation is determined to be a request to overwrite data other than the already read data, and the instruction is ignored. On-board processing unit.
Citation Information
Patent Citations
Vehicle information gathering method for vehicle mounting lan communication system, device therefor, and lan communication system vehicle information gathering system
JP2000067390A
Electronic control unit
JP2000311102A
Vehicle control device
JP2017144852A
Data management device and management method for database
JP2017167654A
Electronic control device, and analyzing system
JP2018036864A