mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Update csrc.sv
Program clean up
This commit is contained in:
parent
6aba0187d7
commit
a213f7d5a4
@ -90,9 +90,7 @@ module csrc import cvw::*; #(parameter cvw_t P) (
|
||||
assign CounterEvent[0] = 1'b1; // MCYCLE always increments
|
||||
assign CounterEvent[1] = 1'b0; // Counter 1 doesn't exist
|
||||
assign CounterEvent[2] = InstrValidNotFlushedM; // MINSTRET instructions retired
|
||||
if(P.QEMU) begin: cevent // No other performance counters in QEMU
|
||||
assign CounterEvent[P.COUNTERS-1:3] = 0;
|
||||
end else begin: cevent // User-defined counters
|
||||
if (P.ZIHPM_SUPPORTED) begin: cevent // User-defined counters
|
||||
assign CounterEvent[3] = InstrClassM[0] & InstrValidNotFlushedM; // branch instruction
|
||||
assign CounterEvent[4] = InstrClassM[1] & ~InstrClassM[2] & InstrValidNotFlushedM; // jump and not return instructions
|
||||
assign CounterEvent[5] = InstrClassM[2] & InstrValidNotFlushedM; // return instructions
|
||||
@ -119,6 +117,8 @@ module csrc import cvw::*; #(parameter cvw_t P) (
|
||||
assign CounterEvent[24] = DivBusyE | FDivBusyE; // division cycles *** RT: might need to be delay until the next cycle
|
||||
// coverage on
|
||||
assign CounterEvent[P.COUNTERS-1:25] = 0; // eventually give these sources, including FP instructions, I$/D$ misses, branches and mispredictions
|
||||
end else begin: cevent
|
||||
assign CounterEvent[P.COUNTERS-1:3] = 0;
|
||||
end
|
||||
|
||||
// Counter update and write logic
|
||||
|
Loading…
Reference in New Issue
Block a user