Digital Signal Processing Reference
In-Depth Information
After this sequence of operations, the current instruction is in the instruction
register (IR). This instruction is one of several possible machine instructions
such as ADD, LOAD, or STORE. The opcode field is tested to decode the
specific machine instruction. The address field of the instruction register
contains the address of possible data operands. Using the address field, a
memory read is started in the decode state.
The decode state transfers control to one of several possible next states based
on the opcode value. Each instruction requires a short sequence of register
transfer operations to implement or execute that instruction. These register
transfer operations are then performed to execute the instruction. Only a few of
the instruction execute states are shown in Figure 9.6. When execution of the
current instruction is completed, the cycle repeats by starting a memory read
operation and returning to the fetch state. A small state machine called a control
unit is used to control these internal processor states and control signals.
*MAR=PC
Rea d Me mor y
IR=MDR
PC=PC+1
FETCH
MA R=IR
Read
Me mory
DECODE
EXECUTE
Opcode=ADD
Opcode=LOAD
Opcode=STORE
...
MD R=AC
Write Memory
AC=AC+MDR
AC=MDR
Figure 9.6 Detailed View of Fetch, Decode, and Execute for the ΜP 3 Computer Design.
Figure 9.7 is the datapath used for the implementation of the ΜP 3 Computer. A
computer's datapath consists of the registers, memory interface, ALUs, and the
bus structures used to connect them. The vertical lines are the three major
busses used to connect the registers. On the bus lines in the datapath, a “/” with
a number indicates the number of bits on the bus. Data values present on the
active busses are shown in hexadecimal. MW is the memory write control line.
A reset must be used to force the processor into a known state after power is
applied. The initial contents of registers and memory produced by a reset can
also be seen in Figure 9.7 . Since the PC and MAR are reset to 00, program
execution will start at 00.
Note that memory contains the machine code for the example program
presented earlier. Recall that the program consists of a LOAD, ADD, and
Search WWH ::




Custom Search