m2isar.backends.spike.plugin

Generate standalone Spike extensions for a deliberately bounded RV32/RV64 subset.

Attributes

logger

Exceptions

Unsupported

The model cannot be translated faithfully by this backend.

Classes

Translator

Functions

identifier(name)

is_pc_increment(block)

Recognize the base ISA's PC update, which Spike already performs.

generate_plugin(set_def[, custom_only, strict])

Return C++ source; warn and omit each unsupported instruction.

Module Contents

logger[source]
exception Unsupported[source]

Bases: ValueError

The model cannot be translated faithfully by this backend.

identifier(name)[source]
class Translator(instruction, xlen=32)[source]
instruction[source]
xlen = 32[source]
has_signed_operand(node)[source]

Conservatively detect signed values before C++ integer promotions.

expr(node)[source]
memory(mem, index)[source]
local_type(variable)[source]
local_value(variable, expression)[source]
statement(node)[source]
is_pc_increment(block)[source]

Recognize the base ISA’s PC update, which Spike already performs.

generate_plugin(set_def, custom_only=False, strict=False)[source]

Return C++ source; warn and omit each unsupported instruction.