Round Corner
Department of Computer and Information Science


Software defined memory

Non-functional properties of computer systems, such as runtime and energy consumption. are becoming increasingly unpredictable due to the introduction of memory hierarchy levels and, especially, complex caches.

A predictable alternative to caches is the use of small, fast and efficient software-managed on-chip memories, so-called scratchpad memories (SPMs) or tightly-couple memories (TCMs) [1]. Like caches, these memories are used to store commonly accessed code and data. In contrast to caches, the contents of SPMs are defined by software. This allows a SPM content management algorithm to copy relevant contents from and to main memory as required.

SPM management also allows to implement additional features. For example, data in main memory can be compressed or encrypted on demand. Another possible feature would be to implement selective redundancy by storing data in main memory using software-based ECC codes [2] or other methods of redundancy to protect data against main memory errors.

Your task will be to design and implement a framework for SPM data management that is able to execute this additional functionality on demand, e.g. as defined by static compiler analyses. The platform will be a typical high-end microcontroller system, e.g. ARM Cortex-M7/M33 or RISC V-based. Interesting challenges in this project will be to handle changing addresses for statically (global) as well as dynamically allocated (stack) data [3] and to ensure data consistency when data is moved between main memory and the SPM while a program runs.

Useful prerequisites for working on this project are experience with C/C++ programming, some background in computer architecture/assembler programming, and basics of compilers. Embedded systems experience and experience with open-source compiler toolchains (clang/LLVM) is not required but would be beneficial.

[1] R. Banakar, S. Steinke, Bo-Sik Lee, M. Balakrishnan and P. Marwedel, Scratchpad memory: a design alternative for cache on-chip memory in embedded systems, Proceedings of the Tenth International Symposium on Hardware/Software Codesign. CODES 2002.

[2] P. P. Shirvani, N. R. Saxena and E. J. McCluskey, "Software-implemented EDAC protection against SEUs," in IEEE Transactions on Reliability, vol. 49, no. 3, pp. 273-284, Sept 2000.

[3] Nghi Nguyen, Angel Dominguez, and Rajeev Barua. 2009. Memory allocation for embedded systems with a compile-time-unknown scratch-pad size. ACM Trans. Embed. Comput. Syst. 8, 3.


Michael Engel Michael Engel
Associate Professor
417 IT-bygget
735 93440 
NTNU logo