Re: [PATCH] Add performance monitoring unit extension

Anup Patel

Hi Tommy,


Your suggestion looks good to me as well.


I will update to use counter_info[XLEN-1] as “counter type”.





From: tech-unixplatformspec@... <tech-unixplatformspec@...> On Behalf Of Tommy Thorn
Sent: 30 October 2020 05:10
To: Sean Anderson <seanga2@...>
Cc: Anup Patel <Anup.Patel@...>; tech-unixplatformspec@...; Atish Patra <Atish.Patra@...>; Al Stone <ahs3@...>
Subject: Re: [RISC-V] [tech-unixplatformspec] [PATCH] Add performance monitoring unit extension


+    counter_info[20] = Type (0 = HARDWARE and 1 = SOFTWARE)
+    counter_info[XLEN-1:21] = Reserved for future use
+If `counter_info.type == 0x1` then `counter_info.csr` should be ignored
+and `counter_info.width` is assumed to be XLEN.

Perhaps we should store the type in bit 31 to allow for easier


That wouldn’t help 64-bit targets much.  Did you mean bit XLEN-1?




Join to automatically receive all group messages.