Skip to content

Clarify when mtvec.mode should be included in representability check #540

Open
@tomaird

Description

The description for mtvecc has the following:

Image

From these two highlighted sections, it's a bit unclear when writing to xtvecc whether the representability check should be done on

  1. mtvecc.address (including mode bits) - this is the address that is visible to SW
  2. OR {mtvecc.address[MXLEN-1:2], 2'b00} - this is the address that is actually jumped to (for non-vectored traps)
  3. OR both of the above

(Obviously when MODE=vectored we also do the representability check on {mtvecc.address[MXLEN-1:2], 2'b00} + 4 * HICAUSE - but that is more clear, since we're checking the maximum possible vector target is in range.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions