2190250 Computer Architecture and Organization

2nd semester Jan 2020
classroom :  Tuesday  9:00-12:00, Eng y100,  room 404

Due to COVID-19  the class moved to online on March 2020

Official syllabus

COMP ARCH ORG

Computer evolution and performance; computer structure, function, and interconnection; memory hierarchy; cache memory; virtual memory; storage; input/output; operating system support; process; interrupt; system call; instruction set; processor structure and function; RISC vs CISC; pipelining; super-scalar processors; multi-core computers.

Aim

Today digital technology permeates every corner of our society. There are three big trends that shape our future. The first one is the coming of Artificial Intelligence.  The second one is the rise of Automation.  The last one the revolution of technology to transfer money.  These advancements rely on the power of computing. This class introduces an overview of modern computer system. The class is divided into two parts: the first one discusses fundamental of performance of the modern processor, the second part discusses how a processor works.

Topics

Fundamental of performance
performance
memory hierarchy
instruction level parallelism
data parallelism
How a processor work
cpu cycle
simple cpu
assembly language
interrupt programming

Announcement

  6 Jan 2020   start of the class
  17 Mar 2020  start of online lecture
  . . .

Assesment

20%   homework
40%   midterm (2 hours)
40%   final (2 hours) 

Lecture

part 1
          Introduction  pptx
Performance  Chapter 1
Memory Hierarchy  Chapter 2
Instruction level parallelism  Chapter 3
    Pipeline with quiz solutions
Data parallelism  Chapter 4
    lecture on data parallelism

part 2
          computer structure    my textbook chapter 1
          logic and instruction execution
          instruction set (from Stalling)
          S2 processor instruction and assembly language (pptx)
          S2 processor and instruction set (web)
          topics of assembly language programming
               lecture on assembly language programming
          high level language to assembly  
               interrupt programming, IoT board simulator
          Development of Graphics Processing Unit
Programming of Graphics Processing Unit    NPU webpage
General Purpose GPU applications
programming with CUDA (by Tongjai Yampaka)
link to video: Introduction to programming CUDA
prepare for final exam

Next week

21 Jan 2020   Next week we will continue the discussion on Cache memory and Virtual memory

11 Feb 2020  Next week we will discuss Data parallelism

. . .

In class work

7 Jan 2020   Exploring the design decisions.  Cost of fabrication of computer chips  ( pdf )

21 Jan 2020   Comparing the performance of three machines. (link to the main story) ( pdf )

. . .

Videos for part 2

Instruction set 
 part 1/5 instruction type and cycle https://youtu.be/ue5ur_EAuVI
 part 2/5 type of operands https://youtu.be/3TcHsg1gy44
 part 3/5 instruction set examples https://youtu.be/R7yLVM_dWIM
 part 4/5 S2 instruction set https://youtu.be/aSqWmlinxow
 part 5/5 S2 instruction format, assembly language https://youtu.be/OFmrhNNo_HU

Assembly language
 part 1/4 write assembly code https://youtu.be/3gY_J4LUwL8
 part 2/4 using assembler https://youtu.be/xULDozxw2cw
 part 3/4 using simulator to run machine code  https://youtu.be/POUHaWQfUX8
 part 4/4 writing complete program  https://youtu.be/RpYhAwTKALA

High level to assembly
 part 1/3 runtime environment  https://youtu.be/3GuQAe9fv_k
 part 2/3 interrupt https://youtu.be/8DPrce65YMM
 part 3/3 programming with interrupt https://youtu.be/ONWIjxriglc

GPU
 part 1/3 the development of GPU  https://youtu.be/ediGbtrePAQ
 part 2/3 programming GPU  https://youtu.be/YMef9pQBTz0
 part 3/3 programming reduction  https://youtu.be/8QkiZ82sxow

Introduction to programming in CUDA https://youtu.be/FL240cnJIRM

Tools

Tools for interrupt programming    iot-rz-19.zip  (for Windows)  
    xtest.zip  xtest_1.zip (bug fixed) (for Mac, executable only)
Tools for assembly language programming    s21-3.zip
NPU assembler and simulator tools  npsim4-1.zip   xnpu4_1.zip (ver 1.1 for MacOS)

  on Mac use the command like this:
$ ./xasm4 < infile > objectfile
$ ./xsim4 objfile


Homework

24 March  Write two programs in assembly language.  See Assignment in Courseville for details. (due 4pm 27 Mar)
31 March  Use the software tools provided and play with it.  Try running the demo programs showed in the class.  (no submission)
. . .

Additional information

Reference textbook:  Computer Architecture: A Quantitative Approach 5th Edition by John L. Hennessy, David A. Patterson, Morgan Kaufmann, 2011. For the latest edition of this book  link to Amazon

William Stalling, Computer Organization and Architecture, latest edition   link to Amazon

Chongstitvatana, P., "Computer Architecture: a synthesis approach", 2002.

Transistor level simulation of an antique CPU.  6502 is used in the iconic Apple II machine.
    http://visual6502.org/JSSim/index.html

last update 28 Apr 2021