Zcmt Extension

Versions

1.0.0
State

ratified

Ratification date

2023-04

Synopsis

Zcmt adds the table jump instructions and also adds the jvt CSR. The jvt CSR requires a state enable if Smstateen is implemented. See [csrs-jvt] for details.

This extension reuses some encodings from c.fsdsp. Therefore it is incompatible with [Zcd], which is included when C and D extensions are both present.

Zcmt is primarily targeted at embedded class CPUs due to implementation complexity. Additionally, it is not compatible with RVA profiles.

The Zcmt extension depends on the [Zca] and Zicsr extensions.

RV32 RV64 Mnemonic Instruction

yes

yes

cm.jt index

[insns-cm_jt]

yes

yes

cm.jalt index

[insns-cm_jalt]

Parameters

This extension has the following implementation options (AKA parameters):

HSTATEEN_JVT_TYPE

Type

string

Valid Values

[rw, read-only-0, read-only-1]

Description

Behavior of the hstateen0.JVT bit:

  • 'rw': read-write

  • 'read-only-0': read-only, fixed to 0

  • 'read-only-1': read-only, fixed to 1

JVT_BASE_MASK

Type

integer

Valid Values

64 to 0x7ffffffffffffff

Description

Mask representing the implemented bits of jvt.BASE. Includes the implicitly-zero bits of jvt.BASE, so JVT_BASE_MASK[5:0] must always be 0.

JVT_BASE_TYPE

Type

string

Valid Values

[mask, custom]

Description

Type of the jvt.BASE CSR field. One of:

  • mask: jvt.BASE contains one or more implemented bits, which are indicated by JVT_BASE_MASK.

  • custom: Custom behavior. Will cause hart to enter 'unpredictable' state on a write to jvt.BASE.

JVT_READ_ONLY

Type

boolean

Valid Values

boolean

Description

If Zcmt is implemented, JVT is implemented, but can contain a read-only value

MSTATEEN_JVT_TYPE

Type

string

Valid Values

[rw, read-only-0, read-only-1]

Description

Behavior of the mstateen0.JVT bit:

  • 'rw': read-write

  • 'read-only-0': read-only, fixed to 0

  • 'read-only-1': read-only, fixed to 1

SSTATEEN_JVT_TYPE

Type

string

Valid Values

[rw, read-only-0, read-only-1]

Description

Behavior of the sstateen0.JVT bit:

  • 'rw': read-write

  • 'read-only-0': read-only, fixed to 0

  • 'read-only-1': read-only, fixed to 1