home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / amiga / programm / 11471 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  1.2 KB

  1. Path: sparky!uunet!wupost!waikato.ac.nz!comp.vuw.ac.nz!actrix!templar!jbickers
  2. Newsgroups: comp.sys.amiga.programmer
  3. Subject: CPU cycles
  4. Message-ID: <jbickers.0bpc@templar.actrix.gen.nz>
  5. From: jbickers@templar.actrix.gen.nz (John Bickers)
  6. Date: 22 Jul 92 21:29:28 PST
  7. Organization: TAP, NZAmigaUG
  8. Lines: 18
  9.  
  10.     I'm having some difficulty working out the relationship between
  11.     CPU cycles and clock speed. I want to execute a routine at
  12.     something like 4000 times a second on a 25MHz 68030, so I've tried
  13.     to figure out how many cycles I'm allowed in the routine (by this
  14.     I mean CPU instruction cycles, as given in the back of an
  15.     assembler manual - ie: MOVEQ takes 4 cycles, etc).
  16.  
  17.     My routine takes around 2920 cycles, but it's only happening about
  18.     850 times a second. Multiplying the two tells me there's roughly
  19.     2,500,000 cycles a second, when I expected ten times that (25MHz).
  20.  
  21.     Can someone shed some light on this for me? Are the cycles given
  22.     for instructions some multiple of some other underlying cycle, or
  23.     have I lost my grip on arithmetic perhaps?
  24.  
  25. --
  26. *** John Bickers, TAP, NZAmigaUG.        jbickers@templar.actrix.gen.nz ***
  27. ***    "Radioactivity - It's in the air, for you and me" - Kraftwerk    ***
  28.