Giter VIP home page Giter VIP logo

zc-riscv-core's Introduction

ZC RISCV CORE

一个支持rv32im Zicsr Zifence指令集的处理器核,支持itcm和dtcm,实现了csr,支持外部中断,软件中断,计时器中断信号。

3级流水线:取指,译码/执行,回写。

取指:采用2bit预测器,jal直接跳转,bxx预测跳转,bht由来自写回阶段的预测修正单元维护。

译码/执行:译码和执行指令,访存指令这一阶段直接由lsu_agu发从给itcm或dtcm,乘除法指令由mdu进行执行,乘法采用booth4算法,除法采用srt4算法,最多16个周期 计算出结果,执行过程中,若出现冲突,由停顿单元处理。

写回:将未错误指令结果写至寄存器,eiu单元处理中断和异常和一些系统指令,预测修正单元处理预测的结果,并产生冲刷和冲刷地址由冲刷单元送给整个处理器核。乘除法 指令优先写回。

isa中为由riscv-tests而得到的测试程序,直接读入itcm就能验证了。

邮箱:[email protected]

A processor core supporting rv32im Zicsr Zifence instruction set, supporting ITCM and dtcm, realizing CSR, supporting external interrupt, software interrupt and TIME interrupt signal.

3 stage pipeline: fetch, decode / execute, write back.

IF: using 2 bit predictor, JAL directly jumps, Bxx predicts jumps, BHT is maintained by prediction correction unit in self write back stage.

Decoding / execution: decoding and executing instructions, memory access instructions are directly sent from LSU AGU to ITCM or dtcm, multiplication and division instructions are executed by MDU, booth4 algorithm is used for multiplication, SRT4 algorithm is used for division, and the results are calculated in 16 cycles at most. In the process of execution, if there is conflict, it is handled by pause unit.

Write back: write the result of error free instruction to the register, EIU unit processes interrupts and exceptions and some system instructions, predicts the predicted result of correction unit, and generates scour and scour address, which is sent to the whole processor core by scour unit. The multiply divide instruction takes precedence over write back.

In ISA, the test program obtained by riscv tests can be verified by directly reading into ITCM.

zc-riscv-core's People

Contributors

wzc810049078 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.