Article View: comp.sys.intel
Article #990Re: How do i determine the clock frequency on a 80xxx?
From: Rod Skinner
Date: Wed, 30 Sep 1992 03:48
Date: Wed, 30 Sep 1992 03:48
39 lines
2105 bytes
2105 bytes
In article <1992Sep30.012142.25740@nuscc.nus.sg> eletanjm@nuscc.nus.sg (TAN JIN MENG) writes: >schmke@cco.caltech.edu (Kevin Todd Schmidt) writes: >: 47@unpcs1.cs.unp.ac.za (menglund) writes: >: >: >I am wanting to know how to determine a machines clock frequency dynamically >: >within a program. (eg: 8MHz, 16MHz ect). >: >: The way I do it is to measure the time it takes to execute a big block >: of NOP's. You may need to loop around the block a few times to get >: an accurate measurement. Then, based on the number of NOP's executed >: you can calculate the clock speed since you know the number of clocks >: needed for a NOP to execute. >: >: If you have any questions let me know. >: >: Kevin >: -- >: Jet Propulsion Laboratory | schmke@cco.caltech.edu >: 4800 Oak Grove Dr. | schmidt@spc5.jpl.nasa.gov >: M/S 525-3684 | >: Pasadena, CA 91109 | > >I would think that with this method, you'd need to account for >external/internal cache also. > >One way, I suppose is to discard the first few iterations of the loop. > >Hmm? This assumes that the "big block of NOP's" is smaller than the size of the on-chip cache or even that matter the second level cache. Otherwise it won't matter if use or don't use the first iterations. Rod Skinner I speak for myself only. Intel Corp 3065 Bowers Avenue MS NW1-20 PH (408) 765-4474 Santa Clara, CA 95052 FAX (408) 765-4920
Technical Details
Message-ID:
<BvDH9I.I0y@inews.Intel.COM>Path:
arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!spool.mu.edu!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!swrinde!sdd.hp.com!uakari.primate.wisc.edu!ames!olivea!inews.Intel.COM!mipos2!rskinnerReferences:
<1aacqcINNhs@gap.caltech.edu> <1992Sep30.012142.25740@nuscc.nus.sg>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!spool.mu.edu!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!swrinde!sdd.hp.com!uakari.primate.wisc.edu!ames!olivea!inews.Intel.COM!mipos2!rskinner From: rskinner@mipos2.intel.com (Rod Skinner) Newsgroups: comp.sys.intel Subject: Re: How do i determine the clock frequency on a 80xxx? Message-ID: <BvDH9I.I0y@inews.Intel.COM> Date: 30 Sep 92 03:48:53 GMT References: <1aacqcINNhs@gap.caltech.edu> <1992Sep30.012142.25740@nuscc.nus.sg> Sender: news@inews.Intel.COM (USENET News System) Organization: Intel Corporation, Santa Clara, CA USA Lines: 39 Nntp-Posting-Host: mipos2