2110682 Embedded and Real-Time Systems
Department of Computer Engineering
Faculty of Engineering, Chulalongkorn University
Course duration : Jan-April 2025
Lecturer
: Prabhas Chongstitvatana, Prof.
office Eng build 4,
Floor 17, room 10
email: prabhas at
chula dot ac dot th
Lecture
: Sunday 13.00-16.00
The content of the course is a mixed between hardware and software.
Embedded systems are computer systems with special requirement on
constraints such as low power, high integration, real-time. On the hardware
side, it includes embedded processors and low level programming, logic
design, integrated circuits. On the software side, it includes
Operating systems scheduling and real-time constraints. Here are the
list of topics:
Introduction to embedded and real-time systems
Microprocessor
Assembly level programming
Memory, Peripherals and Microprocessor interface
Operating systems and task scheduling
Real-time systems and their requirements
Internet of Things
How we learn
We learn by doing both hardware and software. The activities include
embedded system model construction, some programming, and hands-on session.
The assignments will be given out periodically throughout the term. A small
project will be given around midterm. Students must present the results of
their projects. At the second half of the semester, a real hardware
will be presented. Students are assigned to design and implement a
small embedded system. The project will be presented in the class. The
final exam is "open book" and has an element of system design plus some
"pseudo" programming.
Announcement
12 Jan 2022 The class starts.
...
Timetable
January
Introduction
Embedded
Processors
Embedded Systems Design
Microprocessors
IOT
board (platform for interrupt programming) demo-rz.txt
example of using IoT board (in Rz): stopwatch
programming with interrupt counting
events
Assembly language S2
version 1: 32-bit processor
example of writing assembly
language: find max
Rz
language and its compiler
February
Operating systems and task scheduling basic
OS concepts
Multitask-OS (MOS) (in assembly) mos2.txt
(in Rz) mos-rz.txt
lecture from Matt Welsh, Harvard, semaphores.pdf
semaphore: demo from William Stallings, U.
of Queensland
implementing semaphores
example reader-writer mos-rz2.txt
Cooperative
Processes
Cooperative
Multitask OS (CMOS)
Project discussion
logic design Basic Logic
RISC-V
instruction set
datapath
control unit
RISC-V
assembly language programming
March
Project presentation
real-time systems RTOS real-time
scheduling
Embedded Systems
Communication
Embedded systems practice (Arduino
Board)
Actual hardware: Arduino experiment
April
memory, memory and
interrupt i/o memory system
design
peripherals and interface
peripherals
(counter, timer, PWM, step motors, LED display, LCD, UART, USB)
digital/analog
conversion (ADC, DAC, MCP4922
code experiment)
Internet of Things: Everything
as a service
I2C bus
RTC experiments DS1307
(polling) (interrupt)
May
final exam
final project presentation
Homework
Weekly assignments in Mycourseville
Videos
- Introduction to Embedded systems: types of embedded systems. https://youtu.be/FCNBOCF4Myo
- Embedded Systems: constraints, design considerations. https://youtu.be/IBQWSlTKvmM
- Real-time considerations, design abstraction, hardware vs
software. https://youtu.be/U6Hv92ujSUs
- Embedded processors, FPGA, IoT board, demo stopwatch. https://youtu.be/xtmkvzBAqrc
- Multitask operating system: OS concept https://youtu.be/1ViLKdoQ_tI
- Multitask operation system: Multitask OS https://youtu.be/xfF2vMC5x-0
- Assembly language (S2) https://youtu.be/A2IBYWVNLTU
- MOS demonstration https://youtu.be/qJhvgT5Y3yY
- Cooperative operating system
<coming soon>
- RISC-V Processor instruction execution https://www.youtube.com/watch?v=iGoyB_0qXYE
- RISC-V Control unit https://www.youtube.com/watch?v=X17kvp8s2P0
- RISC-V assembly language programming https://youtu.be/nh3xYrSxn3w
- Compiling C to RISC-V assembly language https://youtu.be/AsDMXXKgvpU
- (optional) RISC-V interpreter with
detailed control sequences https://youtu.be/4Sal1Goe2WE
- Real-time scheduling part 1/2: scheduling, earliest deadline
first https://youtu.be/YcQ32yjaYBg
- Real-time scheduling part 2/2: scheduling examples https://youtu.be/jggQHbj14LM
- Peripherals part 1/4: system on chips, counter and timers https://youtu.be/zNv3vxFRyeo
- Peripherals part 2/4: example Reaction timer, watchdogs https://youtu.be/e5xiqw7pFMI
- Peripherals part 3/4: UART, LED display https://youtu.be/yYlNRgmMV2M
- Peripherals part 4/4: motor controls, LCD controller https://youtu.be/GTmUMa8VGtE
- Digital/Analog converter part 1/3: general theory https://youtu.be/krx1w6NHFWM
- Digital/Analog converter part 2/3: experiment https://youtu.be/S5x0DqlxK7E
- Digital/Analog converter part 3/3: demonstration https://youtu.be/VmAOpFbgKhA
- I2C bus https://youtu.be/H6yizZikGEI
- RTC experiment part 1/2: polling mode https://youtu.be/F1G6IIumyG8
- RTC experiment part 2/2: interrupt mode https://youtu.be/Q0pQgPp_RjQ
New for 2025
Concurrency, Semaphore, Process synchronization https://youtu.be/5DdX9932-OY
Demonstrate IoT board simulator with interrupt https://youtu.be/zpGVVKbxgUw
Demonstrate IoT board simulator with semaphore https://youtu.be/FoDCzYfSe-A
. . .
Recommended Textbooks
1. Philip Koopman, Better Embedded System Software, Drumnadrochit
Press, 2010, ISBN-10: 0-9844490-0-0.
2. Ball S, Embedded Microprocessor Systems: Real World Design 2nd
edition, Newnes 2000
3. Vahid F, Givargis T, Embedded System Design: A Unified Hardware/Software
Introduction, Wiley 2002
4. Kopetz H, Real-Time Systems: Design Principles for Distributed Embedded
Applications, Kluwer 1997
Additional Materials
Transistor
level simulation of an antique CPU. 6502 is used in the iconic Apple
II machine.
http://visual6502.org/JSSim/index.html
Computer Organization and Design: The hardware/software interface
(RISC-V edition), D. Patterson, J. Hennessy, Morgan Kaufman, 2018. link
to Amazon
RISC-V Instruction Set Manual v.2.2 2017
Course Assessment
Assignments 10%
Mid project 30%
Final project
30%
Final
exam
30%
Tools
IoT board: Rz compiler, S21 assembler, simulator (with MOS and
input): iot-rz-19.zip
update tools (in Python): iot-rz-py-5.zip
11 Feb 2025
s21 tools : assembler and simulator s21-3.zip
rz3.6.1 compiler with s21 assembler and simulator rz361-2.zip
rz3.6 compiler for MacOS (intel-based cpu) can be run with Rosetta 2 in
Apple Silicon xiot-rz.zip
MOS in Rz mos-rz.txt
MOS with semaphore mos-rz2.txt
LogicWork5 tutorial
Arduino 1.0.5 boards.txt (configuration file)
Venus, RISC-V online interpreter
Compiler Explorer, RISC-V compiler on the
web (select "rv32gc gcc")
Acknowledgement
Slides and presentations are kindly permitted by Setha Pan-gnam, Chalermek
Intanagonwiwat, Krek Piromsopa
last update 11 Feb 2025