?
Solved

Fetch, Decode, Execute....

Posted on 2000-02-08
10
Medium Priority
?
769 Views
Last Modified: 2008-03-06
I was taught back at school, that there were 3 main CPU cycles: Fetch, Decode and Execute.But now in the course I'm doing they include a fourth, Store.

Is this right?
Has anyone got any usefull information about it?
Are there any intruction's that are exceptions to the 'Store' psrt of the cycle?
0
Comment
Question by:Lab_Rat
  • 3
  • 3
  • 3
  • +1
10 Comments
 
LVL 3

Expert Comment

by:3rsrichard
ID: 2500456
There are lots of choices about how you describe the machine execution.  Here is a quote from a file on the 8031 family;

"A machine cycle consists of a sequence of 6 states, numbered S1
through S6. Each state time lasts for two oscillator periods. Thus a
machine cycle takes 12 oscillator periods or 1þs if the oscillator
frequency is 12MHz."

Some instructions can be short, like your first description.  Something like incrementing a register.
A much longer type would be moving one memory location to another, where you have to fetch and decode to know what to do, then fetch from external memory then store to external memory.
0
 
LVL 1

Author Comment

by:Lab_Rat
ID: 2500571
I see. Are there any instructions that don't store anything?

Output to a port springs to mind...
0
 
LVL 3

Accepted Solution

by:
3rsrichard earned 200 total points
ID: 2500746
Sure, instructions which operate on registers don't store in the sense the words being used here.  That would be ADD, INC, DEC, RR, ones like that.
And branch instructions don't usually storein this sense either, JMP, JSUB, RET.

It's sort of theres store and then theres store.
Store to the data memory.
Store to the program memory.
Store to the registers.
Store to the PC.
It gets to be a philosophic arguement.
Suppose you do a shift left.  You end up with bits in a new place, did you 'store' them there.  Classically the answer would be no, because you didn't take an action to specifically cause that result, it just happened.

Usually 'store' refers just to data memory.
 
If you look at what actually has to happen to get some data there's lots of steps.
0
SMB Security Just Got a Layer Stronger

WatchGuard acquires Percipient Networks to extend protection to the DNS layer, further increasing the value of Total Security Suite.  Learn more about what this means for you and how you can improve your security with WatchGuard today!

 
LVL 12

Expert Comment

by:Otta
ID: 2500787
> Are there any intruction's that are exceptions to the 'Store' psrt of the cycle?

Sure. "Test I/O" sets the "condition-code", and "Branch" changes the "next-instruction-address", while "BranchConditional 0,0" is a "null-operation", which never(!) branches to location "zero".
This 'BC 0,0' is a two-byte instruction, and often is used when it is necessary that the following instruction must be aligned on a four-byte boundary.
0
 
LVL 3

Expert Comment

by:jjmcd
ID: 2502705
What you should be able to tell from this discussion is that the answer, like in so many things, it "it depends".

Some bipolar micros of the 80's had a single cycle, and within-chip sequencing was handled purely through propagation delays.  I think some embedded RISC chips continue this practice.  On Harvard architecture chips, there are different flavors of "store" which are very different from the chip's perspective.  Chips like the PIC seem to include both these extremes.

So the answer to your question depends very much on the particular part.
0
 
LVL 1

Author Comment

by:Lab_Rat
ID: 2507256
They're all good answers, unfortunatly I don't know who to post the points too, a vote anyone?
0
 
LVL 12

Expert Comment

by:Otta
ID: 2510444
I decline -- award the points to somebody else ... Otta.
0
 
LVL 1

Author Comment

by:Lab_Rat
ID: 2522794
Otta, you should back up your request with some concreate evidence, as production of curiosity without satisfactory resolution is highly unfair! (I'm nosey about your reason!Please, please, eloborate :)

But, o.k., I'll award the points tooooooooooo....

3rsrichard, because you've supplied me with the most information, ta!
0
 
LVL 3

Expert Comment

by:3rsrichard
ID: 2522873
Why thank you.  I will cherish them.
0
 
LVL 12

Expert Comment

by:Otta
ID: 2535448
> production of curiosity without satisfactory resolution is highly unfair!

Never look a gift-horse in the mouth.  :-)

Other than getting a free E-E T-shirt for accumulating 100000 points, I don't know what else I would do with another 50 points.  :-)
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
For years I have put up with a wireless mouse that consistently disappears or is non-responsive.  This is the story of how I discovered it wasn't really the mouse!
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question