Program a Counter based on CPU speed

Discussion about Intel CPUs and overclocking. Need help with that new Intel processor? Not sure which one is right for you? Like to void your warranty? This is the place for you! Please keep the topic on Intel Processors!
Post Reply
aqpham
Legit Little One
Legit Little One
Posts: 2
Joined: Sun Sep 06, 2009 8:48 pm

Program a Counter based on CPU speed

Post by aqpham »

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.
hercules71185
Legit Extremist
Legit Extremist
Posts: 847
Joined: Mon Sep 03, 2007 2:47 am

Re: Program a Counter based on CPU speed

Post by hercules71185 »

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!
User avatar
dicecca112
Site Admin
Site Admin
Posts: 5014
Joined: Mon Mar 01, 2004 10:40 am
Contact:

Re: Program a Counter based on CPU speed

Post by dicecca112 »

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?
Image
aqpham
Legit Little One
Legit Little One
Posts: 2
Joined: Sun Sep 06, 2009 8:48 pm

Re: Program a Counter based on CPU speed

Post by aqpham »

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?
User avatar
Major_A
Legit Extremist
Legit Extremist
Posts: 3793
Joined: Tue May 15, 2007 2:11 pm
Location: Houston, TX

Re: Program a Counter based on CPU speed

Post by Major_A »

Try contacting Intel's marketing department. Explain to them what you are trying to accomplish and you might get an answer.
Post Reply