Skip to content

RVFI CSR support #2335

@Timmmm

Description

@Timmmm

Is there a reason Ibex's RVFI interface doesn't support CSR writes? I'd like to add it so we can trace CSR writes.

Note there appear to be two different approaches:

  1. Give each supported CSR a wire.
  2. Use a vector of wires. Hard to tell what each index corresponds to.
  3. Use a 4096-element vector of wires!

That last one seems pretty mad. I think the first options is probably best given the relatively small number of CSRs that Ibex has. I'd probably put them in an interface to save wiring insanity. Something like:

struct rvfi_csr {
  logic [31:0] wdata;
  logic wvalid;
}

interface rvfi_csrs {
    rvfi_csr mstatus;
    rvfi_csr mcause;
    ...
}

I don't think there's any need to record CSR reads. I'm not aware of any with read side effects (seed almost is but you aren't allowed to only read it). Does that sound reasonable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions