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.

instruction cycle and clock cycle, difference?

Status
Not open for further replies.

eleynika

Junior Member level 1
Joined
Jul 13, 2006
Messages
19
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Location
Nigeria
Activity points
1,388
clock cycle instruction cycle

who can give an explanation on the difference clk and instruction cycles. why should the clk be divided by 4?
 

instruction cycle clock cycle oscillator

Hi,

the clock cycle is the period of the clock that you're feeding the to the micro (for example, a clock cycle takes 1us if the oscillator's frequency is 1MHz). The instruction cycle depends on the internal structure of the microcontroller or processor you use. For instance, the for a PIC an instruction cycle takes 4 clock cycles, for an 8051 it takes 12 cycles, for the AVRs take 1 cycle. This is because an instruction has multiple stages, like fetch, decode, execute and writeback. For some of the micros, the instruction cycle takes fewer clock cycles because they have a mean to paralelly do multiple operations (pipelining) - like executing an instruction, decoding the next one and fetching the next one from the program memory. Some of microchip's datasheets explain these stages pretty well.
 

clock cycle = 1 / operating frequency
instruction cycle : time to execute one insruction = one or more clock cycle depending on the architecture of the MC.

Thanks
Haytham
 

R u talking some T-states and instruction cycle.

See clock is the external crystal connected to the uC

1T state=1/clock for AVR uC
=2/clock for 8085
=4/clock for PIC


Instruction cycle is the time taken to execute one isntruction. An instruction cycle include fetching,decoding, memory r/w , Io r/w. So total instruction cycle is the sum of all machine cycle. One machine cycle consists of many T-state. For opcode fetch-4T, memory r/w-3T.

Suppose for exampleADD A,B addr for 8085

first opcode fetch-4T
since the operation inside register, it takes only 4T states(1machine cycle)



Bibin John
www.bibinjohn.tk
 

clock cycle=1/frequency.
instuction cycle is the time ur instruction takes to complete it.
 

more preciese
instruction cycle is the smallest period to execute any instruction, for example NOP
for RISC, almost all instructions are executed in one instruction cycle
for CISC, like 8051. instructions are executed in one, twor or more instruction cycles
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top