usec timings

From: Bob Silverman (pubkeybreaker_at_aol.comstuff)
Date: 11/18/03


Date: 18 Nov 2003 22:43:35 GMT

Is there anything available under WINDOZE to do CPU timings at the
microsecond scale? Microsoft's libraries have a system clock call, but it
is only millsecond level timing.

Also, I am doing some loop timing studies on some CPU-intensive code.
What is strange is that the number of clock ticks being returned seems
ALWAYS to be near a multiple of 16. The code goes:

start = clock()
. loop
end = clock()
printf(....end - start)

It prints values like 0, 15, 16, 32, 63, etc. but never values
in-between.
Sometimes the same loop will be timed at 0 many times, then mysteriously
show up as 15 ticks. But it NEVER times at (say) 7 or 8 ticks. The ticks
are supposed to be 1/1000 sec.

This is being run on a system where no other user programs are running.
I could see a loop showing up as 0 as most of the time, then maybe some
small values other times (if, say, a system process kicked in behind the
scenes) but when you see 0,0,0,0,0,0,15,0,0,0,0,16,0,0,0,.... it makes one
wonder.

Comments? Ideas?

"You can lead a horse's ass to knowledge, but you can't make him think."



Relevant Pages

  • Re: Spartan 3 clock to output tristate timing
    ... I'm a stickler for well defined I/O constraints so I see shoddy engineering on the part of the FPGA group, ... The Timing Analyzer within the Xilinx tool suite has a section at the end that summarizes data input setup and hold times as well as clock-to-out for all the various signals. ... I believe the clock and clock edge are included as well. ... As long as the design doesn't budge, ...
    (comp.arch.fpga)
  • Re: Now on 8.2.03i Re: Xilinx ISE ver 8.2.02i is optimizing away and removing "redundant" logic -
    ... "input setup/hold time" is the time required before a clock edge to ... Setup time is the time for the signal to be stable prior to ... live in isolation it is connected to outside devices that may have timing ... the calling module and in the signals used in the submodule. ...
    (comp.arch.fpga)
  • Re: Newbie frustration
    ... Many times this symptom is a result of a timing violation. ... I need to generate an internal clock:( ... SHIFTp = 13; ... I am using the async FIFO core from Xilinx's coregen. ...
    (comp.arch.fpga)
  • Re: In defence of Austin and Xilinx
    ... Maximum acceptable jitter is specified in the data sheet but must also be considered *internal* to the device since a poor set of switching I/Os and/or improperly bypassed and distributed rails can affect the amount of jitter seen by the time it gets to the global clock routing. ... A single via can induce 50ps or more of deterministic jitter on a highspeed line, and we won't even get into proper termination or the dozens of other gotchas in timing budget analysis. ...
    (comp.arch.fpga)
  • Re: ddr clock issues
    ... case xilinx app notes say the timing is adequate so the DQS strobe isn't ... the logic made use of the DQS strobe from the DDR. ... clock that is doubled to run the DDR at 133 MHz. ... the delay in my DCM's to get reliable sampling. ...
    (comp.arch.fpga)