Hi all,
Is there a way of determining the Instruction Cycle Count of a
statement in 8086 processors?I don't want to calculate the exact time
of a statement, I only want to measure how many cycles will a
statement take?For example fetch an instruction is 2 cycles and for
example moving a register to memory is 4 cycles...etc.Are there some
constraint values on specific statements?
Regards...
|
|
0
|
|
|
|
Reply
|
sumerc (48)
|
3/20/2007 10:57:29 AM |
|
"k3xji" <sumerc@gmail.com> writes:
> Is there a way of determining the Instruction Cycle Count of a
> statement in 8086 processors?I don't want to calculate the exact time
> of a statement, I only want to measure how many cycles will a
> statement take?For example fetch an instruction is 2 cycles and for
> example moving a register to memory is 4 cycles...etc.Are there some
> constraint values on specific statements?
Intel publishes a set of processor manuals that can help you
figure out, to a first approximation, how much time an
instruction takes.
--
"Writing is easy.
All you do is sit in front of a typewriter and open a vein."
--Walter Smith
|
|
0
|
|
|
|
Reply
|
Ben
|
3/20/2007 2:06:23 PM
|
|
On Tue, 20 Mar 2007 09:06:23 -0500, Ben Pfaff wrote
(in article <87ejnk80ww.fsf@blp.benpfaff.org>):
> "k3xji" <sumerc@gmail.com> writes:
>
>> Is there a way of determining the Instruction Cycle Count of a
>> statement in 8086 processors?I don't want to calculate the exact time
>> of a statement, I only want to measure how many cycles will a
>> statement take?For example fetch an instruction is 2 cycles and for
>> example moving a register to memory is 4 cycles...etc.Are there some
>> constraint values on specific statements?
>
> Intel publishes a set of processor manuals that can help you
> figure out, to a first approximation, how much time an
> instruction takes.
One note though, that is still going to be an approximation if you are
running a program on top of an operating system. The only way that
data will be useful for actual measurement instead of comparison is to
run code standalone with nothing interrupting it.
--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw
|
|
0
|
|
|
|
Reply
|
Randy
|
3/20/2007 4:17:53 PM
|
|
k3xji wrote:
> Is there a way of determining the Instruction Cycle Count of a
> statement in 8086 processors?
Do yuu mean the 8086 processor specifically, or are you thinking of any
processor in that extended family (including modern P4s and so on) ?
I'm very much not an expert, but as I understand it , it is almost
possible, for the 808x processors (assuming there are no interrupts, of
course), where only diivision and multiplication took times dependent
on their argument values. But as the 8086 processors morphed into the
IA32 family, and as that family grew more and more advanced, it becomes
less and less feasible to predict timings without knowing the exact
address sequences involved because of agressive cacheing, pipelining,
register aliasing, etc, etc.
FWIW, this page seems to have Intel's documentation on the i86
processors. I have read none of it myself (and plan on keeping it that
way ;-)
http://www.intel.com/design/intarch/intel186/docs_186.htm
-- chris
|
|
0
|
|
|
|
Reply
|
Chris
|
3/20/2007 5:47:42 PM
|
|
> Intel publishes a set of processor manuals that can help you
> figure out, to a first approximation, how much time an
> instruction takes.
I'm not sure it's still true, but it used to be that you could call
them and they'd send you a print copy. 3 or 4 very big books with
everything you've ever wanted to know about programming Intel
processors.
Michael
|
|
0
|
|
|
|
Reply
|
Michael
|
3/20/2007 8:20:05 PM
|
|
"Michael" <mchlgibs@aol.com> writes:
>> Intel publishes a set of processor manuals that can help you
>> figure out, to a first approximation, how much time an
>> instruction takes.
>
> I'm not sure it's still true, but it used to be that you could call
> them and they'd send you a print copy. 3 or 4 very big books with
> everything you've ever wanted to know about programming Intel
> processors.
The print copies weren't available for a while, but are now back
in print. I received a big box full of them sometime last year.
AMD does the same.
--
"A computer is a state machine.
Threads are for people who cant [sic] program state machines."
--Alan Cox
|
|
0
|
|
|
|
Reply
|
Ben
|
3/20/2007 8:28:39 PM
|
|
Chris Uppal wrote:
> k3xji wrote:
>
>> Is there a way of determining the Instruction Cycle Count of a
>> statement in 8086 processors?
>
> Do yuu mean the 8086 processor specifically, or are you thinking
> of any processor in that extended family (including modern P4s
> and so on) ?
On the pentium up there is an instruction that reads clock cycles,
something like rtdsc.
--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>
--
Posted via a free Usenet account from http://www.teranews.com
|
|
0
|
|
|
|
Reply
|
CBFalconer
|
3/21/2007 12:17:30 AM
|
|
On Tue, 20 Mar 2007 19:17:30 -0500, CBFalconer wrote
(in article <4600799A.186DD11F@yahoo.com>):
> Chris Uppal wrote:
>> k3xji wrote:
>>
>>> Is there a way of determining the Instruction Cycle Count of a
>>> statement in 8086 processors?
>>
>> Do yuu mean the 8086 processor specifically, or are you thinking
>> of any processor in that extended family (including modern P4s
>> and so on) ?
>
> On the pentium up there is an instruction that reads clock cycles,
> something like rtdsc.
It's fraught with potential errors though on SMP systems, as there is
no guarantee they'll be sync'd between the processors, so you may get
completely bogus or inaccurate results if your process gets bounced
from one CPU to another between calls.
--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw
|
|
0
|
|
|
|
Reply
|
Randy
|
3/21/2007 2:45:58 AM
|
|
|
7 Replies
434 Views
(page loaded in 1.572 seconds)
Similiar Articles: About instruction lea - comp.lang.asm.x86Instruction Cycle of a 8086 statement - comp.programming ... About instruction lea - comp.lang.asm.x86 Instruction Cycle of a 8086 statement - comp.programming ... timing an x86 instruction - comp.lang.asm.x86Instruction Cycle of a 8086 statement - comp.programming ... Instruction Cycle of a 8086 statement - comp.lang.asm.x86 ..... don't want to calculate the exact time of a sta... ... How can catch Illegal Istruction ? - comp.lang.asm.x86Instruction Cycle of a 8086 statement - comp.programming ... How can catch Illegal Istruction ? - comp.lang.asm.x86 Instruction Cycle of a 8086 statement - comp.programming ... How to calculate effective/average paged memory access time - comp ...Instruction Cycle of a 8086 statement - comp.programming ... How to calculate effective/average paged memory access time - comp ... Instruction Cycle of a 8086 statement ... How to calculate effective demand-paged memory access tmie - comp ...Instruction Cycle of a 8086 statement - comp.programming ..... Cycle Count of a statement in 8086 processors?I don't want to calculate the exact time of a sta... ... an ... Re: LEA instruction - comp.lang.asm.x86... the purpose of the LEA (load effective address) instruction ... Athlons and, at present, Opterons as well take 2 cycles ... programming game - comp.lang.asm.x86 ARobots - 8086 ... xchg & lock question - comp.lang.asm.x86... when a memory operand is used with the XCHG instruction, the ... 8086/8 and 8018Xs did not. > > > > You comment about ... implementation) interrupt an atomic RMW write cycle. '?'s in Rom Firmware Kernal dumps - comp.sys.cbm>> Your question was actually a statement of ... This probably true for the 8086 (which IIRC needed up to 70 cycles for a ... patterns than >> lowering the instruction cycle ... Fast bit-reverse on an x86? - comp.dsp> > Intel invented that instructions back in the 8086 days.. That's a ... zero you are concerned about, as stated each instance of the instruction took zero or one cycles. Does reloading CR3 with the same value flush the TLB? - comp.lang ...... com/~geezer/temp/tlb-test.asm I get different cycle ... This statement was omitted from the 486 and, as far as I ... i386 and i486 machines didn't have a tlb flush instruction ... Re: Instruction Cycle of a 8086 statement - Der Keiler CodingOn 21 Mar 2007 09:21:40 -0700, "Jim Leonard" <spamtrap@xxxxxxxxxx> wrote: On Mar 21, 8:20 am, NoS...@xxxxxxxxxxx (Bob Masta) wrote: Stringently documented, perhaps ... Instruction Cycle of a 8086 statement - Application Forum at ...Hi all, Is there a way of determining the Instruction Cycle Count of a statement in 8086 processors?I don't want to calculate the exact time of a 7/23/2012 12:17:02 PM
|