Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

TSC (Timer Stamp Counter) ?= Counter

Status
Not open for further replies.

davyzhu

Advanced Member level 1
Advanced Member level 1
Joined
May 23, 2004
Messages
494
Helped
5
Reputation
10
Reaction score
2
Trophy points
1,298
Location
oriental
Activity points
4,436
Hello all,

Is the TSC (Timer Stamp Counter) equal to normal Counter(only have a count up register and a reference register). The year/month/day/hour/minute/second/ms function is realized by TSC hardware or OS software?

How about the Linux's tick value, 1us or 1ms? And how to send the tick to the CPU, through a interrupt or others?

Can you give me some reference on this subject. Thanks!

DAVY
 

The time-stamp counter keeps an accurate count of every cycle that occurs on the processor. The Intel time-stamp counter is a 64-bit MSR (model specific register) that is incremented every clock cycle. On reset, the time-stamp counter is set to zero.

To access this counter, programmers can use the RDTSC (Read Time-Stamp Counter) instruction. This instruction loads the high-order 32 bits of the register into EDX, and the low-order 32 bits into EAX.

Time-stamp counter measures "cycles" and not "time". For example, two hundred million cycles on a 200 MHz processor is equivalent to one second of real time, while the same number of cycles on a 400 MHz processor is only one-half second of real time. Thus, comparing cycle counts only makes sense on processors of the same speed. To compare processors of different speeds, the cycle counts should be converted into time units, where:

# seconds = # cycles / frequency

Note: frequency is given in Hz, where: 1,000,000 Hz = 1 MHz

This means that the year/month/day/hour/minute/second/ms function has to be realized by software..
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top