Skip to content

Sscofpmf depends on a way to increment a mhpmcounter. #1733

Description

Sscofpmf has a behavior that xip.LCOFIP is set when a hpmcounter overflows. This is tricky to test because the counter incrementing depends on mhpmevent and on platform-specific behavior of the counters.

I don’t see any Sail code that increments any mhpmcounter

https://github.com/riscv/sail-riscv/blob/master/model/extensions/Zihpm/zihpm.sail

Is there a way in Sail to cause a counter to increment and cause xip.LCOFIP to rise in response?
If not, could this be added so there is a deterministic way to exercise LCOFIP?

For example, if mhpmevent3[31:0] = 1, mhpcounter3 could increment every time an instruction retires.

Metadata

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