Hardware Reference
In-Depth Information
Step 4
The data memory returns the contents to the processor and the processor places it in
accumulator A. The process is shown in Figure 1.8.
Instruction and A,#0x03 (machine code 54 03)
Step 1
The value in the PC (0x000A) is placed on the program memory address bus with a request
to read the contents of that location.
Step 2
The 8-bit value at the location 0x000A is the instruction opcode 0x54. At the end of this
read cycle, the PC is incremented to 0x000B. The program memory returns the opcode
byte 0x54 to the CPU.
Step 3
The control unit recognizes that the current instruction requires performing a
read operation on the program memory to fetch the operand for the AND operation.
It then places the PC value on the program memory address bus again with a read
request.
Step 4
The program memory returns the value 0x03 to the CPU. The PC is incremented
to 0x000C.
Step 5
The CPU then performs an AND operation on the contents of accumulator A and the
value 0x03 and places the result in A.
Data memory
Data memory
address bus
xx
xx
xx
xx
xx
xx
xx
xx
xx
[ptr]
CPU
xx
xx
xx
[ptr]: contents of ptr
xx
xx
xx
xx
Mem[[ptr]]: contents of memory
location pointed to by ptr
Mem[[ptr]]
Data memory
data bus
xx
Figure 1.8 Instruction 4-data memory and read cycle
Search WWH ::




Custom Search