ISPSim


1.  Overview

ISPSim represents a cutting-edge, cycle-accurate, system-level computer architecture simulator, specializing in architectural designs employing phase-change memory (PCM). Given the current unknown and ever-evolving state of PCM technology, ISPSim was strategically engineered as a flexible research tool, accommodating the exploration of varying memory controller configurations, diverse interconnect architectures, and a plethora of organizational schemas.

In a similar vein to esteemed simulators such as Gem5, SimpleSSD, and NVMain, ISPSim is built upon a foundation of precision and adaptability. However, it distinguishes itself through its concentrated focus on PCM, addressing a vital niche within the broader field of computer architecture simulation. This focus on PCM, a potential candidate for next-generation non-volatile memory technologies, ensures ISPSim's relevance in ongoing research and future advancements.

ISPSim's flexibility provides researchers with a virtual playground, enabling the realization of different memory controller models, the design and testing of various interconnect structures, as well as facilitating the experimentation with multiple organizational paradigms. By catering to such a broad range of research interests, ISPSim will emerge as a versatile and potent tool for anyone vested in the evolution and understanding of PCM and its role in contemporary and future computing systems.



2.  Building ISPSim

ISPSim is a flexible tool that can be constructed either as a standalone executable facilitating trace-based simulations or it can be seamlessly integrated with a CPU simulator to provide an immersive full-system simulation experience.

      a.  Trace Simulation

 

To build the trace simulation, the 'scons' build system is employed. Execute the following command:

$ scons --build-type=[fast|debug|prof]

 

Building via 'scons' will automatically configure the required compile flags for trace-based simulation. Select the 'build-type' based on your need:

      b.  Simulator-Integrated Simulation

 

Operating ISPSim in conjunction with a simulator will depend on the specific simulator utilized. Please refer to the 'patches' directory, which houses a separate directory for each of the supported simulators.

      c.  gem5 (mercurial):

 

Should you be working with a version of gem5 cloned from the following repository: https://gem5.googlesource.com/public/gem5, further instructions will follow on how to proceed with integration.



3.  Running ISPSim

ISPSim can be run on the command line with trace-based simulation via:

$ ./ispsim CONFIG_FILE TRACE_FILE [Cycles [PARAM=value]]


The CONFIG_FILE is the path to the configuration file for the memory system being simulated. The TRACE_FILE is the path to the trace file with the memory request to simulate. Cycles are optional and specify the max number of cycles to simulate. By default, the entire trace file is simulated. This is equivalent to providing "0" as the value for Cycles. Additionally, CONFIG_FILE parameters can be overridden using PARAM=value, for example, adding "MEM_CTL=FRFCFS" to the command line will override the value for MEM_CTL in the configuration file.


Various trace formats are supported, such as "ProtocolTrace" traces from gem5 or ISPSim traces which contain the minimum amount of information needed to simulate a request. ISPSim traces are recommended. Traces can be generated by running gem5 with the print trace.config configuration file. The ISPSim trace format prints the previous and new value of data being written to memory to allow for the simulation of MLC NVMs and data encoding techniques which require knowing which data bits are changing.


For gem5, simulation is set up using Python scripts. ISPSim only patches gem5 to recognize command line options for ISPSim. The example scripts provided with gem5 can be used:

$ configs/example/se.py - Run in SE mode configs/example/fs.py - Run in FS mode


When running gem5, the parameter --mem-type=NVMainMemory must be used to enable ISPSim. The option --nvmain-config must be used to specify the NVMain configuration file.

Below is an example command line:


$ gem5.fast config/example/se.py -c hello_world \

--mem-type=NVMainMemory  --caches \

--l2cache --l1i_size 32kB \

--l1d_size 32kB --l2_size 2MB \



4.  How to start with ISPSim

At first, pull the ISPSim docker image from the docker hub by entering the command below:

$ docker pull wjdgns3758/idealab_ispsim:latest


Second, create a docker container for you to work with:

$ docker run -itd --name [container_name] wjdgns3758/idealab_ispsim:latest /bin/bash


Third, attach the container:

$ docker attach [container_name]


Change current directory:

$ cd ../ispsim-fullsystem


Run tmux to simultaneously view the activities of the main command line and the emulated full system simulation:

$ tmux

$ [ctrl] + b + %


Put this command1 to the main command line, and command2 to the other command line:

$ sh fs_command_x86.sh (command1)

$ telnet 127.0.0.1 3456 (command2)


Then, you can see the full-system simulation is working