[Gem5] Important Folders/Files in Gem5 source

From users perspective, it is not necessary to know all of source files in gem5. We just need to know some important folders/files which we will modify to fit our CPU architecture.

To me, the folder "configs" is important, we should dig into it first to see some examples of sample configurations and you can create a configurations for your own.

Below are some important folders/files which I think that we should know before we modify it to make our own CPU:



  • configs - Simulation configuration scripts which are written in python, described in more detail later. The files in this directory help make writing configurations easier by providing some basic prepackaged functionality, and include a few examples which can be used directly or as a starting point for your own scripts.
  • src - gem5 source code.
    • arch - ISA implementations.
      • generic - Common files for use in other ISAs.
      • isa_parser.py - Parser that interprets ISA descriptions.
      • ISA directories - The files associated with the given ISA.
        • OS directories - Code for supporting an ISA/OS combination, generally in SE mode.
        • isa - ISA description files.
    • base - General data structures and facilities that could be useful for another project.
      • loader - Code for loading binaries and reading symbol tables.
      • stats - Code for keeping statistics and writing the data to a file or a database.
      • vnc - VNC support.
    • cpu - CPU models.
    • dev - Device models.
      • ISA directories - Device models specific to the given ISA
    • doxygen - Doxygen templates & output
    • kern - Operating system specific but architecture independent code (e.g. types of data structures).
      • OS directories - Code specific to the given simulated operating system.
    • mem - Memory system models and infrastructure.
      • cache - Code that implements a cache model in the classic memory system.
      • ruby - Code that implements the ruby memory model.
      • protocol - Ruby protocol definitions.
      • slicc - The slicc compiler.
    • python - Python code for configuration and higher level functions.
    • sim - Code that implements basic, fundamental simulator functionality.
  •  system - Low level software like firmware or bootloaders for use in simulated systems. 

Moreover, the folder named "tests" is also very important to help us understand how to configure the system, how to build and use some basic commands to interact with the CPU, build, etc...



No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...