cv32e40p icon indicating copy to clipboard operation
cv32e40p copied to clipboard

Branch predictor in cv32e40p core will take more time.

Open Attaullah786 opened this issue 1 year ago • 8 comments

Screenshot from 2024-02-22 12-48-30 Screenshot from 2024-02-22 12-48-30

I integrated code of branch predictor in cv32e40p core and try to simulate hello world test in it but it will not give the tests also did not give the error.

Attaullah786 avatar Feb 22 '24 12:02 Attaullah786

Hi, You have to move cv32e40p directory somewhere else and use following option when launching make command: CV_CORE_PATH=<your path>/cv32e40p

pascalgouedo avatar Feb 22 '24 14:02 pascalgouedo

Hi @Attaullah786, did @pascalgouedo answer your question? If so, please close this Issue. If you do not comment within one week, this Issue will be closed.

MikeOpenHWGroup avatar Apr 17 '24 15:04 MikeOpenHWGroup

Thanks for your answer. When i run the hello world test there is no information about CPI for the test cases. Kindly give me insight about the test cases that gave clock cycles. Thanks

Attaullah786 avatar Apr 26 '24 17:04 Attaullah786

Hi @Attaullah786'

there is no information about CPI for the test cases

What do you mean by "CPI"?

Kindly give me insight about the test cases that gave clock cycles.

We have no testcases that track clock cycles and there is no function in the testbench that does this. We do not have any verification requirements to measure clock cycles, so this was not added. Why do you need it?

MikeOpenHWGroup avatar Apr 26 '24 20:04 MikeOpenHWGroup

Even if clock cycles are not useful for verification purpose, we do measure them in the benchmarks.

You can find a simple example of that in matmul_32b_int one.

pascalgouedo avatar Apr 27 '24 09:04 pascalgouedo

I implemented a dynamic w but branch predictor in cv32e40p core. Now I have to analyze whether the branch predictor reduced the execution time for some branch instructions or not. So I need that execution time. Is there any process in the core already to find it?

Attaullah786 avatar Apr 27 '24 10:04 Attaullah786

The CV32E40P implements the mcycle and minstret CSRs. Your test-program could query these.

MikeOpenHWGroup avatar Apr 29 '24 03:04 MikeOpenHWGroup

I implemented a dynamic w but branch predictor in cv32e40p core. Now I have to analyze whether the branch predictor reduced the execution time for some branch instructions or not. So I need that execution time. Is there any process in the core already to find it?

Already answered above with matmul_32b_int example. To characterize your branch predictor, I advise you to use Embench Iot 0.5 that you can launch on uvm test-bench.

pascalgouedo avatar Apr 29 '24 08:04 pascalgouedo