ISSN1006-7167CN31-1707/TRESEARCHANDEXPLORATIONINLABORATORY第41卷第12期Vol.41No.122022年12月Dec.2022DOI:10.19927/j.cnki.syyt.2022.12.008基于RISC-V架构的中断实验设计冯建文(杭州电子科技大学计算机学院,杭州310018)摘要:中断处理是CPU的重要功能,中断原理与设计是计算机组成原理课程的学习难点。基于多周期RISC-V架构,设计了一个功能精简、原理深入的中断实验,实现了能处理单重可屏蔽外部中断的CPU。分析了RISC-V中断机制,为中断CPU设计了一个简单的中断控制器。目标指令集包含8条RV32I基本指令和5条中断相关指令。构造了中断模型机的系统结构,分析了各条指令的数据通路和执行过程,最后基于FPGA完成了设计、仿真测试和板级验证。关键词:中断实验;RISC-V架构;多周期CPU中图分类号:TP306文献标志码:A文章编号:1006-7167(2022)12-0034-05InterruptExperimentDesignBasedonRISC-VArchitectureFENGJianwen(SchoolofComputerScienceandTechnology,HangzhouDianziUniversity,Hangzhou310018,China)Abstract:InterruptprocessingisanimportantfunctionofCPU,andinterruptprincipleanddesignarethedifficultiesinthecourseofcomputercompositionprinciple.Basedonmulti-cycleRISC-Varchitecture,aninterruptexperimentwithsimplifiedfunctionsandadvancedprinciplesisdesigned,andaCPUthatcanhandlesinglemaskableexternalinterruptisrealized.RISC-Vinterruptmechanismisanalyzed,andasimpleinterruptcontrollerisdesignedforinterruptCPU.Thetargetinstructionsetcontains8RV32Ibasicinstructionsand5interruptrelatedinstructions.Thesystemstructureofinterruptmodelmachineisconstructed,andthedatapathandexecutionprocessofeachinstructionareanalyzed.Finally,thedesignandimplementation,simulationtestandboardlevelverificationarecompletedbasedonFPGA.Keywords:interruptexperiment;RISC-Varchitecture;multi-cycleCPU收稿日期:2022-05-18基金项目:国家级一流本科课程项目(教高函[2020]8号);浙江省课程思政示范课程项目(浙教函[2021]47号);浙江省高等教育“十三五”教学改革研究项目(jg20190167)作者简介:冯建文(1971-),女,河南汝南人,教授,现主要从事嵌入式系统研究。Tel.:18167103516;E-mail:fengjianwen@hdu.edu.cn0引言RISC-V架构以其开源特性和优越的性能,在...