Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RDCYCLE definition #140

Closed
ilg-ul opened this issue Feb 27, 2018 · 2 comments
Closed

RDCYCLE definition #140

ilg-ul opened this issue Feb 27, 2018 · 2 comments

Comments

@ilg-ul
Copy link

ilg-ul commented Feb 27, 2018

The current definition in rv32.tex:1171 reads:

The RDCYCLE pseudoinstruction reads the low XLEN bits of the {\tt
cycle} CSR which holds a count of the number of clock cycles
executed by the processor core on which the hart is running from
an arbitrary start time in the past.

Given that a core may support multiple harts (1.1 "... A RISC-V- compatible core might support multiple RISC-V-compatible hardware threads, or harts, through multithreading."), is the RDCYCLE definition as the "number of clock cycles executed by the processor core" correct?

Or it should read "number of clock cycle executed by the current hart", to account for each hart going to sleep differently and possibly not counting cycles at all in deep sleep?

In other words, is the cycle counter unique to the core, or specific to a hart?

@kasanovic
Copy link
Collaborator

kasanovic commented Feb 27, 2018 via email

@ilg-ul
Copy link
Author

ilg-ul commented Feb 27, 2018

... It is per-core

ok, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants