Search tips

apple banana
Find rows that contain at least one of the two words.

+apple +juice
Find rows that contain both words.

+apple macintosh
Find rows that contain the word 'apple', but rank rows higher if they also contain 'macintosh'.

+apple -macintosh
Find rows that contain the word 'apple' but not 'macintosh'.

+apple ~macintosh
Find rows that contain the word 'apple', but if the row also contains the word 'macintosh', rate it lower than if row does not. This is "softer" than a search for '+apple -macintosh', for which the presence of 'macintosh' causes the row not to be returned at all.

+apple +(>turnover >strudel)
Find rows that contain the words 'apple' and 'turnover', or 'apple' and 'strudel' (in any order), but rank 'apple turnover' higher than 'apple strudel'.

Find rows that contain words such as 'apple', 'apples', 'applesauce', or 'applet'.

"some words"
Find rows that contain the exact phrase 'some words' (for example, rows that contain 'some words of wisdom' but not "some noise words").

By continuing to use this site you agree to the use of cookies. For more information and to find out how to change this click here. Accept Cookies
Please enable cookies in your browser for this website.
Advanced search

Reading or Writing a Block Takes a Long Time with MICROSAR Standard Fee

Last updated: 2018-07-12
In some cases, the MICROSAR Standard Fee needs a long time for reading or writing a block.
The physical characteristics of the flash technology require a dynamic memory allocation for the Fee. To organize the dynamic memory allocation, the MICROSAR Standard Fee uses so called chunks. A chunk can be seen like a container of a configurable number of instances of one Fee block. That means one chunk can contain one or more instances of a configured Fee block. How many instances of the same block the chunk contains, has to be configured for each Fee block via the parameter Number Of Instances In Chunk (/MICROSAR/Fee/FeeBlockConfiguration/FeeNumberOfChunkInstances).

In most cases a block is written many times before a sector switch has to be executed. That means there is more than one instance of a block in the data flash. If you want to read or write a block which already has more instances in the data flash, the first task of the Fee is to find the last (valid in case of reading) instance of the block. Searching begins with finding the newer sector. After that, the Fee reads the first address of the first chunk of the block, it checks if the management information of the first chunk is valid and if the first chunk has a chunk link. A chunk link is a pointer to the successor chunk, comparable to a linked list. If the chunk has a link to a successor chunk, the Fee checks the management information of this chunk and again checks whether this chunk has a successor chunk. The Fee must do this as long as a chunk is found without successor. For each step, checking management information or checking the link, an asynchronous read request to Fls is necessary.

If the Fee has found the last chunk without successor, it searches in this chunk for the last (valid in case of reading) instance. Searching in a chunk is done with a binary search algorithm. This is much faster than the cost intensive search by following the chunk links.

Many customer configurations did not change the configuration of the parameter Number Of Instances In Chunk (/MICROSAR/Fee/FeeBlockConfiguration/FeeNumberOfChunkInstances). The default value of this parameter is one. If a block has to be written, the searching of the last (valid) block is only done with the cost intensive search by following the chunk links. If the block is written many times since the last sector switch, the Fee must follow many links and that takes the long time. If the sector switch was executed, the number of links is reduced, often only the last valid chunk exists any more. Search time is much lower and will increase again to the next sector switch.

(Y-axis: time for each single write request. X-axis: number of write requests)

The picture above shows, how the time for writing a block increases due to the increased search effort for the last instance/next new empty instance to write to. After the sector switch, the time starts level again at the lowest. 

To optimize the search time, DaVinci Configurator Pro offers an optimization assistant for configuring the optimum Number Of Instances In Chunk for each Fee block. Optimization is done for each partition. As input, the assistant uses the Number of Write Cycles (/MICROSAR/Fee/FeeBlockConfiguration/FeeNumberOfWriteCycles) of each Fee block. Do not forget to configure the probable number of write cycles for each block during the lifetime of the ECU before starting the assistant. 

Article Options
Views: 797