package libsail

  1. Overview
  2. Docs
Sail is a language for describing the instruction semantics of processors

Install

dune-project
 Dependency

Authors

Maintainers

Sources

sail-0.20.3.tbz
sha256=0b223ed83f521ad87eaacd88186390fbaf0b944f63c6a04a3ebdf96a1ff5a60c
sha512=83298218175c7a9ff7f0a304021287a2b9c20523cb16e1b8bf0ede81fa8e256a32b309626bc1553a5b46d68e44821524c27a5de0fb2f2d7f013025f61ce76519

doc/libsail/Libsail/Bitfield/index.html

Module Libsail.BitfieldSource

Create an L-expression for setting the bits of a bitfield defined by an index_range type.

Create an L-expression for setting all the bits of a bitfield

Create an expression converting the given expression from a bitfield to a bitvector

Sourceval construct_bitfield_exp : Ast.id -> Ast_util.uannot Ast.exp -> Ast_util.uannot Ast.exp

Create an expression converting the given expression from a bitvector to a bitfield

Sourceval construct_bitfield_struct : Ast.id -> Ast_util.uannot Ast.exp -> Ast_util.uannot Ast.exp

Create an expression converting the given expression from a bitvector to a bitfield, but using a struct expression rather than a constructor function

Sourcetype field_accessor_ids = {
  1. get : Ast.id;
  2. set : Ast.id;
  3. update : Ast.id;
  4. overload : Ast.id;
}
Sourceval field_accessor_ids : Ast.id -> Ast.id -> field_accessor_ids

The macro function generates multiple definitions to get, set, and update fields, so we can use this function to find the names of those functions in a consistent way.

Bitfields work a bit like a macro, which generate a struct wrapper around a simple bitvector type, along with a host of accessor functions.