Crates.io | narvie-processor |
lib.rs | narvie-processor |
version | 0.3.3 |
source | src |
created_at | 2019-03-28 08:30:17.257161 |
updated_at | 2019-05-10 15:24:59.805062 |
description | Run a simulation of the narvie processor |
homepage | https://github.com/physical-computation/narvie |
repository | https://github.com/physical-computation/narvie |
max_upload_size | |
id | 124303 |
size | 2,830,183 |
> narvie
A Read Eval Print Loop (REPL) for RISC-V instructions.
Only UNIX systems have been tested.
narvie
stands for native RISC-V instruction evaluator.
Either download a pre-built narvie binary (ubuntu linux, mac OS) or build using cargo:
$ cargo install narvie-cli
.narvie
can be run either as a simulation or by connecting a narvie
processor (running on an FPGA) to your computer.
Once the cli is running type RISC-V instructions into the prompt. Examples are nop
, li t0, 1678
, or addi t0, t0, 1
. narvie
will compile the instructions into binary, run them and display the new micro-architectural state (currently only the values of the registers are displayed). When done, use ctrl-c
to quit narvie
.
$ narvie-cli --simulate
.narvie
processor to your computer via usb run $ narvie-cli ADDRESS --baud 115200
where ADDRESS
is the serial port to which the processor is connected to. Replace 115200
with the baud rate that the processor is configured to use.narvie
To build narvie-cli
, verilator
is needed.
To synthesise the verilog and flash to an FPGA ./progMDP
uses yosys
, arachne-pnr
and icestorm
.
However, other tools can also be used for sythensis.
cargo build
to build narvie-cli
.processor
directory, run ./progMDP
to generate narvie-processor
's byte stream and to flash a lattice Mobile Development Board.This demo shows the RISC-V REPL running in a simulation.
As this project borrows GPL licensed code from other sources it too is licensed under the GPL.
The risc-v processor was implemented based on verilog modules developed by Ryan Voo @rjlv2. The only modifications made to the processor were related to breaking the pipeline and instruction fetch mechinisms to allow instructions to be executed individually.
The verilog UART modules can be found at https://github.com/FPGAwars/FPGA-peripherals.
The verilator UART simulator testbench code (testbench/uartsim.h
and testbench/uartsim.c
) are implemented based on http://zipcpu.com/blog/2017/06/21/looking-at-verilator.html.
narvie
will officially support current stable Rust only.
narvie
in researchHarry Sarson, Ryan Voo, and Phillip Stanley-Marbell. "Evaluating RISC-V Instructions Natively with Narvie". Poster, Proceedings of the European Conference on Systems (EuroSys'19). Dresden, Germany, March 2019.
BibTeX:
@inproceedings{Sarson:2019,
author = {Harry Sarson and Ryan Voo and Phillip Stanley-Marbell},
title = {Evaluating RISC-V Instructions Natively with Narvie},
booktitle = {Proceedings of the European Conference on Systems},
series = {EuroSys'19},
year = {2019},
location = {Dresden, Germany},
numpages = {2},
publisher = {ACM},
address = {New York, NY, USA},
}