Processors
Ikuru K
Agenda
• Overview
• Hands On
Note
• The details are dramatically different
from processor to processor.
• Try to capture what the essence.
Physical Look
Manufacturing Process
Working Directly with Processors
Finite State Machine in a Nutshell
• Next state is a func
tion of current stat
e and input, mapp
ed by state transfe
r function.
• Processor is a finit
e state machine.
Processor Implementation
Main Components
• RAM – Holds instructions and longer term data
• Register – Storage to do arithmetic/ store pointers
• ALU – circuit that carries out all arithmetic operations
• PC – program counter that points to instruction to be d
one.
• BUS – Communication between components (terminal
etc)
Basic Processor Instructions
• Load to register
• Write to address
• Arithmetic
• Compare->was result of arithmetic 0? gt 0 ? lt
0?
• Jump – Modify PC value -> functions are acco
mplished using this.
Hands-on
• http://schweigi.github.io/assembler-simulator
/
Plain Text
; Ikuru K
; Simple iteration example
; Writes the character to the terminal stored in register A
; (Number in register C) times.
;intended for use on http://schweigi.github.io/assembler-simulator/
JMP start
start:
MOV A, 100; write ascii value of character to be printed here
MOV C, 11 ; write x here
MOV D, 232 ; Point to output
CALL print_x_times
HLT ; Stop execution
print_x_times:
INC C;offsetting.
.print_loop:
MOV [D], A ;Print character to be written
DEC C;Updating the counter
INC D;Each charactor slot is mapped to a different location
CMP C,0;Done?
JNZ .print_loop;Continue if not done
RET;

Processors in a nutshell

  • 1.
  • 2.
  • 3.
    Note • The detailsare dramatically different from processor to processor. • Try to capture what the essence.
  • 4.
  • 5.
  • 6.
  • 7.
    Finite State Machinein a Nutshell • Next state is a func tion of current stat e and input, mapp ed by state transfe r function. • Processor is a finit e state machine.
  • 8.
  • 9.
    Main Components • RAM– Holds instructions and longer term data • Register – Storage to do arithmetic/ store pointers • ALU – circuit that carries out all arithmetic operations • PC – program counter that points to instruction to be d one. • BUS – Communication between components (terminal etc)
  • 10.
    Basic Processor Instructions •Load to register • Write to address • Arithmetic • Compare->was result of arithmetic 0? gt 0 ? lt 0? • Jump – Modify PC value -> functions are acco mplished using this.
  • 11.
  • 13.
    Plain Text ; IkuruK ; Simple iteration example ; Writes the character to the terminal stored in register A ; (Number in register C) times. ;intended for use on http://schweigi.github.io/assembler-simulator/ JMP start start: MOV A, 100; write ascii value of character to be printed here MOV C, 11 ; write x here MOV D, 232 ; Point to output CALL print_x_times HLT ; Stop execution print_x_times: INC C;offsetting. .print_loop: MOV [D], A ;Print character to be written DEC C;Updating the counter INC D;Each charactor slot is mapped to a different location CMP C,0;Done? JNZ .print_loop;Continue if not done RET;