1 Star 0 Fork 1

knightXun / hikelchip

forked from Artyom Liu / hikelchip 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

HiKelChip: A RV64I Implementation in Chisel

Author: Artyom Liu artyomliu@foxmail.com

Introduction

指揮官、わたしがいれば十分ですよ。 --That's the way to comfort the machine spirit *laugh*.

Let's be serious. HikelChip is a project for YSYX project, which is a project aiming to training young chip designers. In the project, each participant is asked to implement his/her own chip design, in ISA of RISC-V. The minimun goal is to support RISC-V I-extension and support simple interrupts like timer interrupt.

And HikelChip is my piece of work participanting in this project. It implements a full implementation of I-extension, and with Zicsr extension too. The chip uses a 5-stage classical implementation, with Fetch, Decode, Issue, Execute and Commit. The chip also implements an interface of standard AXI4 bus protocol, for connecting to peripherals outside the chip itself.

Thanks to the previous work of all YSYX project and Xiangshan project, a mechanic called "Difftest" is introduced in the debugging. With this certain mechanic, we can now connect our implementation to a standard software implementation of RISC-V. By comparing the commit stage of each instruction, bugs in chip design can be found more effeciently.

Prerequirements

To run the programs, with difftest, requires two more repos: NEMU and DRAMsim3. The previous one is meant to be standard implementation for Difftest, while the later one provides an software implementation of DRAM that can be accessed by AXI4 bus. Both these two repos can be cloned from github.

Once the repos are cloned onto local machine, you need to set two environment variables to help the building Makefile script to find the repos: DRAMSIM3_HOME and NEMU_HOME. Both pointing to the root path of relevant repo.

For simulation, we use verilator as the very tool. This is a tool that transfer the given HDL codes into a C++ class, and final build it into an executable file with the help of some user-implement C++ codes. In this sense, to "simulate" the design is to run the executable.

Diagram

MIT License Copyright (c) 2021 Artyom Liu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

“一生一芯”项目芯片前端设计,计划使用chisel编写 展开 收起
Scala
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Scala
1
https://gitee.com/knightXun/hikelchip.git
git@gitee.com:knightXun/hikelchip.git
knightXun
hikelchip
hikelchip
2021

搜索帮助