# ssd-sim **Repository Path**: quentin_li/ssd-sim ## Basic Information - **Project Name**: ssd-sim - **Description**: SSD simulator - **Primary Language**: C++ - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 13 - **Created**: 2024-10-15 - **Last Updated**: 2024-10-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ssd-sim #### Description SSD simulator Build an open source SSD simulator software framework that can verify the functions and performance of a given FTL. 1. Supports simulation of various normal and abnormal SSD business scenarios 2. Supports configuration of various SSD parameters 3. Supports running on Host or Target machines 4. Support functional integrity verification 5. Support performance statistics #### Software Architecture Software architecture description The current thinking is as follows: The software as a whole can be roughly divided into 3 parts: 1. The runnable software simulator framework itself (ssd-sim) 2. Framework-compatible FTL input and output interface definitions 3. FTL software that implements the interface given in 2 above The current expectation is that any FTL software that implements a given interface can be verified by ssd-sim. #### Installation Currently only Linux environment is supported. ##### 1. Preparation Currently ssd-sim relies on C++11 and the "" library. Before starting to download ssd-sim, please make sure you have installed gcc/g++ 4.9 or higher. Currently ssd-sim uses "cmake" as its build system. Please install "cmake" version 3.10 or higher first. ##### 2. Download source code After installing "cmake" correctly, clone ssd-sim from Gitee. ``` git clone https://gitee.com/metastonecorp/ssd-sim.git cd ssd-sim ``` ##### 3. Build ssd-sim Once you have installed the necessary prerequisites and downloaded the source code, you can build ssd-sim. Use the following command in a terminal or command prompt: ``` mkdir build cd build cmake .. make -j 8 ``` After a successful build, the "ssd-sim" executable will be available in your current working directory. After completing these steps, you are now ready to run. For detailed instructions on how to execute the emulator, see the [Instructions](#instructions) section below. #### Instructions After performing the above build work, you can use the following command to start simulation: ``` ./ssd-sim -r -- ../config/sample.xml ../msctrl/config/sample.xml output/path ``` Execution of ssd-sim is very simple as all simulation options are defined in separate files. The first file (../config/sample.xml) defines the simulation parameter configuration. The second file (../msctrl/config/sample.xml) defines the SSD configuration. The final path (output/path) saves the output results. If the path does not exist, it needs to be created in advance. The log printout after the run is completed is similar to the following: ``` *** Statistics of Request Generator *** I/O mode: Async (depth: 32), I/O type: Seq. R/W Mix, blocksize: 4096 bytes Termination mode: I/O size based (size: 16777216 bytes) Tick: 342469038246 Time (ps): 8274219 - 342469038246 (342460764027) (342460.760064 us) I/O (bytes): 16777216 (48990.2 KB/s) I/O (counts): 4096 (Read: 2048, Write: 2048) *** End of statistics *** ``` #### Contribution 1. Fork the repository 2. Create Feat_xxx branch 3. Commit your code 4. Create Pull Request #### Gitee Feature 1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md 2. Gitee blog [blog.gitee.com](https://blog.gitee.com) 3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) 4. The most valuable open source project [GVP](https://gitee.com/gvp) 5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) 6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)