Advanced Search
    Zhao Ziwei, Tu Hang, Liu Qin, Li Li, Yu Tao. An Automated Code Generation of Instruction Set Implementation and Functional Testing for gem5[J]. Journal of Computer Research and Development, 2023, 60(7): 1678-1691. DOI: 10.7544/issn1000-1239.202220158
    Citation: Zhao Ziwei, Tu Hang, Liu Qin, Li Li, Yu Tao. An Automated Code Generation of Instruction Set Implementation and Functional Testing for gem5[J]. Journal of Computer Research and Development, 2023, 60(7): 1678-1691. DOI: 10.7544/issn1000-1239.202220158

    An Automated Code Generation of Instruction Set Implementation and Functional Testing for gem5

    • Computer system simulators are important tools for research and prototype development of embedded systems. For interpretation-based simulators, the decoding process of CPU models has an important effect on their performance. Therefore, improving the performance of the decoding process is one of the key problems of simulation efficiency. Besides, for instruction sets without a standard test suite (such as custom instructions), writing functional tests manually leads to low development efficiency. The instruction information required by functional tests is practically the same as the implementation of the decoding process. To solve the above problems, we propose a code generation method, which takes an instruction set description as input and outputs its implementation codes optimized for gem5 and its functional tests. Firstly, we extend the instruction set description language of gem5 and divide it into code description, function description, and test description. Secondly, we optimize the construction algorithm of decoding decision trees for gem5 and generate decoding codes, instruction codes, and functional test cases. Lastly, we take the Cortex-M3 instruction set as an example and compare our method with the original method of gem5. The total generation time is reduced by about 64%, the compiled executable code size is reduced by about 407 KB, the performance is improved by about 13%, and our method can improve the development efficiency.
    • loading

    Catalog

      Turn off MathJax
      Article Contents

      /

      DownLoad:  Full-Size Img  PowerPoint
      Return
      Return