Article View: comp.sys.intel
Article #989Re: How do i determine the clock frequency on a 80xxx?
From: TAN JIN MENG
Date: Wed, 30 Sep 1992 01:21
Date: Wed, 30 Sep 1992 01:21
27 lines
1378 bytes
1378 bytes
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?
Technical Details
Message-ID:
<1992Sep30.012142.25740@nuscc.nus.sg>Path:
arc1-ca.pugleaf.net!sparky!uunet!think.com!spool.mu.edu!yale.edu!jvnc.net!nuscc!eletanjmReferences:
<1aacqcINNhs@gap.caltech.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.intel Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!spool.mu.edu!yale.edu!jvnc.net!nuscc!eletanjm From: eletanjm@nuscc.nus.sg (TAN JIN MENG) Subject: Re: How do i determine the clock frequency on a 80xxx? Message-ID: <1992Sep30.012142.25740@nuscc.nus.sg> Organization: National University of Singapore References: <1aacqcINNhs@gap.caltech.edu> Date: Wed, 30 Sep 1992 01:21:42 GMT Lines: 27