Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] how to count clock cycles in microblaze(using ML510-virtex_5 FX130)

Status
Not open for further replies.

happylbd

Newbie level 6
Newbie level 6
Joined
May 22, 2010
Messages
11
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
china
Activity points
1,339
i'm working on microblaze to realize a multi_core platform on which i'm testing FFT,in order to calculate the speed up ratio,i need to know how many clock cycles it takes.
C code is used in microblaze ,i'm wondering if there is some specific function in C can calculate the clock cycles.
waiting for your help

THX:razz:
 

Re: how to count clock cycles in microblaze(using ML510-virtex_5 FX130)

i've found one way to figure it out.
let the EDK program be part of a ise project ,then count the time by a counter in verilog code.
but i found the clock cycles is not stable ,it changed every time i run the program
keep waiting for help
 

Re: how to count clock cycles in microblaze(using ML510-virtex_5 FX130)

You ca add a timer IP core and connect the processor clock to it. now, you should start it in the entry point of function and then stop it at exit point of function.
beaware the width of timer is important to prevent of overflow. the timer in the EDK is 32bit. if you function need more than 2^32 clcok cycles then you should modify this timer or add a prescaler.

Note: this method is not useful in multi thread enviroment.

another method is code profiling, you can see a sample of it in the xilinx white paper#348 (wp348).
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top