[net.micro.68k] 68000 CPU clock cycles

rwhilchie@watnot.UUCP (rwhilchie) (03/20/86)

Does anyone out there on the net have any information on the number of
CPU cycles each instruction of the 68000 uses? I have the the books
"68000 Assembly Language Programming" by Gerry Kane, Doug Hawkins, and
Lance Leventhal; and "68000 Microprocessor Handbook" by Gerry Kane. Each
book contains in Appendix B a table listing the CPU cycles.  The following are
typical entries in the "Clock Cycles" column:

		MOVE.L	data32,Dn	12(3/0)
		BCS	label		10,18(1/0)

Does anyone know what the two numbers inside the parenthesis mean?
Any help would be appreciated.

				Robert Hilchie 
				Norman Wong.
				ihnp4!watmath!watnot!rwhilchie

dvadura@watdaisy.UUCP (Dennis Vadura) (03/21/86)

In article <11637@watnot.UUCP> rwhilchie@watnot.UUCP () writes:
>Does anyone out there on the net have any information on the number of
>CPU cycles each instruction of the 68000 uses? I have the the books
>		MOVE.L	data32,Dn	12(3/0)
>		BCS	label		10,18(1/0)
>
>Does anyone know what the two numbers inside the parenthesis mean?

From the Motorola MC68000 users manual the numbers in parentheses indicate
the number of read and write cylcles (r/w) included in the cpu cycle count.
I imagine any book that you have took this information directly from the
manual and does match for the instructions you give.  Although the
count for BCS seems to be wrong for branch not taken my manual says it's
12 cycles instead of 18.


-- 
--------------------------------------------------------------------------------
Dennis Vadura, Computer Science Dept., University of Waterloo

UUCP:  {ihnp4|allegra|utzoo|utcsri}!watmath!watdaisy!dvadura
================================================================================

sitze@rruxu.UUCP (R Sitze) (03/21/86)

	The numbers in parens have something to do with
	memory read/write cycles..

greg@utcsri.UUCP (Gregory Smith) (03/21/86)

In article <11637@watnot.UUCP> rwhilchie@watnot.UUCP () writes:
>Does anyone out there on the net have any information on the number of
>CPU cycles each instruction of the 68000 uses? I have the the books
>"68000 Assembly Language Programming" by Gerry Kane, Doug Hawkins, and
>Lance Leventhal; and "68000 Microprocessor Handbook" by Gerry Kane. Each
>book contains in Appendix B a table listing the CPU cycles.  The following are
>typical entries in the "Clock Cycles" column:
>
>		MOVE.L	data32,Dn	12(3/0)
>		BCS	label		10,18(1/0)
>
>Does anyone know what the two numbers inside the parenthesis mean?
>Any help would be appreciated.

The first is the number of memory 'read' cycles, and the second is the
number of write cycles. This is required because the number before the
()'s assumes 4 clock cycles per memory cycle. If your computer uses, say,
5 clock cycles for a read and 6 for a write, you have to add twice the
number of writes, and the number of reads, to allow for this. This may not
be accurate, though, because of pipelining.

We aren't writing TIMING LOOPS, now are we??? :-)

P.S. I have	BCS	label	is 10(2,0) if branch taken, 8(1,0) if not.
( for an 8-bit offset ). I believe the 2 reads for a one-word instruction
( when branch taken ) is to allow for the wasted pre-fetch of the next
instruction word.

-- 
"No eternal reward will forgive us now for wasting the dawn" -J. Morrison
----------------------------------------------------------------------
Greg Smith     University of Toronto       ..!decvax!utzoo!utcsri!greg

dillon@CORY.BERKELEY.EDU (Matt Dillon) (03/22/86)

>Does anyone out there on the net have any information on the number of
>CPU cycles each instruction of the 68000 uses? I have the the books
>"68000 Assembly Language Programming" by Gerry Kane, Doug Hawkins, and
>Lance Leventhal; and "68000 Microprocessor Handbook" by Gerry Kane. Each
>book contains in Appendix B a table listing the CPU cycles.  The following are
>typical entries in the "Clock Cycles" column:

>		MOVE.L	data32,Dn	12(3/0)
>		BCS	label		10,18(1/0)

	I suggest that you buy Motorola's 68000 handbook. 

	The number's in parenthesis refer to the number of read/write cycles
for the instruction  X(r/w), where X is the number of clock cycles it takes
to execute the instruction.  Additionaly, when you have  X,Y(r/w),  the X
refers to the number of clock cycles if the branch is not taken, the Y to
the number of cycles if it is taken.

					-Matt