Computer Architecture and MIPS Assembly Language Programming

with Tens of Solved Examples and Assignments with solutions, lecture notes, Exam samples with solution, and tutorials.

Ratings: 3.23 / 5.00




Description

Welcome to the Computer Architectures and MIPS Assembly Programming Course!

* Updated in Feb 2024*  Several Detailed Explanation Lecture Videos are Uploaded(more than 5 hours)


This course's major purpose is to outline the architectural aspect of computers. In other words, it is concerned with how computers, as machines, execute instructions at many levels, including the hardware and assembly language levels. Students learn about the fundamental technological structure and evolution of computers, fundamental hardware components, MIPS instructions set architectures and its assembly language, and processor microarchitecture including the control unit (MIPS is used as an example).

This course can be divided into 2 chapters: Software and Hardware. In the software chapter (Sections 1-3) you will learn how to write an assembly language program for MIPS architecture and in the hardware chapter (Sections 4-7), I will show you how the internal components of the MIPS processor work together to execute your program. Finally, I prepared several tutorials and assignments with their solutions to help you better understand this topic.

Course Outline

1. Introduction to MIPS Assembly Programming

  • Memory Operand: Load Word & Store Word in MIPS Assembly Language

  • Immediate Addressing Mode & Signed/ Unsigned data in MIPS Assembly Language

  • ADD, ADDI, ADDU, ADDIU, SUB, LW, and SW Instructions in MIPS

  • Branches and Jump Instruction in MIPS Assembly Language + how to read array[i]

  • Loop Structure in MIPS Assembly Language

  • The Other Comparison Instruction + Logical Instructions in MIPS

  • MIPS Alignment Restrictions: .align, .byte .half and .word Assembler's directive

  • How Data will be Stored in Memory in the MIPS Architecture?

  • MIPS System Call

  • Simple I/O and MIPS System Calls: Hello World!

  • Simple I/O and MIPS System Calls: Read 2 Numbers and Display their Summation

  • Simple I/O and MIPS System Calls: an Example of IF-ELSE Structure in MIPS

  • Simple I/O and MIPS System Calls: an Example of IF-ELSE-IF Structure in MIPS

  • MIPS Divide Instruction + Determine whether the input number is odd or even

  • MIPS Example: Read 5 Numbers and Print Their Average

  • MIPS Multiplication Instruction

  • MIPS Example: Display the Multiplication of 2 numbers + Factorial Example

  • MIPS Example: Add Two Integer Numbers

2. Learn MIPS Programming with Examples

  • MIPS Example: Read a char and determine whether it is an uppercase, lowercase or etc. in MIPS

  • MIPS Example: Determine the number of zeros in the binary notation of a number

  • MIPS Example: Read two numbers A and B and  compute  and print (A+2*B)/5

  • MIPS Example: Convert C code to MIPS Assembly

  • MIPS Examples: Learn How to Divide and Multiplication

  • MIPS Example: Find the Maximum Element of an Array in MIPS Assembly Language

  • MIPS Example: Find Both Maximum and Minimum of an Input Integer Array

  • MIPS Example: Nested IF-ELSE IF Structure

  • MIPS Example: Convert a capital letter  to lowercase and vice versa

  • MIPS Example: Check the input character and determine is it alphabet, digit or .

  • MIPS Example: Read 2 operands and  an operator and print the result

  • MIPS Example: Compute the sum of N integers: (1 + 2 + ... + N),  While Structure

3.Functions in MIPS Assembly Language with Several Examples

  • Functions in MIPS - Jump and Link (jal) & jump Register(jr) Instructions

  • Functions in MIPS - How to Pass Arguments to the Functions?

  • Functions in MIPS - Who saves the register? Spilling Registers

  • Functions in MIPS - MIPS's conventions to split register spilling chores

  • Functions in MIPS - MIPS Stack and Push and Pop Implementations

  • Functions in MIPS - Factorial Function

  • MIPS Example: Write a function to read N numbers and store them in an array

  • MIPS Example: Write a function to reverse an input array

  • MIPS Example: Write a function to count the number of divisors of an argument

