2110714 Digital Systems
Second semester 2004
Prabhas Chongstitvatana
contact prabhas at chula dot ac dot th
Engineering building 4, room 18-13 phone 02-2186982
Synopsis
We will study abstraction of digital devices, language for
programming
them and the related system software that use the devices to run
applications, with emphasis on real-time systems.
We will cover three main areas:
- how a processor work (6 weeks)
- relationship between high level language and
machine code (3
weeks)
- real-time operating systems (3 weeks)
Syllabus
What's new
4 Jan
2005 Nut to S2 code
generator M. Anton Ertl.
PhD thesis how the assembler work
5 Jan
2005 Recursive microprogram
Nut version 2.0 readme
18 Jan 2005 Nut version 2.1 readme NOS
NOS code Som
system (especially s-code)
21 Jan
2005 NOS version
1.0 Nut version 2.2
24 Jan 2005 NOS version 1.1 Nut version 2.3 (with NOS 1.1)
readme
25 Jan
2005 NOSS v.1.1
readme
1 Feb
2005 Nut
v2.4 (with new assembler) readme
7 Feb
2005 Final
Project
11 Feb 2005 code optimisation Nut v2.5 (with optimised compiler)
readme
20 Feb 2005 NOS
explain complete NOS
(with mail)
....
topic by week
Tools
For
a public domain C compiler see my webpage (it is dated 2001, see
the original site for update)
A-language package sample of session
Nut-teach package version 0.2
Nut compiler, n-sim, microprogram generator except the full
microprogram for n-machine
microprogram for n-machine
S2 tools set
Nut to S2 code generator
Nut version 2.0 readme
Nut version 2.1 readme
NOS code
NOS version 1.0
Nut version 2.2
NOS version 1.1
Nut version 2.3 (with NOS 1.1)
readme
NOSS v.1.1 readme
Nut v2.4 (with new assembler)
readme
Nut v2.5 (with optimised compiler)
readme
complete NOS (with mail)
Homework
1 Experiment with Booth's multiplication
algorithm
for 2's complement number
2 Write quicksort in non-linear machine code, study
activation record
3 Try self-machine
4 Write quicksort in an
assembly language S2, implement ldx, stx, new in
n-sim
5 Write microprogram of n-machine
implementing if get put
6 Do the midterm project: define a processor with your own
instruction set and write its simulator
due date 28 December 2004. The report
includes
6.1 instruction set description, the
format, the encoding, the meaning
6.2 the data path
6.3 how your simulator work.
6.4 a small test program to show the
simulator in working condition
7 Write a simple code generator for your processor (midterm
project) based on RZ S2 code generator
8 Study topics in OS: process, process
synchronisation, process communication.
9 How many semaphore is needed to synchronise n
processes?
10 Write and debug your code generator to work under NOSS
to run a single process.
11 Run your processor under NOSS 1.1 with
semaphore.
Reading
my contribution on
Booth
(an experiment of a implementation in som language)
quicksort in Prolog
(to see a beautiful program)
Assembly language teaching (S2)
quicksort is S2 assembly
language
Eval in Nut
J. E. Thornton, Design of a
computer: The Control Data 6600, Scott,
Foresman and Company, 1970. (
pdf 18 Mbytes)
Implementation of Stack-Based Languages on
Register Machines. M. Anton Ertl. PhD thesis, Technische
Universität Wien, Austria, 1996. (ps 654Kbytes)
Som
system (especially s-code)
References
- Henessy and Patterson, Computer architecture:
Quantitative
Approach, 2nd ed, Morgan Kaufman, 1990.
- Stalling, Computer organisation, McGraw Hill,
2003.
- Computation structure, MIT press, 1995.
- Chongstitvatana, P, Computer
architecture: a synthesis,
2002.
- Alan Burns and Andy Wellings, Real-time systems and programming
languages, 2ed, Addison-Wesley, 1997.
- Labrosse, Micro C/OS-II, the real-time kernel, 2ed, CMP books,
2002.
Other hand-out will be given in class.
last update 20 Feb 2005