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”.

 

Regards,

Anup

 

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
branching?

 

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

 

Tommy

 

Join tech-unixplatformspec@lists.riscv.org to automatically receive all group messages.