CS222 : Computer Organization and Architecture
Instructor: Dr. A. Sahu
End Semester Questions and Solutions End Semester Question and Solution
Course Structure | Lecture Slides | Assignments | Books | ClassTiming, Venue and Rules
- Instruction sets. RISC and CISC paradigms. Various addressing modes. Assembly language programming of at-least one of the existing systems.
- Arithmetic and Logic Unit. Instruction interpretation: Micro-operations and their RTL specification
Mid Semester Examination
- CPU design: Hardwired and Microprogrammed.
- Memory Organization, I/O transfer: Program controlled, Interrupt controlled and DMA.
Introduction to computer buses, peripherals, performance benchmarking and current trends in architecture.
Thanks to Prof Anshul Kumar (IIT Delhi), W. Stalling (Author of Computer Organization and Architecture Book), Ercegovac/Lang (Authors of Digital Arithmetics Book) for proving PPT/PDF slides.
- 28 Dec 2010 TUE: Introduction Computer Organization and Architecture PDF Slides
- 31 Dec 2010 FRI: History of Computer System and Instruction Set Architecture PDF Slides
- 03 Jan 2011 MON: Introduction to MIPS Instruction Set (Arithmetics, Register, Memory,Load/Store) PDF Slides [[[ SPIM/MIPS User Manual, Appendix A of Hennessy Paterson Book]]]
- 04 Jan 2011 TUE: Introduction to MIPS Instruction Set (Type of Instruction(R,I,J), Constant, Branch/Control) PDF Slides
- 07 Jan 2011 FRI: MIPS Assembly Language Program, Memory layout, Array/Pointer and SPIM Simulator PDF Slides Programming Assignment 1
- 10 Jan 2011 MON: Procedure Call/Return, Parameter Passing, Activation Record/Frame Pointer, Recursive Call PDF Slides
- 11 Jan 2011 TUE: Merge Sort Activation Record, Addressing Modes, RISC Vs CISC PDF Slides
(Programming Assignment 2)
- 14 Jan 2011 FRI: RISC Vs CISC, SPARC, PowwerPC and VAX PDF Slides
- 17 Jan 2011 MON: X86 ISA and Boolean Arithmetic, Integer/Floating Point, Addition/Substraction PDF Slides
- 18 Jan 2011 TUE: Boolean Adder Algorithms PDF Slides [[[Supplementary Material:http://www.cs.ucla.edu/digital_arithmetic/files/ch2.pdf]]]
- 21 Jan 2011 FRI: Adder ContinuedPDF Slides [[[Chap2, Digital Arithmetic, Ercegovac/Lang, Morgan Kauffman,2004 ]]]
- 24 Jan 2011 MON: Multiplication and Division PDF Slides [[[ Chap 3- Hennessy Book, Chap 6- Hamachar Book]]]
- 27 Jan 2011 THU (Makeup): Multiplication and Division Continued PDF Slides Booth Algorithm, Chap 9 Stalling
- 28 Jan 2011 FRI: IEEE Floating point(single,.double), representation, density, error PDF Slides [[[Chap 3- Hennessy Book, Chap -9 Stalling Book ]]]
- 31 Jan 2011 MON: Floating point arithmetic and Data Path for arithmetic instruction PDF Slides
- 01 Feb 2011 TUE: Data Path for Arith/LD/ST/CTR instruction PDF Slides [[ Hennessy 3rd Edition Book, Sec 5.4/Sec 4.4 of 4th Ed Book]]
- 03 Feb 2011 THU:(Makeup Class) Data path Design Methodology, Control Path and Performance PDF Slides
Programming Assignment 3
No Class From Feb 7 to Feb 14
- 15 Feb 2011 TUE: Control Path for Single Cycle CPU PDF Slides
- 17 Feb 2011 THU:(Makeup Class) Multi Cycle CPU Design (Data Path) PDF Slides [[ Hennessy 3rd Edition Book, Sec 5.5]]
- 18 Feb 2011 FRI: Multi Cycle Design Data Path + Control PDF Slides
Mid Semester Exam: 10.00AM-12.00Nn, 23Feb2011, L2/L3 Question Paper CS222mid.pdf, Model SolutionCS222midModSolution.pdf
- 28 Feb 2011 MON: Pipelined processor: (Performance, Hazards) PDFSlides
- 01 Mar 2011 TUE: Pipeline Hazards: Resource and Data PDF Slides
04 Mar 2011 FRI: Mid Sem Paper Evaluation, Model Solution, Discussion and Grading CS222midModSolution.pdf
- 07 Mar 2011 MON: Pipeline hazards: Data Hazards, Pipeline Stall, Data Forward Paths Contd.. PDF Slides [Sec 4.7 of 4th Edition Hennessy Book or 5.7 of 3rd Edition Hennessy Book ]
- 08 Mar 2011 TUE: Pipeline Hazards: Control/Branch Analysis (Pipe Stage, Clock timing, branch) PDF Slides [[[Sec 4.7 of 4th Edition Hennessy Book or 5.7 of 3rd Edition Hennessy Book, Sec 2.2 of Flynn Book]]]
- 11 Mar 2011 FRI: Pipeline Hazards: Control/Branch Analysis (Branch Elimination, Branch Speed Up, Branch prediction, Branch Target Capture) PDF Slides [[[Sec 4.5 of Flynn Book ]]]
- 14 Mar 2011 MON: Pipeline Hazards: Control/Branch Analysis (Branch Elimination, Branch Speed Up, Branch prediction, Branch Target Capture PDF Slides
- 15 Mar 2011 TUE: Pipeline: Super-scalar and VLIW processor PDF Slides [[Advanced Comp. Arch (A Design Space Approach)By D. Sima et al,Pearson Education India ]]
Take Home Exam 1 (Submission time 21 Mar 2011 Monday 10AM-11AM, if u submit after Monday credit will be zero): Submit a concise 10-12 pages handwritten report on super-scalar processor issue, decoding, shelving, dispatch, renaming and ROB. You can refer/read any book or web material but put proper references (for copied diagram and copied paragraph) in your report.
- 18 Mar 2011 FRI: Super-scalar and Memory Hierarchy Introduction PDF Slides
- 21 Mar 2011 MON: Cache Part I: Memory Hierarchy, Hit/miss, Direct mapped, Associativity PDF Slides
Assignment 4 on memory hierarchy
- 22 Mar 2011 TUE: Cache Part II: Example Program Cache Behaviour PDF Slides
- 25 Mar 2011 FRI: Cache Access Time, Multi Level, Indexing PDF Slides
- 28 Mar 2011 MON: Cache Policy (Read/Write/Load/Fetch/Replacement) PDF Slides[[Ref: Memory Systems And Pipelined Processors, Narosa Publishing House (1998), Rs 228, Chap 2-4 ]]
- 29 Mar 2011 TUE: Cache Performance Improvement (I) PDF Slides [[Sec 5.2, Comp.Arch-A Quantitative Approach, Hennessy Patterson Book, 4th Edition]]
- 01 Apr 2011 FRI: Cache Performance Improvement (II) PDF Slides
- 04 Apr 2011 MON: Memory SDRAM/DRAM, Disk PDF Slides
Take Home Exam 2 (Submission time 14 Apr 2011 Thursday 9AM-10AM, if u submit after Thursday credit will be zero): Submit a concise 10-12 pages handwritten report on Advanced Memory Addressing Scheme (Virtual Addressing, TLB, Paging and Segmentation). You can refer/read any book or web material but put proper references (for copied diagram and copied paragraph) in your report.
- 05 Apr 2011 TUE: Hard Disk Access PDF Slides
- 08 Apr 2011 FRI: Virtual address and Paging PDF Slides
- 11 Apr 2011 MON: IO Organization PDF Slides
- 12 Apr 2011 TUE: Grand Four IO Controller :PPC, PIT, PIC and DMA PDF Slides
- 18 Apr 2011 MON: Concluding Class PDF Slides
Assignment 4: Design of Cache Simulator using C/C++ (10 marks) Announced On 25 March 2011, Deadline:10.Apr.2011
- Statement: Download Statement PDFFILE Assignment 4 Statement and a example benchmark program Intrumented Matmul.c
Write a small document 2/3 pages and submit
- Deadline: 10.April.2011, 11.55 PM (before Mid night) Copy Case Lead to F Grade.
- After deadline grading: 1 mark deduction per day
- Submission procedureSend compressed (tar/gz/tgz/zip) version of directory containing all codes (C/C++/ALP/Document) to asahu AT iitg DOT ernet.in with “CS222 Assignment 4” as subject
Assignment 3: Design of MIPS Functional Simulator using C/C++ (10 marks) Announced On 3 Feb 2011
- Statement:Design of MIPS Simulator (To simulate 9 MIPS instructions as described in class) using C/C++. Inputs: A MIPS Assembly Program to multiply Two number stored at memory location L1 and L2, and store the output location L3.
1: Read Sec 4.4 (A Simple Implementation Scheme) of Patterson Book 4th Ed/Sec 5.4 of 3rd Ed, Write the assembly program. Design a document for MIPS Simulators
2: Your C/C++ Simulator program should be able to
- LOAD the PROGRAM ( Means: able to put two number at L1 and L2 location from user (data/txt Segment of Assembly program), read the Assembly program from a FILE (convert each textual instruction to binary form) and put in to IM and Initialize PC to start of your program)
-
- Execute the program: If possible Make it interactive so that at each step display the happening using printf (INC PC, NoW PC=2001, READ R[5], READ [7], ADD, RESULT to R[8])
- and at the end display the content of memory location L3 (using printf statement)
3: For each instruction you encounter, what you do IF/D/RF/EX/WB, Register FILE is int R[32], Memory is DM[1024] and IM[1024], Eech instruction is 32 bit
4: Write a small document 2/3 pages and submit
- Deadline: 20.Feb.2011, 11.55 PM (before Mid night), Extended to 10 Mar 2011 Copy Case Lead to F Grade.
- After deadline grading: 1 mark deduction per day
- Submission procedureSend compressed (tar/gz/tgz/zip) version of directory containing all codes (C/C++/ALP/Document) to asahu TA iitg DOT ernet.in with “CS222 Assignment 3” as subject
MIPS Documentation and SPIM Simulator
Please visit SPIM official website : http://pages.cs.wisc.edu/~larus/spim.html
- Assignment 2: MIPS Assembly Programming 2 (10 marks) Announced Date: 12 jan 2011
- Statement:Complete the assembly program for recursive merge sort.
- Phase 1:Write a pointer version (C and assembly)
- Phase 2: Include code to track the max stack size, Reduce local array size to n and find improvement (in stack size reduction)
- Phase 3:Write more space efficient program (C and assembly), still recursive
- Deadline: 24.Jan.2011, 11.55 PM (before Mid night), Copy Case Lead to F Grade.
- After deadline grading: Maximum X marks out of 10 marks scale
- Submission procedureSend both C programs, and Written ALP to asahu AT iitg DOT ernet.in with “CS222 Assignment 2” as subject
- Assignment 1: MIPS Assembly Programming 1 (10 marks) Announced Date: 7 Jan 2011
- Statement:Write and execute MIPS assembly language program to Read a String and print the String in reverse order.
- Phase 1:Write a C Program array version to do above work, Write the same C program pointer version
- Optional Phase 1.5: Download MIPS GCC, install, generate MIPS code from your C Program to view
- Phase 2: Write a MIPS Assembly Language Program Pointer Version and run on SPIM Simulator
- Deadline: 16.Jan.2011, 11.55 PM (before Mid night), Copy Case Lead to F Grade.
- After deadline grading: Maximum X marks out of 10 marks scale
- Submission procedureSend both C program, GCC Generated ALPs and Written ALP to asahu AT iitg DOT ernet.in with “CS222 Assignment 1” as subject
Text:
- Patterson, D.A., and Hennessy, J.L. , “Computer Organization and Design: The Hardware/Software Interface”, Morgan Kaufmann Publishers, 4th Edition, Inc.2005 (Very Good Book to Purchase and Keep a Copy with You)
- Patterson, D.A., and Hennessy, J.L. , “Computer Architecture : A Quantitative Approach ”, Morgan Kaufmann Publishers, 4th Edition, Inc.2005 (Very Good Book to Purchase and Keep a Copy with You)
- Hamacher, V.C., Vranesic, Z.G., and Zaky, S.G., “Computer Organization”, 5/e. McGraw-Hill. 2008
- Tanenbaum, A.S, “Structured Computer Organization”, Prentice-Hall of India. 1994
- Stalling W, “Computer Organization and Architecture ”, Pearson Eduction India. 2008
References:
- D V Hall, Microprocessors and Interfacing, TMH, 1995
- Brey. Barry B, The Intel Microprocessors 8086/8088, 80186/80188, 80286, 80386, 80486, Pentium, and Pentium Pro Processor Architecture, Programming, and Interfacing, Prentice Hall India, 2005
- Venue: 1201
- Timing : Slot C { MON:10AM–11AM, TUE:11AM-12Nn, FRI:9AM-10AM, (Skipping/Makeup THU:8AM-9AM) }
- Rules :
- 75% attendance mandatory
- Attendance will be calculated before end semester examination
- 15% Assignment + 40% mid term+ 45% end term