Giter VIP home page Giter VIP logo

cheri-cap-lib's Introduction

CHERI CAP LIB

The cheri-cap-lib repository provides an RTL API for CHERI capabilities, as well as a reference implementation of it. It aims to serve as a central implementation providing various wrappers to avoid the need for multiplicity of implementation efforts. This is particularly desirable when considering the verification work already spent and the overall tricky nature of the algorithms involved.

The explicit goal of CHERI CAP LIB is to provide a set of relatively low level operations to interact with CHERI capabilities, and allow the user to abstract away the specifics of the published capability format and its subsequent iterations as much as reasonably possible. Other implementations should easily be able to comply with the CHERI CAP LIB API. In particular, implementations exploring alterations to the underlying capability format will benefit from adhering to this API for easy integration with codebases already making use of the exisitng CHERI capability implementation. If some genuinely new behaviour is necessary, generalising the CHERI CAP API should be considered.

The CHERI CAP LIB API is here to guaranty that subtleties in capability manipulations are handled correctly. This means that direct bit manipulation on CHERI capabilities bypassing the provided functions are greatly discouraged as they will very easily lead to nonsense capabilities. For this reason, the CHERI CAP LIB API is more in the style of a set of accessors (java interface / haskell typeclass, etc…​) than in that of a simple struct-style interface with direct field manipulation. Again, this is deliberate and necessary to easily enforce well behaved capability manipulations.

Currently, the implementation of the API is in Bluespec System Verilog and wrappers are available in Verilog and Blarney.

Contents

1. The CHERI CAP LIB API

2. FuseSoC

cheri-cap-lib supports being used as a generator within FuseSoC. The scripts and cores for this are within the fusesoc directory, and the file cheri-cap-lib-test.core shows how a core can declare a dependency on and use the cheri-cap-lib generator.

The FuseSoC generator will generate Verilog modules for each of the functions in CHERICapWrap.bsv, as well as a SystemVerilog package and module to make working with these modules slightly simpler in SystemVerilog.

To generate both the 64bit and 128bit wrappers and packages, run fusesoc --cores-root . run --target test --setup ucam:cheri:cheri-cap-lib-test

The files will be generated in build/ucam_cheri_cheri-cap-lib-test_0/src/ucam_cheri_cheri-cap-lib-verilog-autogen-64_0/ and build/ucam_cheri_cheri-cap-lib-test_0/src/ucam_cheri_cheri-cap-lib-verilog-autogen-128_0/

These fusesoc cores and instructions work using fusesoc 0.3 as installed by running pip3 install -r python_requirements.txt within the OpenTitan GitHub repository as of commit https://github.com/lowRISC/opentitan/commit/2438b17afe4fef0d815be2e890763c288c449918

cheri-cap-lib's People

Contributors

peterrugg avatar gameboo avatar jonwoodruff avatar ivanmgribeiro avatar arichardson avatar dpgao avatar jrtc27 avatar swm11 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.