Diseño de Procesador: Arquitectura y Funciones
Diseño de Procesador: Arquitectura y Funciones
Diseño Lógico
2024
Prof. Dr. Martín Vázquez
Introducción
⚫ Un procesador
⚫ es el “cerebro” de una computadora
⚫ ejecuta los programas de los usuarios
⚫ lee, interpreta y procesa las instrucciones
⚫ básicamente
⚫ lee instrucción, obtiene operandos/datos, realiza
operación y pasa a la siguiente instrucción
⚫ opera a una frecuencia,
⚫ clock del sistema
⚫ Ejemplo: AMD, Intel, ARM,…
Introducción
Memoria
Programa y Procesador E/S
Datos
Introducción
Programas de
usuarios/sistema
Memoria
Programa y Procesador E/S
Datos
Introducción
- Compilación
Programas de
usuarios/sistema - Interpretación
Memoria
Programa y Procesador E/S
Datos
Introducción
- Compilación
Programas de
usuarios/sistema - Interpretación
Memoria
Programa y Procesador E/S
Datos
Datos requeridos y
generados por el
procesador
Introducción
- Compilación
Programas de
usuarios/sistema - Interpretación
Entradas y Salidas
A través de puertos
Memoria
Programa y Procesador E/S
Datos
Datos requeridos y
generados por el
procesador
Introducción
- Compilación
Programas de
usuarios/sistema - Interpretación
Entradas y Salidas
A través de puertos
Memoria
Programa y Procesador E/S
Datos
Datos requeridos y
generados por el
procesador
Arquitectura Von Neumann
Introducción
Memoria
Programa
Procesador E/S
Memoria
Datos
Arquitectura Harvard
Introducción
⚫ Multiplexores output
addr
8 input
IR we
output
16
Control Unit
regO_we
regs_we
alu_op
3
RAM regA_we
Program input in_sel
⚫
reg_sel
HAB
output
.
16
HAB
.
(Program Counter)
8 [7:0]
BUS
HAB input
.
Reg_A we
B
op
Registers S
rd
Demultiplexores
4 [7:4]
⚫ we
din
8
BUS
input
Reg_Out we
output
Procesador de Cátedra
Memoria 8
Programa 16 Procesador
cátedra
Input Output
8 8
Procesador de Cátedra
RAM 256 x 16
(hasta 256 instrucciones)
Memoria 8
Programa 16 Procesador
cátedra
Input Output
8 8
Procesador de Cátedra
RAM 256 x 16
(hasta 256 instrucciones) Dirección memoria
asociada a PC
Memoria 8
Programa 16 Procesador
cátedra
Input Output
8 8
Procesador de Cátedra
RAM 256 x 16
(hasta 256 instrucciones) Dirección memoria
asociada a PC
Memoria 8
Programa 16 Procesador
cátedra
Input Output
Instrucciones de 8 8
programa
- 2 tipos de formatos
Procesador de Cátedra
15 7 3 0
Tipo Registro op rd rs
8 bits 4 bits 4 bits
15 7 0
Tipo Constante op inmediate
8 bits 8 bits
Repertorio de Instrucciones
⚫ Tipo Registro
Instrucciones
⚫ Tipo Constante
15 7 0
op: código de operación
op inmediate
8 bits 8 bits inmediate: dato inmediato en 8 bits
Instrucciones
15 7 0
5 24
8 bits 8 bits
15 7 3 0
11 2 6
8 bits 4 bits 4 bits
Repertorio de Instrucciones
15 7 3 0
21 12 2
8 bits 4 bits 4 bits
15 7 3 0
3 7 13
8 bits 4 bits 4 bits
Repertorio de Instrucciones
15 7 3 0
2 -- 14
8 bits 4 bits 4 bits
15 7 3 0
4 -- 5
8 bits 4 bits 4 bits
Programa de Usuario
Compilación
Programa de Usuario
Código binario
00000001 0010 ----
00000101 00000100
00001010 1100 0010
00000100 ---- 0010
00001011 1101 1100
Memoria 8
Programa 16 Procesador
cátedra
Input Output
8 8
Componentes del Procesador
Entradas:
operandos a y b de 8 bits
control op de 3 bits a b
Salida: ALU op
s de 8 bits s
op [2..0] Operación
000 a
001 a << 1
010 a >> 1
011 a+b
100 a–b
101 a and b
110 a or b
111 a xor b
Componentes del Procesador
⚫ Banco de registros – 16 registros de 8 bits
Entradas:
control escritura, we
dirección registro lectura, rs, de 4 bits
dirección registro destino, rd, de 4 bits rs dout
dato a escribir, din, de 8 bits
rd Registers
Salida:
datos de lectura, dout, de 8 bits we
din
Procesador de cátedra
INPUT
PC
output
8 input Control Unit
IR we
regO_we
addr output regs_we
16 alu_op
RAM regA_we 3
Program input in_sel
8 [15:8] inm_sel
256 x16 8
reg_sel
HAB
output
.
16
HAB
.
8 [7:0]
BUS
HAB input
.
Reg_A we
8 output
dout
A B
rs ALU
4 [3:0] op
Registers S
rd
4 [7:4]
we 8
din
BUS
input
Reg_Out we
output
OUTPUT
Procesador de cátedra
INPUT
PC
output
8 input Control Unit
IR we
regO_we
addr output regs_we
16 alu_op
RAM regA_we 3
Program input in_sel
8 [15:8] inm_sel
256 x16 8
reg_sel
HAB
output
.
16
HAB
.
8 [7:0]
BUS
HAB input
.
Reg_A we
8 output
dout
BUS
input
Reg_Out we
output
OUTPUT
Procesador de cátedra
INPUT
PC
output
8 input Control Unit
IR we
regO_we
addr output regs_we
16 alu_op
RAM regA_we 3
Program input in_sel
8 [15:8] inm_sel
256 x16 8
reg_sel
HAB
output
.
16
HAB
.
8 [7:0]
BUS
HAB input
.
Reg_A we
8 output
Instrucciones Tipo Registro dout
A B
add, sub, shl, shr, 4 [3:0]
rs ALU op
BUS
input
Reg_Out we
output
OUTPUT
Procesador de cátedra
INPUT
PC
output
8 input Control Unit
IR we
regO_we
addr output regs_we
16 alu_op
RAM regA_we 3
Program input in_sel
8 [15:8] inm_sel
256 x16 8
reg_sel
HAB
output
.
16
HAB
.
8 [7:0]
BUS
HAB input
.
Reg_A we
8 output
Instrucciones Tipo Registro dout
A B
mov 4 [3:0]
rs ALU op
Registers S
rd
4 [7:4]
we 8
din
BUS
input
Reg_Out we
output
OUTPUT
Procesador de cátedra
INPUT
PC
output
8 input Control Unit
IR we
regO_we
addr output regs_we
16 alu_op
RAM regA_we 3
Program input in_sel
8 [15:8] inm_sel
256 x16 8
reg_sel
HAB
output
.
16
HAB
.
8 [7:0]
BUS
HAB input
.
Reg_A we
8 output
Instrucciones Tipo Registro dout
A B
out 4 [3:0]
rs ALU op
Registers S
rd
4 [7:4]
we 8
din
BUS
input
Reg_Out we
output
OUTPUT
Procesador de cátedra
INPUT
PC
output
8 input Control Unit
IR we
regO_we
addr output regs_we
16 alu_op
RAM regA_we 3
Program input in_sel
8 [15:8] inm_sel
256 x16 8
reg_sel
HAB
output
.
16
HAB
.
8 [7:0]
BUS
HAB input
.
Reg_A we
8 output
Instrucciones Tipo Registro dout
A B
in 4 [3:0]
rs ALU op
Registers S
rd
4 [7:4]
we 8
din
BUS
input
Reg_Out we
output
OUTPUT
Procesador de cátedra
INPUT
PC
output
8 input Control Unit
IR we
regO_we
addr output regs_we
16 alu_op
RAM regA_we 3
Program input in_sel
8 [15:8] inm_sel
256 x16 8
reg_sel
HAB
output
.
16
HAB
.
8 [7:0]
BUS
HAB input
.
Reg_A we
8 output
Instrucciones Tipo Registro dout
A B
lda 4 [3:0]
rs ALU op
Registers S
rd
4 [7:4]
we 8
din
BUS
input
Reg_Out we
output
OUTPUT
Procesador de cátedra
INPUT
PC
output
8 input Control Unit
IR we
regO_we
addr output regs_we
16 alu_op
RAM regA_we 3
Program input in_sel
8 [15:8] inm_sel
256 x16 8
reg_sel
HAB
output
.
16
HAB
.
8 [7:0]
BUS
HAB input
.
Reg_A we
8 output
Instrucciones Tipo Constante dout
A B
ldi 4 [3:0]
rs ALU op
Registers S
rd
4 [7:4]
we 8
din
BUS
input
Reg_Out we
output
OUTPUT
Procesador de cátedra
INPUT
PC
output
8 input Control Unit
IR we
regO_we
addr output regs_we
16 alu_op
RAM regA_we 3
Program input in_sel
8 [15:8] inm_sel
256 x16 8
reg_sel
HAB
output
.
16
HAB
.
8 [7:0]
BUS
HAB input
.
Reg_A we
Unidad de Control 8 output
dout
A B
regO_we rs ALU op
4 [3:0]
regs_we Registers S
rd
4 [7:4]
alu_op 8
we
RegA_we din
in_sel BUS
inm_sel
reg_sel input
Reg_Out we
output
OUTPUT
Procesador de cátedra
INPUT
PC
output
8 input Control Unit
IR we
regO_we
addr output regs_we
16 alu_op
RAM regA_we 3
Program input in_sel
8 [15:8] inm_sel
256 x16 8
reg_sel
Instrucción: out
HAB
output
.
16
HAB
.
8 [7:0]
Unidad de Control
BUS
regO_we = 1
HAB input
regs_we = 0 .
Reg_A we
8 output
alu_op = 000 dout
A B
RegA_we = 0 rs ALU op
4 [3:0]
in_sel = 0 Registers S
rd
4 [7:4]
inm_sel = 0 8
we
reg_sel = 1 din
BUS
input
Reg_Out we
output
OUTPUT
Procesador de cátedra
INPUT
PC
output
8 input Control Unit
IR we
regO_we
addr output regs_we
16 alu_op
RAM regA_we 3
Program input in_sel
8 [15:8] inm_sel
256 x16 8
reg_sel
Instrucción: in
HAB
output
.
16
HAB
.
8 [7:0]
Unidad de Control
BUS
regO_we = 0
HAB input
regs_we = 1 .
Reg_A we
8 output
alu_op = 000 dout
A B
RegA_we = 0 rs ALU op
4 [3:0]
in_sel = 1 Registers S
rd
4 [7:4]
inm_sel = 0 8
we
reg_sel = 0 din
BUS
input
Reg_Out we
output
OUTPUT
Procesador de cátedra
INPUT
PC
output
8 input Control Unit
IR we
regO_we
addr output regs_we
16 alu_op
RAM regA_we 3
Program input in_sel
8 [15:8] inm_sel
256 x16 8
reg_sel
Instrucción: ldi
HAB
output
.
16
HAB
.
8 [7:0]
Unidad de Control
BUS
regO_we = 0
HAB input
regs_we = 0 .
Reg_A we
8 output
alu_op = --- dout
A B
RegA_we = 1 rs ALU op
4 [3:0]
in_sel = 0 Registers S
rd
4 [7:4]
inm_sel = 1 8
we
reg_sel = 0 din
BUS
input
Reg_Out we
output
OUTPUT
Procesador de cátedra
INPUT
PC
output
8 input Control Unit
IR we
regO_we
addr output regs_we
16 alu_op
RAM regA_we 3
Program input in_sel
8 [15:8] inm_sel
256 x16 8
reg_sel
HAB
output
.
16
HAB
.
8 [7:0]
BUS
HAB input
.
Reg_A we
8 output
dout
A B
rs ALU
4 [3:0] op
Registers S
rd
4 [7:4]
we 8
din
BUS
input
Reg_Out we
output
OUTPUT