cpu architecture
play

CPU Architecture system clock Memory 64-bit adder Every CPU - PowerPoint PPT Presentation

CPU Architecture system clock Memory 64-bit adder Every CPU architecture is implemented using digital logic. In each cycle of the system clock, logic is executed and results are saved. System designers attempt to implement logic so that


  1. CPU Architecture system clock Memory 64-bit adder Every CPU architecture is implemented using digital logic. In each cycle of the system clock, logic is “executed” and results are saved. System designers attempt to implement logic so that it can be executed in one clock cycle.

  2. Circuits and Logic What kinds of functions can we actually implement as a digital • circuit? Any “Boolean” function can be converted into a circuit: • Inputs Outputs We can construct a circuit for each output bit that is a function of the inputs. . ... . The goal is to produce circuits as fast as possible - . that is, with minimum “depth.”

  3. CPU Architecture Intel Itanium (2001) How is the logic created? How is silicon used?

  4. Semiconductor Technology Semiconductor photolithography Modern CPUs are constructed by etching transistors (and thus gates) into silicon. “Feature size” is on the order of tens of nanometers; CPUs can have several billion transistors.

  5. Everything is a logic operation!

  6. CPU Instruction Sets How are programs stored in memory? Programs are just a special kind of data that control the CPU. 64-bit Instruction Program A 010011... x y z add Memory Every CPU has a predefined instruction set that determines which circuitry is active. The main categories of instruction type are: memory access, control flow, and arithmetic operations.

  7. CPU Instruction Sets How are programs stored in memory? Programs are just a special kind of data that control the CPU. 64-bit Instruction Program A 010011... Data x y z add Memory Every CPU has a predefined instruction set that determines which circuitry is active. The main categories of instruction type are: memory access, control flow, and arithmetic operations.

  8. CPU Instruction Sets How are programs stored in memory? Programs are just a special kind of data that control the CPU. 64-bit Instruction Program A 010011... Data $t0 $t1 $t2 add Memory Registers are “fast memory” used as scratch space; additional instructions fetch and store data to “external memory”. Every CPU has a predefined instruction set that determines which circuitry is active. The main categories of instructions are: memory access, control flow, and arithmetic operations.

  9. “Machine Language” sw : store word to register 1 lw $t0, 1 lw : load word to register 2 lw $t1,0 bgt : branch-on-greater-than 3 lw $t2, n add : add two registers 4 loop: jmp : jump to given address bgt $t0,$t2,done 5 add $t0, $t1, $t1 6 add $t0, 2 7 jmp loop 8 done: What does this program do?

  10. “Machine Language” 1 lw $t0, 1 Memory operations 2 lw $t1,0 3 lw $t2, n 4 loop: Conditional Execution bgt $t0,$t2,done 5 add $t0, $t1, $t1 Arithmetic operations 6 add $t0, 2 7 jmp loop Looping Construct 8 done:

  11. High-Level Constructs Program A z = x + y Arithmetic Operations ... if (a <= b) sum = sum + 1 else: Conditional Execution sum = sum - 1 ... while (a <= b) Looping constructs sum = sum + 1 You may be more familiar with the above constructs - how do they compare with machine instructions?

  12. Higher-Level Languages Machine Language C/C++ lw $t0, 1 int sum = 0; lw $t1,0 for (int i=1; i<=n; i+=2) lw $t2, n sum += i; loop: Python bgt $t0,$t2,done sum = 0 add $t0, $t1, $t1 i = 1 add $t0, 2 while (i <= n): jmp loop sum += i done: i += 2 High-level programming languages allow us to forget the painful details of machine instructions, so that we can develop concise ways to perform useful tasks.

  13. Creating Machine Instructions sum = 0 i = 1 while (i <= n): sum += i lw $t0, 1 i += 2 lw $t1,0 lw $t2, n loop: bgt $t0,$t2,done Compiler / add $t0, $t1, $t1 add $t0, 2 Interpreter jmp loop done: Compilers are CPU-specific programs that translate from high-level language to machine code.

  14. Recap What architecture does every computational device have? What are the features of this architecture? Is a hard drive an input device or output device? What does a program consist of and where is it stored? How are machine instructions executed on the CPU? What is a logic gate? What are the three basic logic operations? What CPU operations are implemented using digital logic? What is a program? How is it executed on the CPU?

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend