# booksim2 **Repository Path**: zip0229/booksim2 ## Basic Information - **Project Name**: booksim2 - **Description**: SoC实验室Booksim仓库 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2022-06-30 - **Last Updated**: 2025-07-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: 外网仓库转存 ## README BookSim Interconnection Network Simulator ========================================= ## 一、概述 BookSim2.0 是一种cycle-accurate的片上互连网络仿真器,可以用来模拟片上互连网络的性能。BookSim2.0 基于C++语言开发,目前已经支持广泛的拓扑结构,如mesh、torus和flattened butterfly网络,提供了多种路由算法,包括许多定制网络路由器微架构的选项。 ## 二、文件结构 ```bash ├── assets ├── doc ├── netrace ├── runfiles ├── src ├── toturial └── utils ``` `assets/`:文档中的图片 `doc/`:原版的Booksim的说明书`manual.pdf`,配合Booksim使用的课本`Principles and Practices of Interconnection Networks.pdf` `netrace`:netrace工具,用于生成真实流量 `runfiles/`:一些配置文件 `src/`:项目的源代码 `toturial/`:教程案例文件 `utils/`:小工具,目前还没有用到 ## 三、编译与运行方法 ### 1. 依赖库的安装 ```bash sudo apt install doxygen-latex flex bison ``` ### 2. 编译 代码编译 ```bash cd ~/booksim2/src make ``` ### 3. 测试 在`/src`文件夹下 ```bash ./booksim examples/torus88 ``` 能够输出一些列命令行显示的仿真结果 ## 四、功耗和面积的仿真 在Booksim中,也具有一个建议的功耗仿真方案,其采用 `2007 International Technology Roadmap for Semiconductors (ITRS)`中的 `32nm` 工艺方案库 ```bash // 2007 ITRS predictions for a 32nm high-performance library H_INVD2 = 8;//int W_INVD2 = 3;//int H_DFQD1 = 8;//int W_DFQD1 = 16;//int H_ND2D1 = 8;//int W_ND2D1 = 3;//int H_SRAM = 8;//int W_SRAM = 6;//int Vdd = 0.9;//float R = 606.321;//float IoffSRAM = 0.00000032;//float // 70 C IoffP = 0.00000102;//float IoffN = 0.00000102;//float Cg_pwr = 0.000000000000000534;//float Cd_pwr = 0.000000000000000267;//float Cgdl = 0.0000000000000001068;//float Cg = 0.000000000000000534;//float Cd = 0.000000000000000267;//float LAMBDA = 0.016;//float MetalPitch = 0.000080;//float Rw = 0.720044;//float Cw_gnd = 0.000000000000267339;//float Cw_cpl = 0.000000000000267339;//float wire_length = 2.0;//float ``` ## 1.仿真命令 在仿真的配置文件中打开功耗和面积仿真,并且指定工艺文件`techfile.txt`的地址,例如在`mesh88_lat`中,在文件末尾添加 ```bash sim_power = 1; tech_file = power/techfile.txt; ``` ## 2.仿真运行及结果 在命令行中键入 ```bash ./booksim examples/mesh88_lat ``` 可以得到如下仿真结果 ![image-20231030145104968](./assets/image-20231030145104968.png)