Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CanonicalMachine

Git Source

Title: Canonical Machine Constants Library

Defines several constants related to the reference implementation of the RISC-V machine that runs Linux, also known as the "Cartesi Machine".

State Variables

INPUT_MAX_SIZE

Maximum input size (64 kilobytes).

uint64 constant INPUT_MAX_SIZE = 1 << 16

LOG2_MEMORY_SIZE

Log2 of memory size.

uint8 constant LOG2_MEMORY_SIZE = 64

LOG2_MAX_OUTPUTS

Log2 of maximum number of outputs.

uint64 constant LOG2_MAX_OUTPUTS = EmulatorConstants.ROLLUP_LOG2_MAX_OUTPUT_COUNT

LOG2_DATA_BLOCK_SIZE

Log2 of data block size.

uint8 constant LOG2_DATA_BLOCK_SIZE = Memory.LOG2_LEAF

DATA_BLOCK_MASK

Data block mask.

uint64 constant DATA_BLOCK_MASK = Memory.LEAF_MASK

MEMORY_TREE_HEIGHT

Log2 of memory tree height.

uint8 constant MEMORY_TREE_HEIGHT = LOG2_MEMORY_SIZE - LOG2_DATA_BLOCK_SIZE

TX_BUFFER_START

TX buffer start.

uint64 constant TX_BUFFER_START = EmulatorConstants.AR_CMIO_TX_BUFFER_START

IFLAGS_Y_ADDRESS

Internal Y flag address.

uint64 constant IFLAGS_Y_ADDRESS = EmulatorConstants.IFLAGS_Y_ADDRESS

HTIF_TOHOST_ADDRESS

HTIF tohost address.

uint64 constant HTIF_TOHOST_ADDRESS = EmulatorConstants.HTIF_TOHOST_ADDRESS