Welcome, Guest. Please login or register.

Author Topic: What's the Amos CPU's Mhz procedure?  (Read 1717 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16881
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: What's the Amos CPU's Mhz procedure?
« on: November 06, 2006, 12:40:17 PM »
No idea about AMOS, but a common trick is to simply time how long it takes to perform a loop of NOP instructions. Each CPU has different timings for NOP (and the loop timing itself will differ from CPU to CPU but in a quantifiable way) and use that to estimate the speed. You'll have to study the actual performance timings for each CPU to know exactly how long your loop ought to take and time a sufficiently large number of iterations.

I'm sure there are better ways.
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16881
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: What's the Amos CPU's Mhz procedure?
« Reply #1 on: November 06, 2006, 02:55:40 PM »
@Piru

Quote
On 68000 and 68010 other parts of the system can slow down the execution of the timing loop, and thus give unreliable results.


Let me guess - lack of instruction cache and subsequent dependency on accessing the memory bus to read the instructions, right?
int p; // A