Giter VIP home page Giter VIP logo

ganoam / riscv-bitmanip Goto Github PK

View Code? Open in Web Editor NEW

This project forked from riscv/riscv-bitmanip

0.0 0.0 0.0 102.62 MB

Working draft of the proposed RISC-V Bitmanipulation extension

Home Page: https://github.com/riscv/riscv-bitmanip/blob/master/bitmanip-draft.pdf

TeX 0.52% Python 0.17% Shell 0.05% C++ 0.62% C 3.51% Makefile 0.08% Verilog 0.87% Assembly 93.58% Batchfile 0.01% SystemVerilog 0.01% Coq 0.57%

riscv-bitmanip's Introduction

RISC-V Bitmanip (Bit Manipulation) Extension

This is the repository for the RISC-V Foundations Bitmanip Extension working group.

NOTE: These RISC-V Bitmanip instructions are a work in progress. These instructions and their specification may change before being accepted as a standard by the RISC-V Foundation and so it is highly likely that implementations made using this draft specification will not conform to the future standard.

Specification

See bitmanip-0.92.pdf for a pre-built version of the PDF spec document. The source of the PDF specification is in the texsrc directory with a script (bitmanip.sh) to build the PDF.

Toolchain

See the tools directory for build scripts for a compiler toolchain with RISC-V Bitmanip support. See rvintrin.h for compiler intrinsics.

Test Suite

The tests directory contains a test suite for the toolchain and bitmanip instructions.

Verilog Reference

The verilog directory includes various Verilog reference implementations.

cproofs

The cproofs directory contains the reference C models and a few related formal proofs.


Imperas riscvOVPsim Reference Simulation

Included in this repository in the directory riscv-ovpsim is a version of the Imperas riscvOVPsim simulator that includes a full implementation of the RISC-V 32 & 64 Bit ISA specification and an implementation of these new bitmanip instructions.

To enable the new instructions, enable the B bit in the MISA register

riscvOVPsim.exe --override riscvOVPsim/cpu/add_Extensions=B

And in the log you will see it enabled, for example:

Info (Bit Manipulation) extB Version(0.92) November 08 2019

This simulation is instruction accurate, is provided as a pre-compiled binary, and the source of the new instructions in the model can be found in extB.c. If you want to make changes to the instructions, please contact the working group chair or Imperas.

NOTE the instruction behavior and decodes will change before they become part of the RISC-V open-standard ISA.

Building the Specification PDF

In order to produce the Specification pdf run the following command

$ make document

Issues or more information

Please add an issue to this repository or email the normal bitmanip working group alias.

Instruction Assembler Tests

Many assembly tests are included (asmtests) that provide directed and generated tests for the new instructions. There is a simple framework to run the tests and compare them with a golden logfile.

Building and Running the Instruction Assembler Tests

To start, you need to set up the search path to include the path to a RISCV Compiler, eg:

$ export PATH=${PATH}:/home/tools/riscv-none-embed/bin

Also, you need a variable to define the canonical compiler prefix, eg:

$ export RISCV_PREFIX=riscv-none-embed-

And then you run the tests:

$ make runtest

This process is self-checking, and will report a set of passing/failing tests at the end.

Clean Sandbox

To remove all generated files:

$ make clean

Enhancing supported instructions in the riscvOVPsim reference simulator

If you need changes to the instructions or want to make other additions or enhancements, please contact Imperas : [email protected]

riscv-bitmanip's People

Contributors

adshenoi avatar brucehoult avatar clairexen avatar cliffordwolf avatar eroom1966 avatar felixonmars avatar harrysarson avatar jasondavies avatar kdockser avatar markus-oberhumer avatar mithro avatar pdonahue-ventana avatar strake 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.