Lecture notes (Digital Systems)

From Spivey's Corner
Jump to: navigation, search

Each lecture title is a link to notes for that lecture. It's difficult to predict how far we will get in each lecture, so I will move material around after each lecture so as to provide a more accurate record of where we have reached.

Trinity Term

A ThumbAn alternative instruction encoding for the ARM in which each instruction is encoded in 16 rather than 32 bits. The advantage is compact code, the disadvantage that only a selection of instructions can be encoded, and only the first 8 registers are easily accessible. In Cortex-M microcontrollers, the Thumb encoding is the only one provided. datapath

Hardware elements

In the first part of Trinity Term, the lectures are about constructing logic gates from transistors, and then building those logic gates into modules we can later use to design a computer. Helpful reading for this part of the course is the appendix on Basics of Logic Design from the recommended book by Patterson and Hennessy.

[17] Introduction. Plan for the term. Combinational logic.

[18] Transistors and logic gates. Building gates from transistors. CMOS logic.

[19] Sequential logic. Flip-flops. Designing sequential circuits.

[20] Architectural elements. Circuits for arithmetic. Multiplexers. Register files. Arithmetic-Logic Unit. Barrel shifter.

Microprocessor architecture

The second part of Trinity Term has lectures about using architectural modules to build a simplified implementation of the Thumb instruction set.

[21] Designing a datapath.

Hilary Term

Assembly-language programming

The first few lectures will be about programming a microprocessorAn integrated circuit that contains a complete CPU. in assembly languageA symbolic representation of the machine code for a program., including the detail of how each kind of instruction operates.

[1] Microcontrollers and embedded programming. Architecture of the micro:bit. Programmer's model. Execution of an instruction.

[2] Building a program. Compiling and building a program.

[3] Multiplying numbers. Conditional and unconditional branches. Instruction encodings. Execution time.

[4] Number representations. Signed and unsigned numbers. Numeric comparisons.

[5] Loops and subroutines. A better multiplication algorithm. Stack frames. Recursive calculation of binomial coefficients.

[6] Memory and addressing. Addressing modes. Arrays. Example: Catalan numbers.

[7] Buffer overrun attacks. A hacker's guide.

Input and output

The next lectures are about different kinds of I/O interaction, including interrupts.

[8] Introducing I/O. Memory-mapped I/O. GPIO(General-Purpose Input/Output). A peripheral interface that provides direct access to pins of the microcontroller chip. Pins may be configured as inputs or outputs, and interrupts may be associated with state changes on certain input pins. On the <span style="font-family: 'Roboto Slab', Ubuntu, sans-serif">micro:bit</span>, the LEDs and pushbuttons are connected to GPIO pins.. Multiplexed LED display.

[9] Serial I/O. Serial protocol. A simple, polling UART(Universal Asynchronous Receiver/Transmitter). A peripheral interface that is able to send and receive characters serially, commonly used in the past for communication between a computer and an attached terminal. It is commonly used in ''duplex'' mode, with the transmitter of one device connected to the receiver of the other with one wire, and the receiver of the one connected to transmitter of the other with a different wire. The ''asynchronous'' part of the name refers to the fact that the transmitter and receiver on each wire do not share a common clock, but rely instead on the signalling protocol and precise timing to achieve synchronisation. driver.

[10] Programming with interrupts. Interrupt-based driver for UART.

[11] The interrupt mechanism. What the hardware does with interrupts.

Embedded operating systems

The last part of Hilary Term has lectures about using and then implementing a simple process scheduler, allowing asynchronous events to be handled in a manageable way.

[12] Introducing Phōs. Processes and messages.

[13] Device drivers. Server processes. Interrupts as messages from the hardware.

[14] Context switching. Implementing interleaving of processes by saving and restoring context.

[15] Implementing processes and messages. Process table. Ready queue. Send and receive.

[16] We're going on a bug hunt!. Exploring the operating system by fixing a bug.

Personal tools

Variants
Actions
Navigation
Tools