Spaces:
Sleeping
Sleeping
File size: 21,152 Bytes
48e7c56 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 |
BSc: Computer Architecture
==========================
Contents
--------
* [1 Fundamentals of Computer Architecture](#Fundamentals_of_Computer_Architecture)
+ [1.1 Short Description](#Short_Description)
+ [1.2 Prerequisites](#Prerequisites)
- [1.2.1 Prerequisite subjects](#Prerequisite_subjects)
- [1.2.2 Prerequisite topics](#Prerequisite_topics)
+ [1.3 Course Topics](#Course_Topics)
+ [1.4 Intended Learning Outcomes (ILOs)](#Intended_Learning_Outcomes_.28ILOs.29)
- [1.4.1 What is the main purpose of this course?](#What_is_the_main_purpose_of_this_course.3F)
- [1.4.2 ILOs defined at three levels](#ILOs_defined_at_three_levels)
* [1.4.2.1 Level 1: What concepts should a student know/remember/explain?](#Level_1:_What_concepts_should_a_student_know.2Fremember.2Fexplain.3F)
* [1.4.2.2 Level 2: What basic practical skills should a student be able to perform?](#Level_2:_What_basic_practical_skills_should_a_student_be_able_to_perform.3F)
* [1.4.2.3 Level 3: What complex comprehensive skills should a student be able to apply in real-life scenarios?](#Level_3:_What_complex_comprehensive_skills_should_a_student_be_able_to_apply_in_real-life_scenarios.3F)
+ [1.5 Grading](#Grading)
- [1.5.1 Course grading range](#Course_grading_range)
- [1.5.2 Course activities and grading breakdown](#Course_activities_and_grading_breakdown)
- [1.5.3 Recommendations for students on how to succeed in the course](#Recommendations_for_students_on_how_to_succeed_in_the_course)
+ [1.6 Resources, literature and reference materials](#Resources.2C_literature_and_reference_materials)
- [1.6.1 Open access resources](#Open_access_resources)
- [1.6.2 Closed access resources](#Closed_access_resources)
- [1.6.3 Software and tools used within the course](#Software_and_tools_used_within_the_course)
* [2 Teaching Methodology: Methods, techniques, & activities](#Teaching_Methodology:_Methods.2C_techniques.2C_.26_activities)
+ [2.1 Activities and Teaching Methods](#Activities_and_Teaching_Methods)
+ [2.2 Formative Assessment and Course Activities](#Formative_Assessment_and_Course_Activities)
- [2.2.1 Ongoing performance assessment](#Ongoing_performance_assessment)
* [2.2.1.1 Section 1](#Section_1)
* [2.2.1.2 Section 2](#Section_2)
* [2.2.1.3 Section 3](#Section_3)
* [2.2.1.4 Section 4](#Section_4)
* [2.2.1.5 Section 5](#Section_5)
* [2.2.1.6 Section 6](#Section_6)
- [2.2.2 Final assessment](#Final_assessment)
- [2.2.3 The retake exam](#The_retake_exam)
Fundamentals of Computer Architecture
=====================================
* **Course name**: Fundamentals of Computer Architecture
* **Code discipline**: XXX
* **Subject area**: Computer Science Fundamentals
Short Description
-----------------
This course covers the fundamental principles of modern computer systems and software/hardware interaction, the representation and execution of computer instructions, computer arithmetics.
Prerequisites
-------------
### Prerequisite subjects
* Informatics
* Basic programming skills
* The basics of Boolean logic
### Prerequisite topics
Course Topics
-------------
Course Sections and Topics
| Section | Topics within the section
|
| --- | --- |
| Introduction to the Fundamental Concepts of Computer Architecture | 1. Key Components of a Computer System
2. Fundamental Ideas of Computer Architecture
3. Translation Hierarchy of a High-Level Program into Machine Code
4. Performance Metrics of a Computer System
|
| Computational Logic Implementation in a Computer System | 1. Logic Gates and Boolean Algebra
2. Logic Circuits
3. Combinational and Sequential Logic
4. Number Systems
5. The Basics of Verilog Hardware Description Language (HDL) Programming
|
| Instruction Representation and Execution in a Computer System | 1. Instruction Set Architecture (ISA)
2. The Overview of MIPS ISA
3. Types of MIPS Instructions and Their Representation in a Binary Format
4. Sample MIPS Assembly Programs
|
| Computer Arithmetics | 1. Basic Arithmetic Operations (Bitwise, Shifts, Multiplication, Division, and Others)
2. Overflow and Underflow Problems for Arithmetic Operations
3. Arithmetic Operations with Floation Point Numbers
4. Problems Related to Precision and Conversion for Floating Point Numbers
|
| Processor Architecture | 1. Key Components of a Processor: Control and Arithmetic Logic Unit, Registers
2. Processor Datapath and Control Signals
3. The Notion of a Pipelined Execution, Pipeline Hazards, and Their Solutions
4. A Simple and Pipelined Implementation Schemes of a Processor
|
| Advanced Topics | 1. Computer Security and Vulnerabilities
2. Graphics Processing Unit (GPU) and General-Purpose GPU Programming
3. Modern Approaches for Memory Hierarchy Design
|
Intended Learning Outcomes (ILOs)
---------------------------------
### What is the main purpose of this course?
The main purpose of this course is to cover the fundamental theoretical principles of computer systems design. We first overview the key hardware components of a modern computer system, available performance metrics, and the general principles of computer architecture. We then discuss the representation and execution of computer instructions, instruction set architecture, the translation hierarchy of a high-level program into machine code. We also cover the elements of computer arithmetics, logic circuits, including combinational and sequential logic circuits. These theoretical principles are illustrated by using MIPS instruction set architecture, FPGA, and Verilog HDL programming language during the labs. We then study in details simple and pipelined implementation schemes of a processor, the idea of a pipelined execution, related hazards and their solutions. We complete the course by introducing several advanced topics, including computer security and vulnerabilities, GPU programming, and modern principles for memory hierarchy design.
### ILOs defined at three levels
#### Level 1: What concepts should a student know/remember/explain?
By the end of the course, the students should be able to ...
* Key components of a modern computer system
* Available performance metrics for computer systems
* Computer arithmetics operations, including floating point numbers
* Number systems and conversion between them
* Representation formats for computer instructions
#### Level 2: What basic practical skills should a student be able to perform?
By the end of the course, the students should be able to ...
* Fundamental principles of computer architecture (Moore’s law, memory hierarchy, multiprocessing, speculative execution, and others)
* The design scheme of a modern processor
* The interaction principles between software and hardware
* Program representation and execution by a computer system
#### Level 3: What complex comprehensive skills should a student be able to apply in real-life scenarios?
By the end of the course, the students should be able to ...
* The design skills of logic circuits by using Verilog HDL programming language
* FPGA programming by using Quartus Prime software
* MIPS assembly programming (including MARS simulator)
Grading
-------
### Course grading range
| Grade | Range | Description of performance
|
| --- | --- | --- |
| A. Excellent | 90-100 | -
|
| B. Good | 70-89 | -
|
| C. Satisfactory | 60-69 | -
|
| D. Poor | 0-59 | -
|
### Course activities and grading breakdown
| Activity Type | Percentage of the overall course grade
|
| --- | --- |
| Labs/seminar Classes | 15
|
| Regular quizzes during tutorials (excluding 3 worst) | 5
|
| Midterm Exam | 20
|
| Final Exam | 60
|
| Bonus points for optional FPGA projects | 5
|
### Recommendations for students on how to succeed in the course
Resources, literature and reference materials
---------------------------------------------
### Open access resources
* Handouts supplied by the instructor
* Online resources shared by instructor
### Closed access resources
### Software and tools used within the course
Teaching Methodology: Methods, techniques, & activities
=======================================================
Activities and Teaching Methods
-------------------------------
Activities within each section
| Learning Activities | Section 1 | Section 2 | Section 3 | Section 4 | Section 5 | Section 6
|
| --- | --- | --- | --- | --- | --- | --- |
| Development of individual parts of software product code | 1 | 1 | 1 | 1 | 1 | 1
|
| Homework and group projects | 1 | 1 | 1 | 1 | 1 | 1
|
| Midterm evaluation | 1 | 1 | 1 | 0 | 0 | 0
|
| Testing (written or computer based) | 1 | 1 | 1 | 1 | 1 | 1
|
| Oral polls | 1 | 1 | 1 | 1 | 1 | 1
|
| Discussions | 1 | 1 | 1 | 1 | 1 | 1
|
Formative Assessment and Course Activities
------------------------------------------
### Ongoing performance assessment
#### Section 1
| Activity Type | Content | Is Graded?
|
| --- | --- | --- |
| Question | Do you agree that main memory (RAM) is a non-volatile memory? | 1
|
| Question | There are several types of memory available for computers, such as CPU cache, main memory (RAM), SSD, etc. What are the key differences between them? | 1
|
| Question | What is the key principle behind the Von Neumann Architecture? | 1
|
| Question | Specify a correct order for tools used during high-level program translation and execution: Compiler, Assebler, Linker, Loader; | 1
|
| Question | Let a program run on a computer comprised of one processor only. Let us now increase the number of processors up to m>1, so that multiple instructions of that program can be executed in parallel. Assume that all processor speeds are the same. Do you agree that a program can never execute slower on m processors, as compared to the case of one processor? | 1
|
| Question | Demonstration and description of key elements of an FPGA board (memory unit, PCI slot, clock generator, etc.); | 0
|
| Question | Description of specific features of FPGA as compared to other integrated circuit devices; | 0
|
| Question | Writing basic code for FPGA board; | 0
|
| Question | Configuration and usage of the basic functionality in Quartus Prime software | 0
|
#### Section 2
| Activity Type | Content | Is Graded?
|
| --- | --- | --- |
| Question | Convert decimal number 123 into base-5 format; | 1
|
| Question | Do you agree that a S/R latch and a D flip-flop have different storage capacities? | 1
|
| Question | Choose the key differences between SRAM and DRAM memory types: cost, power consumption, volatility, access speed, storage capacity, etc.; | 1
|
| Question | Do you agree that one of the key differences between sequential and combinational logic circuits is the presence of memory elements? | 1
|
| Question | Questions regarding the basic logic gates; | 0
|
| Question | Assignments to design simple logic circuits with 2-3 logic gates on a white board; | 0
|
| Question | Programming assignments in Quartus Prime software, to design and compile simple logic circuits; | 0
|
| Question | Programming an FPGA board by using Verilog HDL in Quartus Prime environment, such as turning on or off leds based on a switch position; | 0
|
| Question | Questions regarding the difference between combinational and sequential logic circuits; | 0
|
#### Section 3
| Activity Type | Content | Is Graded?
|
| --- | --- | --- |
| Question | How many bits are in one MIPS word? | 1
|
| Question | Which MIPS directive would you use to create a string data? | 1
|
| Question | For MIPS instruction set architecture (ISA), each register is reserved for a specific purpose. Describe the purpose of registers listed below:
v
0
,
{\displaystyle v0,}
{\displaystyle v0,}s0-
s
7
,
{\displaystyle s7,}
{\displaystyle s7,}t0-$t7; | 1
|
| Question | In MARS simulator for MIPS programming, all register values, that are displayed in the register viewer, start with prefix "0x". What is the meaning of this prefix? | 1
|
| Question | Print a "Hello, World!" message in a console; | 0
|
| Question | Computation of a simple arithmetic expression for integer parameters; | 0
|
| Question | Computation of the first 10 Fibonacci numbers; | 0
|
| Question | Implementation of more advanced program structures, such as conditional loops | 0
|
#### Section 4
| Activity Type | Content | Is Graded?
|
| --- | --- | --- |
| Question | Assume that two MIPS registers,
s
0
a
n
d
{\displaystyle s0and}
{\displaystyle s0and}s1, contain the following binary data:
s
0
:
00100000
;
{\displaystyle s0:00100000;}
{\displaystyle s0:00100000;}s1: 01010101 (For simplicity, we assume 8-bit registers, rather that 32) What is the value of
s
1
a
f
t
e
r
t
h
e
e
x
e
c
u
t
i
o
n
o
f
t
h
e
f
o
l
l
o
w
i
n
g
i
n
s
t
r
u
c
t
i
o
n
?
:
s
l
l
{\displaystyle s1aftertheexecutionofthefollowinginstruction?:sll}
{\displaystyle s1aftertheexecutionofthefollowinginstruction?:sll}s1, $s0, 4 | 1
|
| Question | What is a "register spilling" in the context of MIPS instruction set architecture? | 1
|
| Question | Do you agree with the following statement? In some cases, MIPS logical shift operations, sll and srl, can be used as an efficient alternative to multiplication and division operations, mul and div. | 1
|
| Question | Do you agree that overflow and underflow exceptions correspond to cases, when the result of an arithmetic operation surpasses and subceeds, respectively, the maximum and the minimum value for an appropriate data type returned by that arithmetic operation? | 1
|
| Question | Division of two floating-point numbers; | 0
|
| Question | Conversion of Fahrenheit into Celsius temperature, and vice versa; | 0
|
| Question | Computation of a sphere surphase area; | 0
|
| Question | Questions regarding the execution of arithmetic operations with interger and floating-point values | 0
|
#### Section 5
| Activity Type | Content | Is Graded?
|
| --- | --- | --- |
| Question | Do you agree that the key motivation for the CPU pipelining is to speed-up the execution of a program by exploring multiple CPU cores? | 1
|
| Question | Which CPU block(s) is/are accessed during the execution of the following instruction? lw
1
,
5
(
{\displaystyle 1,5(}
{\displaystyle 1,5(}2) | 1
|
| Question | What are 5 major stages of a pipelined instruction execution? | 1
|
| Question | Do you agree that, for a processor with 5 pipelined stages, the number of concurrently executed instructions is up to 4? | 1
|
| Question | There are several types of processors available, including single-cycle and multicycle.The major advantage of a single-cycle processor is the simplicity of its design. But what is its key drawback? | 1
|
| Question | Design of a testbench in ModelSim for Quartus Prime programming environment; | 0
|
| Question | The design of Half-Adder, Full-Adder, Ripple Carry Adder by using Verilog HDL in Quartus Prime | 0
|
| Question | Testing the correctness of Verilog HDL design by using ModelSim | 0
|
#### Section 6
| Activity Type | Content | Is Graded?
|
| --- | --- | --- |
| Question | Cold boot attack explores vulnerabilities in a memory dump mechanism. What is a memory dump? | 1
|
| Question | Below is a list of possible vulnerability attacks. Choose the one(s) that explore(s) vulnerabilities in a speculative execution of modern processors: Meltdown, Foreshadow, Cold boot attack, Spectre, No choice is correct; | 1
|
| Question | Choose the most precise definition for a side-channel attack: An attack that explores vulnerabilities in the hardware implementation of a computer system, An attack that explores vulnerabilities in the software components of a computer system; | 1
|
| Question | Do you agree that Meltdown and Spectre vulnerabilities both explore race conditions in existing memory circuits? | 1
|
| Question | Programming assignment to implement Multiplexor using Verilog HDL in Quartus Prime; | 0
|
| Question | Performance optimization of a Verilog HDL design; | 0
|
| Question | The design of a simple Arithmetic-Logic Unit (ALU); | 0
|
| Question | Revision questions | 0
|
### Final assessment
**Section 1**
1. Briefly describe the principles of Von Neumann architecture. Illustrate with a diagram.
2. Describe the steps that transform a program written in a high-level language such as C into a representation that is directly executed by a computer processor. Illustrate with a diagram; provide a brief description for each step.
3. Consider three different processors P1, P2, and P3 executing the same instruction set. P1 has a 3 GHz clock rate and a CPI of 1.5. P2 has a 2.5 GHz clock rate and a CPI of 1.0. P3 has a 4.0 GHz clock rate and has a CPI of 2.2. Answer the following questions: a) Which processor has the highest performance expressed in instructions per second? b) If the processors each execute a program in 10 seconds, find the number of cycles and the number of instructions. c) We are trying to reduce the execution time by 30% but this leads to an increase of 20% in the CPI. What clock rate should we have to get this time reduction?
**Section 2**
1. Prove that the AND and NOT logic gates can be implemented by using only the NOR logic gate.
2. What are the S/R latch and D latch? Draw the respective logic circuits. Describe the differences between them.
3. Briefly describe the key difference(s) between combinational and sequential logic circuits.
4. Define what a multiplexor logic circuit is (with an arbitrary number of inputs). Provide a truth table for a 2-to-1 multiplexor. Provide a logic circuit implementing a 2-to-1 multiplexor, that uses AND, NOT, and OR logic gates. Describe a Verilog module implementing such a logic circuit of a 2-to-1 multiplexor.
**Section 3**
1. Translate the following MIPS code to C (or pseudocode). Assume that variables f, g, h, and i are assigned to registers
s
0
,
{\displaystyle s0,}
s1,
s
2
,
a
n
d
{\displaystyle s2,and}
s3, respectively. Code to translate: sub
t
0
,
{\displaystyle t0,}
s1,
s
2
;
a
d
d
i
<
m
a
t
h
>
t
0
,
{\displaystyle s2;addi<math>t0,}
t0, 3; add
s
0
,
{\displaystyle s0,}
s3, </math>t0
2. Assume that two MIPS registers,
s
0
a
n
d
{\displaystyle {\textstyle s0and}}
 s1, contain the following binary data (for simplicity, we assume 8-bit registers, rather that 32):
s
0
:
00100000
;
{\displaystyle s0:00100000;}
s1: 01010101. What is the value of register
s
1
a
f
t
e
r
t
h
e
e
x
e
c
u
t
i
o
n
o
f
t
h
e
f
o
l
l
o
w
i
n
g
M
I
P
S
i
n
s
t
r
u
c
t
i
o
n
?
:
s
l
l
{\displaystyle s1aftertheexecutionofthefollowingMIPSinstruction?:sll}
s1, $s0, 4.
3. List and describe the purpose of general-purpose MIPS registers.
**Section 4**
1. Briefly describe the overflow and underflow problems for arithmetic operations.
2. Describe the difference between executing arithmetic operations with integers and floating-point values for a MIPS processor.
3. What is a precision problem for a floating-point operation?
**Section 5**
1. What is a Program Counter (PC) register of a processor?
2. Describe the principle of a pipelined CPU execution. Provide a diagram illustrating the concept. Briefly describe the 5 key stages of a classical pipeline.
3. What are the key differences between Control Unit (CU) and Arithmetic Logic Unit (ALU) of a processor? Which purposes do they serve?
4. What is a CPU datapath?
**Section 6**
1. What is an out-of-order execution? What hardware features of CPU implementation, in addition to an out-of-order execution, are exploited by Meltdown vulnerability? How serious is Meltdown vulnerability?
2. What is an instruction-level parallelism?
3. Describe the idea of a general-purpose GPU programming.
4. Briefly explain the working principles of a CPU cache.
5. Discuss advantages and drawbacks of a hierarchical memory model for computer systems.
### The retake exam
**Section 1**
**Section 2**
**Section 3**
**Section 4**
**Section 5**
**Section 6**
|