??? 08/09/07 14:54 Modified: 08/09/07 14:56 Read: times Msg Score: +1 +1 Good Answer/Helpful |
#142993 - Decoding Responding to: ???'s previous message |
Salaam J. Sathish,
This issue has come up before, and I have noted what seems to be an implicit misunderstanding about the matter. From your question (as in previously posted questions) you (or the previous poster) seem to believe that the µ-controller can pick any byte from its memory and discern whether it is an instruction or not. This is simply not the case. In order to understand how the execution process is accomplished, you should realize that the µ-controller must always begin execution at memory location 0x0000. How all of this is actually accomplished electronically is another matter, but in a traditionally anthropomorphic metaphor, the µ-controller assumes that the byte located there is an instruction and attempts to execute it. If you take that byte and look it up in the instruction set documentation, you will discover that it utilizes some number of subsequent bytes of data (yes, zero is a number) and the µ-controller will then assume that number of bytes are data. The µ-controller will then assume that the next byte in sequence (which means the next byte pointed to by the program counter) is an instruction and attempt to execute it accordingly, just as before. You will note that I said "... attempt to execute ...." If the code is loaded improperly into the memory, the µ-controller will not "sort it out." It will simply lock up, or start doing strange things and then lock up, or get stuck in some sort of loop, or ..., you get the idea. The point is that the µ-controller can not discern instruction from data. It simply proceeds sequentially from a very well defined starting point. And if any of the little bits are out of sorts, bad things won't necessarily happen, but good things certainly won't. I hope this helps. Good luck, Joe |
Topic | Author | Date |
decoding | 01/01/70 00:00 | |
It's implicit | 01/01/70 00:00 | |
design | 01/01/70 00:00 | |
A little ambitious? | 01/01/70 00:00 | |
First stop - instruction set | 01/01/70 00:00 | |
no intelligence | 01/01/70 00:00 | |
Back to basics! | 01/01/70 00:00 | |
Instruction decoding | 01/01/70 00:00 | |
decoder unit | 01/01/70 00:00 | |
State Machine | 01/01/70 00:00 | |
more detail | 01/01/70 00:00 | |
IF you've learned the "basics" of FPGA design ... | 01/01/70 00:00 | |
Decoding | 01/01/70 00:00 | |
in a traditionally anthropomorphic metaphor? | 01/01/70 00:00 | |
My favourite anthropomorphic metaphor... | 01/01/70 00:00 | |
My favorite ... | 01/01/70 00:00 | |
Blither | 01/01/70 00:00 | |
re: blither | 01/01/70 00:00 | |
I always think that a blithering idiot.. | 01/01/70 00:00 | |
anthropomorphic metaphor | 01/01/70 00:00 | |
The same way ... | 01/01/70 00:00 | |
Dictionary | 01/01/70 00:00 | |
If anyone is still listening...![]() | 01/01/70 00:00 |