4.MIPS Instruction Encoding

  • MIPS Instruction Encoding: R-Type Instructions

  • MIPS Instruction Encoding: I-Type Instructions

  • MIPS Instruction Encoding : J-Type Instruction

5. Computer Architecture: Processor Datapath, ALU and Register File Design

  • Generic Datapath and Register Files Part 1

  • Generic Datapath and Register Files Part 2

  • ALU Design Part 1

  • ALU Design Part 2


6. Single-Cycle Datapath for MIPS Architecture

  • MIPS Datapath Overview

  • Datapath for Fetching an Instruction and increment PC  in MIPS Architecture

  • Datapath for R-type Instruction in MIPS Architecture

  • MIPS Datapath for Load Word (LW) and Store Word (SW) Instructions

  • Datapath for Branch Instructions in MIPS Architecture

  • Combining the Datapaths of R-type Instructions and LW/SW Instructions

  • Integrating  the datapaths of R-Type, Memory and Branch Instructions in MIPS Arc

  • R-Type  + Memory Instructions Data Path

  • Control Unit for the Single-cycle  MIPS Processor

  • ALU Control Unit Design for MIPS Architecture

7. Multi-Cycle Datapath for MIPS Architecture

  • Multi-Cycle Datapath for MIPS Architecture Part 1

  • Multi-Cycle Datapath for MIPS Architecture Part 2

  • Multi-Cycle Datapath for MIPS Architecture Part 3

  • Multi-Cycle Datapath for MIPS Architecture Part 4

8. Tutorials + Assignments

  • Tutorial + Assignment: Introduction to MARS

  • Tutorial + Assignment: Introduction to MIPS Assembly Programming

  • Tutorial + Assignment: Integer Arithmetic

  • Tutorial + Assignment: Flow Control

  • Tutorial + Assignment: Arrays and Files

  • Tutorial + Assignment: Integer Multiplication and Division

  • Tutorial + Assignment: MIPS Functions and the Stack Segment

  • Fibonacci sequence

  • Compute the summation of even numbers between 2 input numbers

  • Simple I/O in MIPS Assembly Language

  • IF-ELSE-IF Structure in MIPS Assembly Language

  • Single-Cycle Datapath Quiz with Video Solution

  • Multi-cycle Datapth

The course is Example-based. Almost every lecture and component of the course directly leads to a hands-on laboratory assignment with a solution. The more you practice with MIPS hardware and software, the more proficient you will become.

I use lots and lots of examples. I take you step-by-step through the lessons – each time providing sample code and documentation to make sure you are supported through the course.

The course does not waste your time. From the very beginning, we jump right into your first project – Let's Get Started.

I am here to help. I am an educator with a singular focus on providing a meaningful experience for my students. And, while I cannot do the work for you, I am willing to work WITH you to help you succeed.

The goal of this course is to shed light on the obscure interface layer between hardware and software. In this context, we will go over instruction set architectures, assembly programming, computer/memory organization, machine language conversion, data bus, and sub-routines, which are all important topics in computer architecture. This course teaches students about the core hardware components of a computer and how they interact with one another. It educates students about the computer's many layers, such as the application level, operating system level, assembly language level, and machine language level.

Computer architectures, which I recommend to anyone working on electronic system design or computer programming and who is interested in processor design, have opened many doors for me in my own career. I hope you find this tutorial useful as well.



What You Will Learn!

  • MIPS Instruction Set Architecture
  • MIPS Assembly Programming - Theory and Practice with tens of examples
  • RISC ISA Architectures
  • Single Cycle and Multi-Cycle Processor Design
  • Arithmetic and Logic Unit (ALU) Design
  • Design the Control Unit of a Real Processor
  • Convert MIPS Assembly Instructions into Machine Codes
  • Understand Computer internal parts such as ALU, Datapath and control Unit
  • Understand CPU (Central Process Unit) and how it works

Who Should Attend!

  • Computer or Electrical Engineering students
  • Programmers who want to learn about computer hardware / software interface
  • Everyone who is interested in Computer / Processor structures!
  • Candidates considering applying for embedded system design / programming positions in defense industry, aerospace, R&D and IT companies