Architecture for memory management
The proposed memory management architecture addresses NVM lifespan and reliability issues by controlling read/write operations and error checking, ensuring data integrity and improving vehicle safety.
Patent Information
- Application Number
- KR1020210158024
- Authority / Receiving Office
- KR · KR
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-11-16
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2041-11-16
AI Technical Summary
Existing AUTOSAR platforms face challenges in efficiently managing non-volatile memory (NVM) due to limited read/write operations, leading to reduced lifespan and potential data reliability issues, which can cause critical vehicle defects.
An architecture for memory management that includes an application software component, a state management software component, and a runtime environment to control read/write operations based on preset limits, error checking, and supplementary logic to ensure data integrity and extend NVM lifespan.
The solution ensures data reliability by minimizing unnecessary read/write commands, extends NVM lifespan, prevents vehicle malfunctions, and enhances vehicle safety and marketability.
Smart Images

Figure R1020210158024_ABST
Abstract
Description
Technology Field
[0001] The present invention relates to an architecture for AUTOSAR-based memory management, and more specifically, to an architecture for managing non-volatile memory (NVM) between a software component (SWC) containing vehicle control logic and non-volatile memory. Background Technology
[0002] AUTOSAR (AUTomotive Open System Architecture) is a standardization platform designed to address the surge in the use of embedded software for automotive electronics, involving various vehicle manufacturers, automotive component manufacturers, development tool producers, and semiconductor manufacturers.
[0003] Application software that conforms to the AUTOSAR standard is modularized into software components (SoftWare Component: SwC, hereinafter also referred to as 'SwC').
[0004] Software components with common functions are a concept of reusing application software using open source, but this is limited to platform software.
[0005] Existing AUTOSAR platforms provide standard modules for the Service Layer, ECU Abstraction Layer, and Microcontroller Abstraction Layer corresponding to Basic Software (BSW), and for the Application Layer, the configuration of Application Software Components varies depending on the developer or software architecture.
[0006] Currently, the AUTOSAR platform requires software component (SWC) algorithms to reliably and efficiently manage non-volatile memory between the software component (SWC) and non-volatile memory (NVM).
[0007] More specifically, vehicles contain data that must be retained without being erased even after the ignition is turned off (Key Off), and this data is stored in Non-Volatile Memory (NVM). For example, data that must be retained without being erased after the ignition is turned off includes mileage data and fault diagnosis data.
[0008] Due to the hardware characteristics of Non-Volatile Memory (NVM), the number of read / write operations is limited. Consequently, excessive and unnecessary read / write operations can shorten the lifespan of the NVM, potentially leading to failure during the vehicle's lifecycle. This results in reduced reliability of the data read / write, which could lead to critical defects in the vehicle.
[0009] Since read / write operations on non-volatile memory (NVM) involve information transfer through function calls between various modules of AUTOSAR software, supplementary technologies are required to ensure integrity at each stage. The problem to be solved
[0010] One aspect provides an architecture for memory management that minimizes read / write commands considering the lifespan of non-volatile memory, includes complementary logic for reliable data exchange, and mediates data transmission and reception. means of solving the problem
[0011] An architecture for memory management according to one aspect comprises: an application software component (ASW) that performs an algorithm for at least one function and transmits and receives data within said algorithm; basic software (BSW) including a non-volatile memory management module (VnM) for managing non-volatile memory; a state management software component that manages said non-volatile memory management module; and a runtime environment (RTE) that enables communication to be performed between said application software component (ASW) and said state management software component, and enables communication to be performed between said basic software (BSW) and said state management software component. The state management software component terminates a read operation or a write operation when writing data to said non-volatile memory or reading data from said non-volatile memory if the number of reads is greater than or equal to a preset number of times, or if the number of writes is greater than or equal to a preset number of times.
[0012] The above application software component (ASW) and the above state management software component are provided in the application layer of an AUTOSAR-based platform.
[0013] The state management software component controls the operation of reading data stored in the non-volatile memory when the vehicle is started on, and controls the operation of writing data to the non-volatile memory when the vehicle is started off.
[0014] When a write-on command is received, the state management software component calls a pre-specified read function (Rte_Read) to read data to be written to the non-volatile memory from the application software (ASW), and writes the read data to the non-volatile memory.
[0015] The state management software component determines whether a runtime environment error occurs when reading the data through the runtime environment, and if it determines that a runtime environment error has occurred, it terminates the write operation.
[0016] When controlling the write operation, the state management software component requests a Get Error Status service for individual blocks from the non-volatile memory management module (311) of the basic software (BSW).
[0017] When the state management software component requests the error status check service (Get Error Status), it determines whether the runtime environment error has occurred, and if it determines that the runtime environment error has occurred, it terminates the write operation.
[0018] When controlling the write operation, the state management software component determines whether the result of the error status check service (Get Error Status) is in a pending state, and if it is determined that it is not in a pending state, it requests the write block service (Write Block Service) from the non-volatile memory management module with the read data as an argument.
[0019] When the state management software component requests the Write Block Service, it determines whether the runtime environment error has occurred, and if it determines that the runtime environment error has occurred, it terminates the write operation, and if it determines that it is in a pending state, it terminates the write operation.
[0020] The state management software component sets a flag to On for the block where writing to the read data is completed, and initializes the flag when data writing to all blocks of the non-volatile memory management module is completed.
[0021] When a read-on command is received, the state management software component requests an error status check service (Get Error Status) from the non-volatile memory management module to check the status of individual blocks of the non-volatile memory management module.
[0022] When the state management software component requests the error status check service (Get Error Status), it determines whether the runtime environment error has occurred, and if it determines that the runtime environment error has occurred, it terminates the read operation.
[0023] When controlling a read operation, the state management software component determines whether the result of the error status check service (Get Error Status) is in a pending state, requests a read block service (Write Block Service) from the non-volatile memory management module if it is determined not to be in a pending state, and terminates the read operation if it is determined to be in a pending state.
[0024] When a state management software component requests a Write Block Service, it determines whether the runtime environment error has occurred, and if it determines that the runtime environment error has occurred, it terminates the read operation.
[0025] The state management software component sets a flag to On for blocks for which data reading is complete, and initializes the flag when data reading for all blocks of the non-volatile memory management module is complete.
[0026] When the above read-on command is received, the application software component calls a pre-specified read function (Rte_Read) and transmits the read data to the application software (ASW).
[0027] The application software component receives data through a predefined write function (Rte_Write) and performs writing to the received data. Effects of the invention
[0028] The present invention can ensure data reliability by checking for errors in all parts during data transfer when using basic software functions and runtime environment functions related to non-volatile memory.
[0029] The present invention can extend the lifespan of non-volatile memory by minimizing calls to WriteBlock and ReadBlock services.
[0030] The present invention can prevent serious malfunctions of a vehicle and perform recovery for malfunctions by using pre-configured supplementary code when an error occurs while using a WriteBlock, a ReadBlock, and a runtime environment function.
[0031] The present invention can improve the management quality of non-volatile memory, improve the quality and marketability of a vehicle, further enhance the safety of the vehicle, and secure the competitiveness of the vehicle. Brief explanation of the drawing
[0032] FIG. 1 is an example diagram of the architecture of an AUTOSAR platform having an architecture for memory management according to an embodiment. FIG. 2 is an example diagram of an architecture for memory management according to an embodiment. FIG. 3 is an example diagram of blocks within an architecture according to an embodiment. FIGS. 4a, 4b, and 4c are flowcharts of the write operation of an architecture for memory management according to an embodiment. FIGS. 5a and 5b are flowcharts of the read operation of an architecture for memory management according to an embodiment. Specific details for implementing the invention
[0033] Throughout the specification, the same reference numerals refer to the same components. This specification does not describe all elements of the embodiments, and general content in the art to which the invention pertains or content that overlaps between embodiments is omitted. The terms 'part, module, component, device' used in the specification may be implemented in software or hardware, and depending on the embodiments, a plurality of 'parts, modules, components, devices' may be implemented as a single component, or a single 'part, module, component, device' may include a plurality of components.
[0034] Throughout the specification, when a part is described as being "connected" to another part, this includes not only cases where they are directly connected but also cases where they are indirectly connected, and indirect connections include connections made via a wireless communication network.
[0035] Furthermore, when it is stated that a part "includes" a certain component, this means that, unless specifically stated otherwise, it does not exclude other components but may include additional components.
[0036] The terms first, second, etc. are used to distinguish one component from another, and the components are not limited by the aforementioned terms.
[0037] Singular expressions include plural expressions unless there is an obvious exception in the context.
[0038] In each step, identification codes are used for convenience of explanation and do not describe the order of the steps; the steps may be performed differently from the specified order unless a specific order is clearly indicated in the context.
[0039] The operating principle and embodiments of the present invention will be described below with reference to the attached drawings.
[0040] FIG. 1 is an example diagram of the architecture of an AUTOSAR platform having an architecture for memory management according to an embodiment.
[0041] AUTOSAR (AUTomotive Open System Architecture) is a standardized open platform. Here, "standard" means that function names, functions, return values, etc., are predefined. And "open" means that anyone can use it.
[0042] As shown in Fig. 1, the platform structure of AUTOSAR is a layered architecture, and since the layers are separated, system maintenance is easy.
[0043] The AUTOSAR platform enables the development of hardware-independent software through a layered structure, improving reusability and scalability.
[0044] The AUTOSAR platform includes an application layer (100), a runtime environment layer (200), and a basic software layer (300).
[0045] The software layer (100) is a platform that integrates basic software (BSW) required for driving an electronic control unit (ECU) for a vehicle and application software (ASW) that can operate independently of the hardware.
[0046] The application layer (100) may include a plurality of software components (SWC) each containing vehicle control logic.
[0047] A software component (SWC) is an independent execution unit and can be classified into a motor control software component, a battery control software component, a mode control software component, and a user interface software component depending on the control target.
[0048] Software components (SWC) can be distinguished into actuator software components, sensor software components, and application software components (110) according to function, and can be distinguished into Io converter software components, resource monitor software components, diagnostic software components, test software components, and status management software components (120).
[0049] The application software component (ASW, 110) is a component that performs an algorithm for at least one function performed in the vehicle and is responsible for the actual function of the vehicle.
[0050] Application software components (110) are divided into client / server and sender / receiver methods.
[0051] The client / server method is a remote procedure call method and is a communication method widely used in distributed systems.
[0052] In a client / server model, the provider of a remote service becomes the server, and the user of this service becomes the client. After the client initiates communication, when it requests the provision of a specific service from the server, the server plays the role of delivering the necessary parameters to the client.
[0053] For example, the client-server is used in the actuator from the perspective of requesting and executing functions.
[0054] The sender / receiver method is a message transmission method, an asynchronous communication method in which a sender sends information to a single or multiple receivers.
[0055] For example, the sender / receiver can be used in a sensor from the perspective of transmitting and receiving data.
[0056] Application software components (ASW, 110) are called Runnables, and Runnables defined in this way are scheduled by the operating system.
[0057] Each software component (SWC) cannot directly connect to hardware or an operating system (OS), so it cannot implement threads or processes. Instead, the individual functions of software components that run during runtime can be executed by runnables.
[0058] According to the specifications of the VFB (Virtual Functional Bus), a runnable is defined as a sequence of instructions that can be initiated through the runtime environment (200).
[0059] A software component can have multiple runnables.
[0060] While configuring at least one electronic control unit (ECU), a mapping is created between the operating system (OS) and a runnable within the software component, and this mapping is invoked by the runtime environment (RTE) and can be utilized during scheduling.
[0061] The state manager software component (120) is a software component that manages the inactive memory management module (311), manages fault diagnosis events, and performs the function of an interface for managing the startup / shutdown sequence.
[0062] The application software component (ASW, 110) and the state manager software component (120) within the application layer (100) can be used for the management of non-volatile memory.
[0063] The RunTime Environment (RTE: RunTime Environment, 200) independently maps at least one software component within the application layer (100) to at least one hardware and electronic control unit (ECU).
[0064] By using the runtime environment (200), signals can be read from sensors and actuators connected to other controllers and control signals can be output.
[0065] This is possible because the runtime environment (200) abstracts both the method of external communication of the electronic control unit (ECU) using networks such as CAN, FlexRay, LIN, and MOST, and the method of internal communication of the electronic control unit (ECU), and provides a common application program interface (API) to the application.
[0066] The runtime environment (200) can independently provide the electronic control unit (ECU) with communication between software components within the application layer (100) and mapping of communication interfaces between the software component (SWC) and the basic software (BSW).
[0067] That is, the runtime environment (200) connects the application software component (110) and the basic software (BSW, 300) by exchanging data and interacting.
[0068] The runtime environment (200) can separate the application software component (SWC) and the hardware.
[0069] The runtime environment (200) is an environment that implements a VFB (Virtual Functional Bus) communication structure.
[0070] Because the requirements of the runtime environment (RTE) vary depending on the application software component running on top of the runtime environment (200), the runtime environment (RTE, 200) must be tailored.
[0071] The final runtime environment (RTE) tailored by the configuration process may vary for each electronic control unit (ECU).
[0072] Basic Software (BSW: Basic Software, 300) abstracts the Electronic Control Unit (ECU) and Hardware (HW) to provide services to the upper layer.
[0073] The basic software (300) includes a service layer (310), an electronic control unit abstraction layer (320), a microcontroller abstraction layer (330), and a complex device driver layer (340).
[0074] The service layer (310) is the topmost layer of the basic software (BSW, 300) and provides services for utilizing microcontroller resources in the application layer (100).
[0075] The service layer (310) provides various background functions (communication, memory, OS) for system operation and overall control of modules within the basic software (BSW) while access to the IO hardware is managed by the electronic control unit (ECU) abstraction layer (320).
[0076] This service layer (310) can perform operating system (OS), schedule management, network communication management, memory management, diagnostic services, electronic control unit (ECU) status management, and watchdog.
[0077] That is, the service layer (310) may include an operation system, system service, memory service, and communication service.
[0078] Since the operating system (OS) must directly control the hardware to be efficient, the service layer extends down to the microcontroller abstraction layer (MCAL, 320).
[0079] System services are a set of commonly available functions and related modules, such as RTOS services including timer services and error management libraries like CRC, and provide the basic services of the microcontroller for Application Software Components (ASW) and Basic Software (BSW) modules.
[0080] The memory service may include a non-volatile memory management module (311) and provides an abstraction of memory locations and memory attributes.
[0081] In addition, the memory service manages the storage and loading of data in non-volatile memory, data verification using checksums, and reliable data storage.
[0082] Memory services perform access to memory clusters, devices, or software functions to read and write data to non-volatile memory, such as flash or EEPROM.
[0083] The Non-Volatile Memory Manager (NvM: Non-Volatile Memory Manager, 311) performs data storage and maintenance of non-volatile memory according to the individual requirements of the vehicle environment.
[0084] That is, the non-volatile memory management module (NvM, 311) manages non-volatile data of EEPROM and / or FLASH EEPROM emulation.
[0085] The communication service may include modules for vehicle network communication such as CAN, LIN, FlexRay, and MOST.
[0086] The communication service interfaces with the communication driver at the application layer (100) through communication hardware abstraction. That is, the communication service interfaces with the vehicle network and manages the network through the same interface at the application layer (100), regardless of the type of vehicle network.
[0087] The Electronic Control Unit Abstraction Layer (EAL: Ecu Abstraction Layer, 320) interfaces the drivers of the Microcontroller Abstraction Layer (MCAL) to the upper layer.
[0088] The electronic control unit abstraction layer (320) serves to provide the same interface to application software (ASW) components without rearranging the hardware circuit when external devices, such as sensors or actuators, are connected to the electronic control unit (ECU).
[0089] The electronic control unit abstraction layer (320) abstracts all basic components of the electronic control unit (ECU). Additionally, the scope of the electronic control unit (ECU) may be a larger concept than that of the microcontroller unit (MCU).
[0090] The electronic control unit abstraction layer (320) provides an application programming interface (API) independent of the hardware.
[0091] The hardware here can include both internal and external components of the microcontroller.
[0092] That is, the electronic control unit abstraction layer (320) provides an application program interface (API) for peripheral devices to access various peripheral devices inside / outside the microcontroller, and is responsible for connecting to a specific port or interface of the microcontroller.
[0093] The electronic control unit abstraction layer (320) can provide a driver for an external device and an interface for internal and external peripheral devices (IO, memory, watchdog, communication).
[0094] The electronic control unit abstraction layer (320) includes I / O hardware abstraction, communication hardware abstraction, memory hardware abstraction, and onboard device abstraction.
[0095] I / O hardware abstraction serves to abstract the location of peripheral I / O devices and the ECU hardware layout, and to hide the ECU's hardware layout from higher software layers.
[0096] Communication hardware abstraction performs abstraction of the communication controller and related electronic control unit (ECU) hardware layout.
[0097] Memory hardware abstraction abstracts memory-related hardware.
[0098] Memory hardware abstraction can be used for the management of non-volatile memory.
[0099] Memory hardware abstraction may include a memory abstraction interface module (Memlf, 321) and a flash EEPROM emulation module (flash EEPROM Emulation: Fee, 322).
[0100] The memory abstraction interface module (Memlf, 321) facilitates abstraction in the flash EEPROM emulation module (flash EEPROM Emulation: Fee, 322).
[0101] The memory abstraction interface module (Memlf, 321) can also facilitate abstraction in the EA (EEPROM Abstraction) module (not shown).
[0102] The EA module provides services for reading, writing, and erasing data in the EEPROM, and provides services for comparing data blocks in the EEPROM with data blocks in memory (e.g., RAM).
[0103] The memory abstraction interface module (Memlf, 321) provides virtual partitioning in a uniform linear address space to the non-volatile memory management module (311).
[0104] The Flash EEPROM Emulation Module (FEE, 322) abstracts the device, specific addressing scheme, and partitioning.
[0105] The flash EEPROM emulation module (FEE, 322) provides the non-volatile memory management module (311) with a virtual addressing scheme, partitioning, and a virtual unlimited erase cycle.
[0106] Onboard device abstraction abstracts onboard-related hardware.
[0107] The Microcontroller Abstraction Layer (MCAL: Microcontroller Abstraction Layer, 330) is the lowest layer in the AUTOSAR platform, and a hardware layer (not shown) may be provided below it.
[0108] The microcontroller abstraction layer (MCAL, 330) provides a device driver application program interface (API) for utilizing microcontroller unit (MCU) resources or functions of the upper layer.
[0109] The microcontroller abstraction layer (MCAL, 330) includes a microcontroller driver, a memory driver, a communication driver, and an IO driver.
[0110] Microcontroller drivers provide the ability to directly access peripheral device interfaces and the microcontroller.
[0111] A memory driver is a driver for the memory maps of on-chip memory inside the microcontroller and external memory devices.
[0112] The flash driver module (331) initializes the flash and performs read and write operations on the flash memory.
[0113] The flash driver module (331) can perform a service of comparing a data block with a data block in memory.
[0114] Communication drivers are onboard communication and vehicle communication drivers, such as SPI, I2C, CAN, and the data link layer of OSI.
[0115] An IO driver is a driver for analog digital I / O such as ADC, PW, and DIO.
[0116] Complex Device Driver (CDD: Complex Device Driver, 340) supports compatibility between external devices and platforms during operation.
[0117] The complex device driver (CDD, 340) is used to control sensors or actuators that have special timing conditions or do not have modules defined in AUTOSAR. That is, the complex device driver (CDD, 340) can directly access the microcontroller to control the sensors or actuators.
[0118] FIG. 2 is an example diagram of an architecture for memory management according to an embodiment, and FIG. 3 is an example diagram of blocks within a non-volatile memory management module.
[0119] The architecture for memory management includes an application software component (ASW, 110) and a state manager software component (120) within the application layer (100) in the AUTOSAR platform shown in FIG. 1, a non-volatile memory management module (NvM, 311), a memory abstraction interface module (Memlf, 321), a flash EEPROM emulation module (Fee, 322), and a flash driver module (Fls, 331) within the runtime environment (200) and BASIC software (300).
[0120] The application software component (ASW, 110) checks the data to be written to the state management software component (120) in response to a request from the state management software component (120) and transmits the checked data.
[0121] That is, the application software component (ASW, 110) can transmit data read through a predetermined read function (Rte_Read) to the state management software component (120).
[0122] The application software component (ASW, 110) can store data received from the state management software component (120).
[0123] The application software component (ASW, 110) can receive data through a predefined write function (Rte_Write) and perform writing on the received data.
[0124] The state management software component (120) can control the operation of reading data stored in non-volatile memory or writing data to non-volatile memory when starting on or off.
[0125] More specifically, the state management software component (120) reads data to be written to the non-volatile memory management module (311) from the application software component (ASW, 110).
[0126] When controlling a write operation, the state management software component (120) may request an error status check service from the non-volatile memory management module (311) of the basic software (BSW) shown in FIG. 3.
[0127] When the state management software component (120) checks the state of an individual block when controlling a write operation and determines that the result is not a pending state, it may request a write block service from the non-volatile memory management module (311) with the read data as an argument.
[0128] The state management software component (120) can set a flag to On for a block for which data writing has been completed, and when data writing control for all blocks is completed, it can initialize the flag and perform writing control for other data.
[0129] The state management software component (120) can call a completion function (NvM JobFinished) from the basic software (BSW) when all data writing is completed.
[0130] The state management software component (120) may request an error state check service from the non-volatile memory management module (311) of the basic software (BSW) to check the state of individual blocks when controlling a read operation.
[0131] When the state management software component (120) determines that it is not in a pending state when controlling a read operation, it may request a read block service from the non-volatile memory management module (311).
[0132] The state management software component (120) can set a flag to On for blocks for which data reading is completed, and when data reading control for all blocks is completed, it can initialize the flag and perform reading control for other data.
[0133] The state management software component (120) performs a hardware-based read operation in response to the ReadBlock service.
[0134] The state management software component (120) can call a completion function (NvM JobFinished) from the basic software (BSW) when the read operation for all data is completed.
[0135] When the state management software component (120) performs a read or write operation on data, it can check for Rte errors using the return value of the Rte function from the runtime environment.
[0136] For example, the state management software component (120) can check for Rte errors using the return value of the Rte function when performing a data reading operation from the application software component (ASW, 110).
[0137] When the state management software component (120) requests the Get Error Status and Write Block Service from the non-volatile memory management module (311) during a write operation, it can check for Rte errors using the return value of the Rte function from the runtime environment.
[0138] When the state management software component (120) requests the Get Error Status and Read Block Service from the non-volatile memory management module (311) during a read operation, it can check for Rte errors using the return value of the Rte function from the runtime environment.
[0139] The state management software component (120) can check for Rte errors using the return value of the Rte function from the runtime environment when the data reading operation is completed.
[0140] The runtime environment (200) performs mapping between the application software component (ASW, 110) and the state management software component (120), and can transfer data or transfer function call information between the application software component (ASW, 110) and the state management software component (120).
[0141] The runtime environment (200) performs mapping between the state management software component (120) and the non-volatile memory management module (311), and enables data transmission and reception between the state management software component (120) and the non-volatile memory management module (311), or
[0142] A non-volatile memory management module (NvM, 311) within the basic software (300) can check the error status of an individual block when a service request to check the error status of an individual block is received during a write operation or a read operation, and can transmit information about the error status of the individual block to a state management software component (120).
[0143] The non-volatile memory management module (NvM, 311) can perform data write operations block by block when a write block service request is received, and send a completion function (NvM JobFinished) to the state management software component (120) when the write operations for all blocks are completed.
[0144] The non-volatile memory management module (NvM, 311) can perform a data read operation block by block when a read block service request is received, and send a completion function (NvM JobFinished) to the state management software component (120) when the read operation for all blocks is completed.
[0145] The memory abstraction interface module (Memlf, 321), the flash EEPROM emulation module (Fee, 322), and the flash driver module (Fls, 331) are standard modules for non-volatile memory management services.
[0146] FIGS. 4a, 4b, and 4c are flowcharts of the write operation of an architecture for memory management according to an embodiment.
[0147] The architecture starts a write cycle when a write on command from a non-volatile memory management module (311) is received (501).
[0148] Here, the Write On command is requested when necessary after comprehensively assessing various vehicle conditions, and is primarily requested when the vehicle ignition is turned off (Key Off).
[0149] The architecture determines (502) whether individual blocks have requested a Write Block service from the Basic Software (BSW) in this cycle (or current cycle).
[0150] Determining whether a write block service has been requested includes determining whether the write block execution check flag is on.
[0151] Since the write operation is related to the lifespan of the non-volatile memory management module (311), it is checked whether the write block service has been performed only once upon receiving the write-on command. The number of write block services may be a preset number.
[0152] If the architecture has requested a write block service in this cycle, that block terminates this cycle.
[0153] On the other hand, if the architecture has not requested a write block service in this cycle, it reads the data to be written to non-volatile memory from the application software (ASW) by calling a pre-specified read function (Rte_Read) (Read, 503), and determines whether a runtime environment error (Rte Error) has occurred (504) using the return value of a runtime environment function (Rte function).
[0154] In this way, data reliability can be improved by checking for errors during data exchange step-by-step through the runtime environment.
[0155] The architecture terminates the write operation on the corresponding block if it determines that a Runtime Environment Error (Rte Error) has occurred.
[0156] On the other hand, if the architecture determines that no runtime environment error (Rte Error) has occurred, it requests an error status check service (GetErrorStatus) from the basic software (BSW) to check the status of individual blocks and determines whether the result of the error status check service (GetErrorStatus) is in a pending state (505).
[0157] By doing this, reliability can be improved and lifespan extended by checking the current status of the inactive memory management module and requesting service from the inactive memory management module only when there are no problems.
[0158] When the architecture requests the error status check service (GetErrorStatus) from the basic software (BSW), it determines whether a runtime environment error (Rte Error) has occurred (506) by using the return value of the runtime environment function (Rte function).
[0159] The architecture terminates the write operation on the corresponding block if it determines that a Runtime Environment Error (Rte Error) has occurred.
[0160] Additionally, the architecture terminates the write operation on the corresponding block if it determines that the result of the error status check service (GetErrorStatus) is in a pending state.
[0161] If the architecture determines that the result of the error status check service (GetErrorStatus) is not in a pending state and that no runtime environment error (Rte Error) has occurred, it requests the write block service (507) to the basic software (BSW) with the read data as an argument, and determines whether a runtime environment error (Rte Error) has occurred (508) using the return value of the runtime environment function (Rte function).
[0162] The following architecture terminates the write operation on the corresponding block if it is determined that a Runtime Environment Error (Rte Error) has occurred.
[0163] On the other hand, if the architecture determines that no runtime environment error (Rte Error) has occurred, it sets the write execution check flag (Flag) of the individual block to On (Set) (509).
[0164] The architecture determines (510) whether the write execution check flag of all individual blocks is turned on, and if it is determined that the write execution check flag of all individual blocks is turned on, it initializes the flags so that the cycle can be performed from the beginning by the next write command (NvM Write).
[0165] Here, the flags that need to be initialized may include a flag for the write command and a write check flag for individual blocks. That is, the architecture can set the flag for the write command (NvM Write) to off and the write check flag for individual blocks to off (511).
[0166] The architecture performs a write operation to non-volatile memory in hardware after a write block service request, and when the write operation is completed, a completion function (NvM JobFinished) can be called from the BASIC software (BSW).
[0167] The architecture determines whether the data write operation was successful (513) when the completion function (NvM JobFinished) is called (512).
[0168] If the architecture fails to write data, it can request the write block service again from the basic software (BSW) and set the write completion flag of the individual block to off (514).
[0169] When the architecture succeeds in writing data, it can set the WriteComplete Flag (515) to ON to indicate that the final write operation of an individual block is completed.
[0170] Subsequently, the architecture can re-perform the write operation.
[0171] The architecture checks the write complete flag of every individual block, and if the write complete flag of every individual block is in mode ON (516), it can set the All NvM WriteComplete Flag to ON (517).
[0172] This is to turn off the power to the Electronic Control Unit (ECU) after confirming that the write operation of all individual blocks has been successfully completed, when a write command is requested when the vehicle is turned off (Key Off).
[0173] In this way, reliability can be improved by receiving feedback on the results after the write service request, adding a backup logic for failure, and turning off the startup after checking whether the write service of all blocks is performed normally.
[0174] By controlling data writing to non-volatile memory, the reliability and security of write blocks in the non-volatile memory management module can be improved.
[0175] FIGS. 5a and 5b are flowcharts of a read operation in an architecture for memory management according to an embodiment.
[0176] The architecture determines whether the read command (NvM Read) is on (601), and if it determines that the read command (NvM Read) has been received, it performs a read cycle.
[0177] Determining whether the Read Command (NvM Read) is On includes determining whether the Read Command (NvM Read) has been received.
[0178] The Read Command (NvM Read) is requested when necessary after comprehensively assessing various vehicle conditions and can primarily be received when the vehicle is ignited (Key On).
[0179] The next architecture determines whether the read block execution check flag is on (602).
[0180] The architecture checks whether individual blocks have requested the ReadBlock service from the Basic Software (BSW) during this cycle, and if it is determined that the ReadBlock service has been requested, the block terminates this cycle (i.e., the current cycle).
[0181] Since reading and writing are related to the lifespan of the non-volatile memory management module and non-volatile memory, it is determined whether the ReadBlock service was performed only once upon receiving a Read command (NvM Read).
[0182] If the architecture determines that it has not requested a ReadBlock service, it requests an Error Status check service (GetErrorStatus) from the Basic Software (BSW) to check the status of individual blocks, and determines whether the result of the Error Status check service (GetErrorStatus) is in a pending state (603).
[0183] By checking the current status of the non-volatile memory management module and requesting service from the non-volatile memory management module only when there are no problems, reliability can be improved and lifespan extended.
[0184] And when the architecture requests the error status check service (GetErrorStatus), it determines whether a runtime environment error (Rte Error) has occurred (604) using the return value of the runtime environment function (Rte function).
[0185] The architecture terminates the read operation on the corresponding block if it determines that a Runtime Environment Error (Rte Error) has occurred.
[0186] The architecture terminates the read operation on the corresponding block if it determines that the result of the error status check service (GetErrorStatus) is in a pending state or if it determines that a runtime environment error (Rte Error) has occurred.
[0187] If the architecture determines that the result of the error status check service (GetErrorStatus) is not in a pending state and that no runtime environment error (Rte Error) has occurred, it requests the ReadBlock service (605) from the basic software (BSW) and determines whether a runtime environment error (Rte Error) has occurred (606) using the return value of the runtime environment function (Rte function).
[0188] The architecture terminates the read operation on the corresponding block if it determines that a Runtime Environment Error (Rte Error) has occurred.
[0189] If the architecture determines that no runtime environment error (Rte Error) has occurred, it sets the read block execution check flag for individual blocks to ON (607).
[0190] The architecture determines whether the read block execution check flag for all individual blocks is on (608), and if it is determined that the read block execution check flag for all individual blocks is on, it initializes the flags so that a cycle can be performed by the next read command.
[0191] The flags initialized here may include flags for read commands and check flags for performing read blocks for individual blocks.
[0192] That is, the architecture can set the flag for the read command to off and the read block execution check flag for individual blocks to off (609).
[0193] The architecture performs a read operation on non-volatile memory in hardware after a read block service request, and when the read operation is completed, a completion function (NvM JobFinished) can be called from the BASIC software (BSW).
[0194] At this time, when the architecture is called by the completion function (NvM JobFinished) (610), it determines that the data reading operation is completed and determines whether the result of the data reading is successful (611).
[0195] If the architecture determines that data reading has failed, it requests the write block service from the BASIC software with the initial value of the corresponding individual block, and calls the write function (Rte_Write) to send the initial value to the application software (ASW).
[0196] When the architecture determines that data reading has been successful, it calls a read function (Rte_Write) to obtain the result of the read and transmits the obtained result to the application software (ASW, 110) (613), and determines whether a runtime environment error (Rte Error) has occurred using the return value of the runtime environment function (Rte function) (614).
[0197] The architecture can improve data reliability by verifying whether errors occur during data exchange in a step-by-step manner in a runtime environment.
[0198] If the architecture determines that a runtime environment error (Rte Error) has occurred, it calls the write function (Rte_Write) again.
[0199] If the architecture determines that no runtime environment error (Rte Error) has occurred, it initializes the individual block's write complete flag (WriteComplete Flag) to off (615).
[0200] The reason for initializing the flag at the time of completion of the read operation is that when two or more WriteBlock operations are performed, the result of the operation completion for the second WriteBlock service cannot be distinguished.
[0201] The following architecture checks the ReadComplete Flag of all individual blocks and determines whether the ReadComplete Flag of all individual blocks is on (616)), and if it is determined that the ReadComplete Flag of all individual blocks is on, sets all ReadComplete Flags to on (Set, 61).
[0202] By receiving feedback on the results after a service request in the non-volatile memory module, adding backup logic for failure, and checking whether the service of all blocks in the non-volatile memory module is executed normally, reliable data can be delivered to the application software (ASW).
[0203] The architecture can also re-perform the read operation in the event of a read failure.
[0204] In addition, if it is determined that an error has occurred in the runtime environment, it is also possible to call the Rte function again to re-evaluate whether an error has occurred.
[0205] In addition, the architecture can also execute the determination of whether an error has occurred a preset number of times.
[0206] Meanwhile, the disclosed embodiments may be implemented in the form of a recording medium that stores instructions executable by a computer. The instructions may be stored in the form of program code, and when executed by a processor, they may generate a program module to perform the operation of the disclosed embodiments. The recording medium may be implemented as a computer-readable recording medium.
[0207] Computer-readable recording media include all types of recording media that store instructions that can be decoded by a computer. Examples include ROM (Read Only Memory), RAM (Random Access Memory), magnetic tape, magnetic disk, flash memory, optical data storage devices, etc.
[0208] As described above, the disclosed embodiments have been explained with reference to the attached drawings. Those skilled in the art will understand that the present invention may be practiced in forms different from the disclosed embodiments without changing the technical concept or essential features of the present invention. The disclosed embodiments are illustrative and should not be interpreted restrictively. Explanation of the symbols
[0209] 100: Application Layer 200: Runtime Environment 300: Basic Software
Claims
Claim 1 An application software component (ASW) that performs an algorithm for at least one function and transmits and receives data within said algorithm; basic software (BSW) including a non-volatile memory management module (VnM) for managing non-volatile memory; and a state management software component that manages said non-volatile memory management module; An architecture for memory management comprising a runtime environment (RTE) that enables communication between the application software component (ASW) and the state management software component, and enables communication between the basic software (BSW) and the state management software component, wherein the state management software component terminates the read operation or the write operation when writing data to the non-volatile memory or reading data from the non-volatile memory if the number of reads is greater than or equal to a preset number or the number of writes is greater than or equal to a preset number, wherein when controlling the write operation, the state management software component requests an error status check service (Get Error Status) for an individual block from the non-volatile memory management module (311) of the basic software (BSW), determines whether the result of the error status check service (Get Error Status) is in a pending state, determines whether a runtime environment error has occurred using the return value of a runtime environment function during the process of requesting the error status check service, and if it is determined that the state is not in a pending state and no runtime environment error has occurred, requests a write block service (Write Block Service) with the read data as an argument to the non-volatile memory management module. Claim 2 In claim 1, the application software component (ASW) and the state management software component are an architecture for memory management provided in the application layer of an AUTOSAR-based platform. Claim 3 In claim 1, the state management software component controls the operation of reading data stored in the non-volatile memory when the vehicle is started and controls the operation of writing data to the non-volatile memory when the vehicle is started off, an architecture for memory management. Claim 4 An architecture for memory management according to claim 1, wherein the state management software component, when a write-on command is received, calls a pre-specified read function (Rte_Read) to read data to be written to the non-volatile memory from the application software component (ASW) and writes the read data to the non-volatile memory. Claim 5 In claim 4, the state management software component determines whether a runtime environment error occurs when reading the data through the runtime environment, and terminates the write operation if it is determined that the runtime environment error has occurred, an architecture for memory management. Claim 6 delete Claim 7 An architecture for memory management according to claim 1, wherein the state management software component determines whether the runtime environment error has occurred when the error status check service (Get Error Status) is requested, and terminates the write operation if it is determined that the runtime environment error has occurred. Claim 8 delete Claim 9 An architecture for memory management according to claim 1, wherein the state management software component determines whether a runtime environment error has occurred when requesting the Write Block Service, terminates the write operation if it is determined that a runtime environment error has occurred, and terminates the write operation if it is determined that the state is pending. Claim 10 An architecture for memory management according to claim 4, wherein the state management software component sets a flag to On for a block where writing to the read data is completed, and initializes the flag when data writing to all blocks of the non-volatile memory management module is completed. Claim 11 An architecture for memory management in which, in claim 1, the state management software component requests an error status check service (Get Error Status) from the non-volatile memory management module to check the status of individual blocks of the non-volatile memory management module when a read-on command is received. Claim 12 An architecture for memory management according to claim 11, wherein the state management software component determines whether the runtime environment error has occurred when the error status check service (Get Error Status) is requested, and terminates the read operation if it is determined that the runtime environment error has occurred. Claim 13 An architecture for memory management according to claim 12, wherein the state management software component, when controlling the read operation, determines whether the result of the error status check service (Get Error Status) is in a pending state, requests a read block service (Write Block Service) from the non-volatile memory management module if it is determined not to be in a pending state, and terminates the read operation if it is determined to be in a pending state. Claim 14 In claim 12, the state management software component determines whether the runtime environment error has occurred when requesting a write block service, and terminates the read operation if it is determined that the runtime environment error has occurred, an architecture for memory management. Claim 15 An architecture for memory management according to claim 11, wherein the state management software component sets a flag to On for a block for which data reading is completed, and initializes the flag when data reading for all blocks of the non-volatile memory management module is completed. Claim 16 An architecture for memory management according to claim 11, wherein when the read-on command is received, a pre-specified read function (Rte_Read) is called to transmit the read data to the application software component (ASW). Claim 17 In claim 16, the application software component is an architecture for memory management that receives data through a predetermined write function (Rte_Write) and performs writing on the received data.
Citation Information
Patent Citations
Application software component based on autosar
KR1020210029327A
Systems and methods for error detection and control for embedded memory and compute elements
KR1020210059651A
Data management in a data storage system
US20110082985A1
In-vehicle relay device, control program, and memory sharing method
US20200167307A1
