r

rivet

@preview

Register / Instruction Visualizer & Explainer Tool, using CeTZ

v0.3.1
Apache-2.0

Package Information

Last Updated
Minimum Typst Version
0.13.1
Categories
visualization

1. Get the package

Download the package using the TPIX CLI:

tpix get @preview/rivet:0.3.1

2. Import in your Typst file

Add this to your .typ file:

#import "@preview/rivet:0.3.1": *

Version History

0.3.10.13.1
8057237ae348...
0.3.00.13.1
77ce3160dbc1...
0.2.00.13.0
053e67dd39da...
0.1.00.11.0
7715dce22212...

rivet-typst

RIVET (Register / Instruction Visualizer & Explainer Tool) is a Typst package for visualizing binary instructions or describing the contents of a register, using the CeTZ package.

It is based on the homonymous Python script

Examples

A black on white diagram showing the bit structure of a machine instruction, detailing operands, flags and selectors.
A bit of eveything
A white on blue diagram showing the bit structure of RISC-V memory instructions, detailing operands, flags and selectors.
RISC-V memory instructions (blueprint)

Click on the example image to jump to the code.

Usage

For more information, see the manual

To use this package, simply import schema from rivet and call schema.load to parse a schema description. Then use schema.render to render it, et voilà !

#import "@preview/rivet:0.3.1": schema
#let doc = schema.load(yaml("path/to/schema.yaml"))
#schema.render(doc)