本文提出一种基于扩展控制流图(ECFG)的片上存储器(Scratch-Pad Memory,SPM)分配策略,该策略首先把程序划分为全局变量、全局堆栈、指令块等节点,用包含节点和节点间关系的ECFG来描述应用程序,接着采用考虑了节点间关系的改进的背包算法把选中的节点分配到SPM中.实验表明该策略比采用单纯背包算法的SPM分配策略减少应用程序执行时间11%,比不使用SPM时减少56%,大大提高了SoC存储子系统的性能.
A SPM memory allocation method were proposed based on extend control flow graph. This method transforms the application into a directed graph consisting of nodes and relationships of nodes. In succession, this method applies a refined Knapsack algorithm to solve the problem of SPM memory allocation.In the previous researches, these relationships of nodes are ignored, which result in a considerable expense of memory space during the process of SPM allocation. Our experiments show that our approach conduces to significant performance improvements ( 11% an average) compared to the previous.And the execution time of the application is reduced to 56 % compared to none SPM environment.