Concordia University Department of Electrical and Computer Engineering COEN 311 – Computer Organization and Software (3.5 credits) Fall 2015 Course Outline Professor: Anjali Agarwal, PhD, P.Eng. Office: EV 5.157 Telephone: 514-848-2424 Ext.3090 Email: aagarwal@ece.concordia.ca Office hours: Tuesdays, 12:30 - 14:30 or by appointment Course webpage: http://users.encs.concordia.ca/~aagarwal/coen311/coen311.html 1. Calendar Description Prerequisite: COEN 212, 243, previously or concurrently. Introduction and terminology. Overview of the functional units and the operation of a computer. Machine programming fundamentals: instruction structure, addressing modes, the assembly process, examples of architectures. Case study of a microprocessor architecture: programming model, assembler and addressing modes, instruction set and formats; programming examples. Stacks, subroutines, macros, exceptions, interrupts. Program and interrupt driven I/O. Memory management. Introduction to system software: system kernel, system services, assemblers, compilers, linkers and loaders, user-level view of operating systems. Lectures: three hours per week. Tutorial: one hour per week. Laboratory: 15 hours total. 2. Course Objectives The objective of this course is to introduce the basic concepts of the computer organization and structure from both the hardware and software viewpoints. Students will learn the principal components of a computer system and their operational and design concepts. They will also learn how assembly language instructions are represented and decoded following different modes of addressing, which teaches them to write assembly language programs using the concepts of stacks, subroutines and macros. The course also teaches students how to analyze computer system and implement efficient assembly solutions. 3. Course Learning Outcomes (CLOs) Upon successful completion of the course, students will be able to 1. Describe the principle components of a computer system. 2. Describe how memory is organized and the different internal architectures of a CPU. 3. Describe how memory and CPU interface for instruction execution. 1 4. Describe machine programming and assembly programming concepts, including instruction set and formats, assembly modes, flow control, and parameter passing techniques. 5. Apply assembly programming concepts to demonstrate skills in implementing efficient assembly programming solutions. 6. Analyze performance of assembly language programs with respect to their execution time and size. 7. Demonstrate skills in debugging existing assembly language programs. 8. Recognize alternative computer organizations and instruction formats. 4. Graduate Attributes This course emphasizes and develops the following CEAB (Canadian Engineering Accreditation Board) graduate attributes and indicators: Graduate Attribute Indicator Level of knowledge CLO Knowledge Base KB-3. Knowledge base in a specific domain (ELEC and COEN) PA-1. Problem identification and formulation PA-2. Modelling PA-3. Problem solving PA-4. Analysis DE-1. Define the objective DE-2. Idea generation and selection DE-3. Detailed design DE-4. Validation and implementation UET-1. Ability to use appropriate tools, techniques, and resources UET-2. Ability to select appropriate tools, techniques, and resources Intermediate 1, 2, 3, 4 3, 5, 6, 7 Problem Analysis Design Use of Eng. Tools Intermediate Intermediate 2, 4, 5, 8 Intermediate 4, 5, 6, 7 5. Evaluation There will be six (6) assignments to be solved at home and not marked. One week after receiving an assignment you will write a 10 min Quiz constituting of at least one question selected from the latest assignment (plus questions on basic understanding of the topics in the assignment). There will be 6 quizzes in total – the best 5 out of 6 will be counted towards 15% of the final grade. There will be a midterm exam for 20% of the final grade, and a final exam for 50% of the final grade. There will be five (5) labs (alternate weeks) that will count towards 15% of the final grade. Note: The student will fail the course if he/she does not secure at least 50% in the laboratory component of the course. Lab exemption is NOT allowed. 2 Evaluation tool Weight Option 1 Option 2 Assignment 1/ Quiz 1 Assignment 2/ Quiz 2 3% 3% 3% 3% Assignment 3/ Quiz 3 Assignment 4/ Quiz 4 3% 3% 3% 3% Assignment 5/ Quiz 5 Assignment 6/ Quiz 6 Lab 1 Lab 2 Lab 3 Lab 4 Lab 5 Lab Test Midterm Exam Final Exam 3% 3% 2% 2% 2% 2% 2% 5% 20% 50% 3% 3% 2% 2% 2% 2% 2% 5% 0% 70% Indicator KB-3, PA-1, PA-3, PA-4, DE-1, DE-3 KB-3, PA-1, PA-2, PA-3, PA-4, DE-1, DE-2, DE-4 KB-3, PA-1, PA-4, DE-1, DE-4 KB-3, PA-1, PA-2, PA-3, PA-4, DE-1, DE-2, DE-3, DE-4 KB-3, PA-4, DE-3, DE-4 KB-3, DE-3, DE-4 UET-1 UET-1, UET-2 UET-1, UET-2 UET-1, UET-2 UET-1, UET-2 UET-1, UET-2 KB-3, PA-1, PA-2-PA-3, PA-4, DE-4 KB-3, PA-1, PA-2-PA-3, PA-4, DE-1, DE-2, DE-3, DE-4 Note: o o o There is no standard relationship between percentages and letter grades assigned for the course. The pass mark for the course is 50%. Assignments, quizzes, and exams may include theoretical as well as programming problems. 6. Course Organization 6.1. Lectures, Tutorials, and Labs There will be two lectures a week. Each lecture lasts approximately 1 hour and 15 minutes. The course slides will be posted on the course website. It is highly recommended to review the slides before you come to class. Note that slides are not “lecture notes”; you are responsible for creating your own notes. You may also periodically refer to the recommended textbooks. The lectures for COEN 311/2 are scheduled on: Tuesdays and Thursdays from 2:45pm to 4:00pm Room H501. The tutorials for COEN 311/2 are scheduled on: Thursdays from 1:15pm to 2:05pm Room H401, and will start the first week of class. The lab for COEN 311 is a biweekly lab. Check your personal registration schedule for the scheduling details of your lab section. Labs commence the week of Sept. 21, 2015 for QJ section, and the week of Sept. 28, 2015 for QI and QK sections. More details on labs can be found in ‘Laboratory Guidelines’ document on the course website. 3 6.2. Textbook Recommended Optional Textbooks: 1. Course pack number 978-1-77079-350-7 Computer Organization and Software, by Dr. Tahar. 2. "Computer Organization" Fifth Edition by Hamacher, Vranesic and Zaky, McGraw Hill, 2002. ISBN: 0-07-232086-9. Other references: 1. "Computer Organization and the MC68000'' by Panos E. Livadas and Christopher Ward, Prentice Hall, 1993. ISBN: 0-13-158940-7. 2. "Computer Organization and Design: The Hardware/Software Interface" by David A. Patterson, John L. Hennessy, Morgan Kaufmann, ISBN:1-5580-491-X. 3. "Computer Architecture and Design: Designing for Performance", by William Stallings, Prentice Hall, ISBN: 0-13-035119-9. Additional resources such as interesting Internet links will be posted on the course website. 6.3. Assignment/Quiz Schedule The assignment and Quiz schedule is as follows: 1 2 3 4 5 6 Assignment posted on Thursday 24 September Thursday 8 October Thursday 15 October Tuesday 03 November Tuesday 17 November Thursday 26 November Quiz Dates Thursday, 01 Oct Thursday, 15 October Thursday, 5 November Thursday, 12 November Tuesday, 24 November Thurday, 03 December Notes: All assignments are of individual type. There is no need to submit the assignments. 10 min Quizzes will be held during the lectures. 6.4. Midterm Exam The midterm exam is scheduled for: Thursday Oct 29. The midterm will take place during the regular class schedule in lecture room. All the material covered before the exam date will be included in the exam. No make-up midterm exam will be set. Absence from the midterm regardless of the reason will automatically result in zero mark on that. 6.5. Final Exam 4 The final exam is scheduled by the University. The date and place will be announced later. Final exam will cover the whole course material. 7. Tentative Course Plan REFERENCE LECT TOPIC 1 COEN 311 Course Outline Introduction to Computer System (basic concepts of machine language, assembly language, structured layer of computer systems – hardware, software, user, performance criteria of computer system) 2, 3 Data Representation (Binary numbers, Hex numbers, 2’s complement, arithmetic addition, subtraction, multiplication, division, Floating point numbers, IEEE standard) 4, 5 Memory (Main memory, addressing, big-endian/little-endian, capacity, memory mapping, memory locality, memory hierarchy - basic concepts of cache, secondary storage and virtual storage) Course Slides 6, 7 Central Processing Unit (instruction representation, data transfer between memory and CPU, General Purpose architecture and Accumulator architecture and their functional units, instruction execution steps, execution time) Course Slides 8 Motorola 68000 (principal components, introduction to machine language and assembly language) Course Slides 9 Motorola 68000 (Instruction Representation and decoding, introduction to assembly modes Course Slides 10 Assembly Modes (Modes 0, 1, 2, 5 and their micro-instructions, writing simple assembly language programs) Course Slides 11 Branching instruction (branch always, equal-to, greater-than, less-than, calculating displacement, dbra instruction) Hand Assembly (first-pass, and second-pass) Course Slides 12 Implementing Loops (While, Repeat, For) Motorola Directives and Constants (Run-time, assembly-time, org, end) Course Slides 13 Additional Addressing Modes (Modes 3, 4, 6, 7, and Quick data) Course Slides 14 Logical operations (and, or, eor, not) Shift and Rotate operations (arithmetic shift, logical shift, simple rotation, extended rotation) Bit Manipulation Examples Course Slides 15 Motorola Instruction Set, and Review Course Slides 16 Midterm Exam (October 29) during lecture timings 17 Bus Interconnection Scemes (Single-bus, Multiple-bus, Bus arbitration, bus timings) Input/Output (I/O Module Structure, Introduction to I/O Techniques – Programmed I/O, Interrupt-driven I/O, DMA) Course Slides 18 Subroutines (Calls and Returns – jsr, bsr, rts, rtr instructions, concept of Stacks, nested subroutines) Course Slides 19, 20 Subroutines (Types of parameters, Passing Parameters – by Register, Memory block, Stack) Course Slides Course Slides Course Slides 5 LECT TOPIC REFERENCE 21 Subroutines (multiple_move, Nested subroutine, recursive subroutine) Course Slides 22 Macros (difference between macro/subroutine, parameter passing in macros, Labels) Course Slides 23 Assembly Program Examples (string reversal, prime number, largest number, string concatenation) Course Slides 24, 25 Exceptions (Internal, external) Course Slides 26 Course Review Course Slides You may recommend the following Sections numbers from the recommended optional textbook by Hamacher. However, the Course Slides may not follow these. Basic Structures of Computers (Chapter 1 - Sections 1.1 - 1.5, 1.7) Computer Arithmetic (Sections 2.1, 6.1, 6.3, 6.6, 6.7.1) The Memory System (Section 2.2, 2.3, Chapter 5 - Basics of each memory device) Basic Processing Unit (Chapter 7 - Sections 7.1 and 7.2 ) Machine Instructions and Program (Sections 2.4 - 2.12) Input/Output Organization (Chapter 4 - Sections 4.1, 4.2, 4.3.2 ) Motorola 68000 (Chapter 3 - Part II) 8. Academic Honesty The most common offense under the Academic Code of Conduct is plagiarism which the Code defines as “the presentation of the work of another person as one’s own or without proper acknowledgement.” This could be material copied word for word from books, journals, internet sites, professor’s course notes, etc. It could be material that is paraphrased but closely resembles the original source. It could be the work of a fellow student, for example, an answer on a quiz, data for a lab report, a paper or assignment completed by another student. It might be a paper purchased through one of the many available sources. Plagiarism does not refer to words alone - it can also refer to copying images, graphs, tables, and ideas, copying (even with modifications) of program segments. “Presentation” is not limited to written work. It also includes oral presentations, computer assignments and artistic works. Finally, if you translate the work of another person into French or English and do not cite the source, this is also plagiarism. In Simple Words: Do not copy, paraphrase or translate anything from anywhere without saying from where you obtained it! The Academic Code of Conduct is available at: http://www.concordia.ca/students/academic-integrity/code.html 6