Page 43 - 《软件学报》2025年第9期
P. 43

软件学报 ISSN 1000-9825, CODEN RUXUEW                                        E-mail: jos@iscas.ac.cn
                 2025,36(9):3954−3969 [doi: 10.13328/j.cnki.jos.007358] [CSTR: 32375.14.jos.007358]  http://www.jos.org.cn
                 ©中国科学院软件研究所版权所有.                                                          Tel: +86-10-62562563




                 Spike-FlexiCAS: 支持缓存架构灵活配置的 RISC-V 处理器模
                       *
                 拟器

                 韩金池  1,2 ,    王智栋  1,2 ,    马    浩  1,2 ,    宋    威  1,2

                 1
                  (网络空间安全防御重点实验室 (中国科学院 信息工程研究所), 北京 100195)
                 2
                  (中国科学院大学 网络空间安全学院, 北京 101408)
                 通信作者: 宋威, E-mail: songwei@iie.ac.cn

                 摘 要: 缓存模拟器在缓存架构探索和缓存侧信道研究中起着不可或缺的作用. Spike 作为                         RISC-V  指令集的标准
                 实现为基于    RISC-V  的缓存研究提供了完整的运行环境. 但           Spike 的缓存模型存在仿真粒度低, 与真实处理器的缓
                 存结构差异大等诸多问题. 为此, 修改和扩展              Spike  的缓存模型并取名为      FlexiCAS (flexible cache architectural
                 simulator), 修改后的  Spike 称为  Spike-FlexiCAS. FlexiCAS  能支持多种缓存架构, 具有灵活配置、易扩展等特点并
                 且可以对缓存特性       (如一致性协议以及实现方式) 进行任意的组合. 此外, FlexiCAS             还能不依赖     Spike 单独地对缓
                 存的行为进行模拟. 性能测试的结果表明, FlexiCAS            对比当前最快的执行驱动型模拟器 ZSim            的缓存模型具有明
                 显的性能优势.
                 关键词: 缓存架构; 缓存侧信道; RISC-V; 模拟器
                 中图法分类号: TP316

                 中文引用格式: 韩金池, 王智栋, 马浩, 宋威. Spike-FlexiCAS: 支持缓存架构灵活配置的 RISC-V 处理器模拟器. 软件学报, 2025,
                 36(9): 3954–3969. http://www.jos.org.cn/1000-9825/7358.htm
                 英文引用格式: Han  JC,  Wang  ZD,  Ma  H,  Song  W.  Spike-FlexiCAS:  RISC-V  Processor  Simulator  Supporting  Flexible  Cache
                 Architecture Configuration. Ruan Jian Xue Bao/Journal of Software, 2025, 36(9): 3954–3969 (in Chinese). http://www.jos.org.cn/1000-
                 9825/7358.htm
                 Spike-FlexiCAS: RISC-V Processor Simulator Supporting Flexible Cache Architecture
                 Configuration
                          1,2             1,2     1,2        1,2
                 HAN Jin-Chi , WANG Zhi-Dong , MA Hao , SONG Wei
                 1
                 (Key  Laboratory  of  Cyberspace  Security  Defense  (Institute  of  Information  Engineering,  Chinese  Academy  of  Sciences),  Beijing  100195,
                  China)
                 2
                 (School of Cyber Security, University of Chinese Academy of Sciences, Beijing 101408, China)
                 Abstract:  Cache  simulators  are  indispensable  tools  for  exploring  cache  architectures  and  researching  cache  side  channels.  Spike,  the
                 standard  implementation  of  the  RISC-V  instruction  set,  offers  a  comprehensive  environment  for  RISC-V-based  cache  research.  However,
                 its  cache  model  suffers  from  limitations,  such  as  low  simulation  granularity  and  notable  discrepancies  with  the  cache  structures  of  real
                 processors.  To  address  these  limitations,  this  study  introduces  flexible  cache  architectural  simulator  (FlexiCAS),  a  modified  and  extended
                 version  of  Spike’s  cache  model.  The  modified  simulator,  referred  to  as  Spike-FlexiCAS,  supports  a  wide  range  of  cache  architectures  with
                 flexible  configuration  and  easy  extensibility.  It  enables  arbitrary  combinations  of  cache  features,  including  coherence  protocols  and
                 implementation  methods.  In  addition,  FlexiCAS  can  simulate  cache  behavior  independently  of  Spike.  The  performance  evaluations


                 *    基金项目: 国家自然科学基金 (62172406); 中国科学院率先行动“百人计划”
                  本文由“RISC-V  系统软件及软硬协同技术”专题特约编辑武延军研究员、谢涛教授、侯锐研究员、张科正高级工程师、宋威副研究
                  员、邢明杰高级工程师推荐.
                  收稿时间: 2024-08-24; 修改时间: 2024-10-15, 2024-11-20; 采用时间: 2024-11-26; jos 在线出版时间: 2024-12-10
                  CNKI 网络首发时间: 2025-06-11
   38   39   40   41   42   43   44   45   46   47   48