• 0

Measuring durations in MicroBlaze on an Arty A7


Question

What is the recommended approach to measure durations in C code in MicroBlaze on an Arty A7? I would like to store a start time (like clock()) and compare it to an end time to calculate a duration. time.h, xtime_l.h, other? Thanks!

Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi @rehsd,

I believe xtime_l should work for you. Alternatively you can also add in an AXI timer or counter IP into your design which would give you that sort of functionality in your design.

Let me know if you have any questions.

Thanks,
JColvin

Link to post
Share on other sites
  • 0

Thanks, @JColvin. Can you tell me how to properly include it in my MicroBlaze project. When I add the include line and try to compile, I get the following.

../src/main.c:8:10: fatal error: xtime_l.h: No such file or directory
    8 | #include "xtime_l.h"
      |          ^~~~~~~~~~~
compilation terminated.

I found this article about adding libraries and paths, but my UI doesn't seem to have the same options.

image.thumb.png.1f33f2621be63ef1bac4bc1c6811a0bd.png

I have several versions of the files on my drive, but I'm not sure which one I should use.

image.thumb.png.a95bf689fa415bff2cf37c71953498aa.png

Possibly, xtime_l isn't supported on MicroBlaze?

Thank you!

Edited by rehsd
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now