Telematics group
University of Göttingen, Germany
Computer Science II – Part 2 Computer Systems Organization
- Prof. Dr. Dieter Hogrefe
- Dr. Xiaoming Fu
Telematics group University of Gttingen, Germany Table of Content - - PowerPoint PPT Presentation
Computer Science II Part 2 Computer Systems Organization Prof. Dr. Dieter Hogrefe Dr. Xiaoming Fu Kevin Scott, M.A. Telematics group University of Gttingen, Germany Table of Content Introduction Processors CPU
2
SS 2003 Computer Science II
3
SS 2003 Computer Science II
4
SS 2003 Computer Science II
5
SS 2003 Computer Science II
6
SS 2003 Computer Science II
7
SS 2003 Computer Science II
8
SS 2003 Computer Science II
9
SS 2003 Computer Science II
1. public class Interp { 2. static int PC; // program counter, holds addr of next instruction 3. static int AC; // accumulator, a register for doing arithmetic 4. static int instr; // a register, holds current instruction 5. static int instr_type; //the instruction type: ADD, or Boolean OR, AND... 6. static int data_loc; //data addr, -1 if no data 7. static boolean run_bit = true; //stop flag 8. public static void interpret(int memory[], int starting_address) { 9. // This procedure interprets programs for a simple computer with 10. // instructions having one memory operand. The ADD instruction adds 11. // an integer in memory to the AC, for example. 12. PC = starting_address; 13. while (run_bit) { 14. instr = memory[PC]; //fetch next instruction 15. PC = PC + 1; //move to next intruction address 16. instr_type = get_instr_type(intr); // determine intruction type 17. data_loc = find_data(instr, instr_type); // locate data (return -1 if no) 18. if(data_loc >= 0) // check whether there is operand 19. data = memory[data_loc]; // fetch the data 20. execute(instr_type, data); // execute instruction 21. } 22. } 23. 24. private static int get_instr_type(int addr) {...} 25. private static int find_data(int instr, int type) {...} 26. private static void execute(int type, int data) {...}
10
SS 2003 Computer Science II
11
SS 2003 Computer Science II
12
SS 2003 Computer Science II
13
SS 2003 Computer Science II
14
SS 2003 Computer Science II
15
SS 2003 Computer Science II
16
SS 2003 Computer Science II
17
SS 2003 Computer Science II
18
SS 2003 Computer Science II
19
SS 2003 Computer Science II
20
SS 2003 Computer Science II
21
SS 2003 Computer Science II
22
SS 2003 Computer Science II
23
SS 2003 Computer Science II
24
SS 2003 Computer Science II
25
SS 2003 Computer Science II
and device”):
26
SS 2003 Computer Science II
27
SS 2003 Computer Science II
28
SS 2003 Computer Science II
29
SS 2003 Computer Science II
30
SS 2003 Computer Science II
31
SS 2003 Computer Science II
32
SS 2003 Computer Science II
33
SS 2003 Computer Science II
34
SS 2003 Computer Science II
35
SS 2003 Computer Science II
Control Datapath Memory Processor Input Output
36
SS 2003 Computer Science II
37
SS 2003 Computer Science II
38
SS 2003 Computer Science II
39
SS 2003 Computer Science II
Memory Processer I/O Device I/O Device I/O Device
40
SS 2003 Computer Science II
Memory Processer I/O Device I/O Device I/O Device
41
SS 2003 Computer Science II
Data Lines Control Lines
Address Lines
42
SS 2003 Computer Science II
20-Bit address
43
SS 2003 Computer Science II
Processor Memory I/O Devices Backplane Bus
44
SS 2003 Computer Science II
Processor Memory I/O Bus Processor-Memory Bus Bus Controller Bus Controller Bus Controller I/O Bus I/O Bus
45
SS 2003 Computer Science II
Processor Memory Processor-Memory Bus Bus Controler Bus Controler Bus Controler I/O Bus On-chip Cache bus I/O Bus
L2 Cache
46
SS 2003 Computer Science II
47
SS 2003 Computer Science II
48
SS 2003 Computer Science II
Bus Master Bus Slave Master issues command Data can go either way
49
SS 2003 Computer Science II
50
SS 2003 Computer Science II