ZenithalHourlyRate / vector

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vector

This is a RISC-V Vector RTL generator, supporting Zvl1024b,Zve32x extension for now. More documentation will be released after the first release.

Nix setup

We use nix flake to setup test environment. If you have not installed nix, install it following the guide, and enable flake following the wiki. For example:

Install with package manager e.g. on ArchLinux:

pacman -S nix

or with installation script:

sh <(curl -L https://nixos.org/nix/install)

Add flake to configurations:

echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf

Enable nix-daemon systemd service (if your package manager has not enabled it automatically):

systemctl start nix-daemon.service

After nix is installed, run nix develop to enter the development shell, all environment variables and dependencies is included. If you want a pure environment without system packages, use env -i nix develop instead.

Note on “I have no name” Problem

If you are using dynamic user, you may experience bash or other programs complaining about “I have no name” when entering nix shell. This is caused by that when nscd started inside nix environments for getent query, glibc will query nsswtich, but nss modules from outside nix is not visible to nix, causing glibc failing to find the user.

As a workaround, you can start nscd or nsncd outside nix environment, such as:

systemctl start nscd.service

or use nsncd in Arch Linux instead

paru -S nsncd-git
systemctl start nsncd.service

Test

We use spike for reference model. In nix development shell, run with mill -i 'tests.run[smoke.asm]' for a single test. The simulator record events of vector register file and memory load store to perform online difftest. The simulator use spike to emulate the RISC-V core, which means this vector generator doesn't provide a hart implementation.

Patches

About


Languages

Language:Scala 74.0%Language:C++ 12.7%Language:MLIR 5.9%Language:Python 3.1%Language:Nix 2.0%Language:C 1.1%Language:Assembly 1.0%Language:Makefile 0.3%