minerva: A 32-bit RISC-V soft processor

栏目: IT技术 · 发布时间: 4年前

内容简介:Minerva is a CPU core that currently implements theMinerva currently requires Python 3.6+ andTo use Minerva in its minimal configuration, you need to wire the following ports to

Minerva

A 32-bit RISC-V soft processor

Minerva is a CPU core that currently implements the RISC-V RV32IM instruction set. Its microarchitecture is described in plain Python code using the nMigen toolbox.

Quick start

Minerva currently requires Python 3.6+ and nMigen on its master branch.

python setup.py install
python cli.py generate > minerva.v

To use Minerva in its minimal configuration, you need to wire the following ports to minerva_cpu :

clk
rst
ibus__*
dbus__*
external_interrupt
timer_interrupt
software_interrupt

Features

The microarchitecture of Minerva is largely inspired by the LatticeMico32 processor.

Minerva is pipelined on 6 stages:

  1. Address The address of the next instruction is calculated and sent to the instruction cache.
  2. Fetch The instruction is read from memory.
  3. Decode The instruction is decoded, and operands are either fetched from the register file or bypassed from the pipeline. Branches are predicted by the static branch predictor.
  4. Execute Simple instructions such as arithmetic and logical operations are completed at this stage.
  5. Memory More complicated instructions such as loads, stores and shifts require a second execution stage.
  6. Writeback Results produced by the instructions are written back to the register file.

minerva: A 32-bit RISC-V soft processor

The L1 data cache is coupled to a write buffer. Store transactions are in this case done to the write buffer instead of the data bus. This enables stores to proceed in one clock cycle if the buffer isn't full, without having to wait for the bus transaction to complete. Store transactions are then completed in the background as the write buffer gets emptied to the data bus.

Configuration

The following parameters can be used to configure the Minerva core.

Parameter Default value Description
reset_address 0x00000000 Reset vector address
with_icache False Enable the instruction cache
icache_nways 1 Number of ways in the instruction cache
icache_nlines 128 Number of lines in the instruction cache
icache_nwords 4 Number of words in a line of the instruction cache
icache_base 0x00000000 Base of the instruction cache address space
icache_limit 0x80000000 Limit of the instruction cache address space
with_dcache False Enable the data cache
dcache_nways 1 Number of ways in the data cache
dcache_nlines 128 Number of lines in the data cache
dcache_nwords 4 Number of words in a line of the data cache
dcache_base 0x00000000 Base of the data cache address space
dcache_limit 0x80000000 Limit of the data cache address space
with_muldiv False Enable RV32M support
with_debug False Enable the Debug Module
with_trigger False Enable the Trigger Module
nb_triggers 8 Number of triggers
with_rvfi False Enable the riscv-formal interface

Possible improvements

In no particular order:

  • RV64I
  • Floating Point Unit
  • Stateful branch prediction
  • MMU
  • ...

If you are interested in sponsoring new features or improvements, get in touch at contact [at] lambdaconcept.com .

License

Minerva is released under the permissive two-clause BSD license. See LICENSE file for full copyright and license information.


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

数码人类学

数码人类学

[英]丹尼尔·米勒、希瑟·A.霍斯特 / 王心远 / 人民出版社 / 2014-10 / 48.00元

人类学有两大任务,一是理解什么是人,二是理解人性是如何透过多元的文化表现出来。数码科技的蓬勃发展给这两者都带来了新的作用力。《数码人类学》向读者展示了人类与数码科技如何辩证地相互定义。最终我们试图得出一个结论,那便是“数码科技对人类到底意味着什么?” 从社交网站到数字化博物馆;从数字时代政治学到电子商务,浸润式的数码科技,给普通人的生活带来了根本性的改变。仅仅用数据来说明与理解问题显然过于太......一起来看看 《数码人类学》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具