is there a way to program a counter in Intel assembly language to count the number of cycles after powerup?
From what I understand, I have a 2 gigz cpu so it cycles every .5 nanoseconds... but i have a project for a class where i need to actually count how many cycles has passed in the cpu but don't know how.
Program a Counter based on CPU speed
-
- Legit Extremist
- Posts: 847
- Joined: Mon Sep 03, 2007 2:47 am
Re: Program a Counter based on CPU speed
I figured I'd bump this because I'm really curious to know if there is a program that can work through dos, into the loading of windows and into windows and give you a result... I don't think there is a way, but if there is I'm interested to find out!
- dicecca112
- Site Admin
- Posts: 5014
- Joined: Mon Mar 01, 2004 10:40 am
- Contact:
Re: Program a Counter based on CPU speed
For one here guys, this is a home work assignment as stated by the original poster, so do not post the complete solution. Try to help him with hints. Its clearly cheating if you give him the answer. OP, have you gotten anywhere with the assignment? Is there something you don't understand that someone here could help you with?
Re: Program a Counter based on CPU speed
Well it's not a homework assignment but more of a project i decided to build for my undergraduate professor(i already graduated).
Yea i found out intel has a "time stamp counter" that counts every cycle and not instructions after it boots up and stores it into the registers.
Now i just have to find out how to get real time data from that register b/c i have an external circuit that i need to connect to one of the CPU pins and the minute the circuit sends that pin a voltage, i need the exact cycle from boot up.
Anyone have any ideas?
Yea i found out intel has a "time stamp counter" that counts every cycle and not instructions after it boots up and stores it into the registers.
Now i just have to find out how to get real time data from that register b/c i have an external circuit that i need to connect to one of the CPU pins and the minute the circuit sends that pin a voltage, i need the exact cycle from boot up.
Anyone have any ideas?
Re: Program a Counter based on CPU speed
Try contacting Intel's marketing department. Explain to them what you are trying to accomplish and you might get an answer.