Нет регистров MBR
или MAR
, в конструкции есть только следующие регистры (без учета функций прерывания и ввода-вывода):
AR
- регистр адреса;используется для адресации памяти
PC
- счетчик программ;адрес выполняемой инструкции
DR
- Регистр данных;временное хранение данных
AC
- аккумулятор;результат любой операции ALU попадает в этот регистр
IR
- регистр команд;хранение текущего кода операции инструкции
E
- флаг регистрации из операций ALU
SC
- счетчик последовательности;используется для определения того, какой шаг инструкции выполняется
Для выполнения инструкции LDA
, например:
T0: AR <- PC // Put the Program counter into the Address register so we can get the instruction; only the Address regsiter can access memory
T1: IR <- M[AR], PC <- PC + 1 // M[AR] means access memory (M) at address stored in AR ([AR]), and in this case put that value at address AR into the Instruction register; at the same time increment the Program counter which can be done in parallel as the increment can be done without using the bus
T2: Decode(IR); AR <- IR(0-11) // Now the instruction is decoded; during this time the address argument of the instruction is pass into the Address register
T3: DR <- M[AR] // Once weve determined in T2 that this is a LDA, we need to do the steps involved; the goal being to take the word from memory and get it into AC. To do this, we first need to read it out of memory, thus the M[AR], read memory at address AR (which is from the instruction became of the transfer we did in T2). We want to put it into AC, but since AC cannot be loaded from the bus directly, we need to put it somewhere else first, somewhere it can be then transferred to AC, thus put it in DR
T4: AC <- DR; SC <- 0 // Now that the data is in DR, we can move it via the ALU into AC; note that the ALU doesnt actually do any work on the data in the case of the LDA, it just passes the data through. Now that the instruction is done, reset the Sequence counter to 0