mscratch

Machine Scratch Register

Scratch register for software use. Bits are not interpreted by hardware.

Attributes

Defining Extension

  • Sm, version >= 0

CSR Address

0x340

Length

32 when CSR[misa].MXL == 0 64 when CSR[misa].MXL == 1

Privilege Mode

M

Format

This CSR format changes dynamically.

mscratch Format when CSR[misa].MXL == 0
Figure 1. mscratch Format when CSR[misa].MXL == 0
mscratch Format when CSR[misa].MXL == 1
Figure 2. mscratch Format when CSR[misa].MXL == 1

Field Summary

Name Location Type Reset Value

mscratch.SCRATCH

* 31:0 when CSR[misa].MXL == 0 * 63:0 when CSR[misa].MXL == 1

RW

0

Fields

SCRATCH

Location
  • 31:0 when CSR[misa].MXL == 0

  • 63:0 when CSR[misa].MXL == 1

Description

Scratch value

Type

RW

Reset value

0