Skip to main content

Chapter 3 · Watch, then practise

Software Design Issues

Represent behavior explicitly and separate time-critical event handling from longer application work.

3 questions · 3 with related videos. Matches are based on playlist titles; broader background matches are labeled.

What to study

  • Finite state machines
  • Inputs, states and transitions
  • Polling and interrupts
  • Short interrupt handlers

Chapter playlists

Choose a playlist

Notes

Introduction to FPGA Part 5 - Finite State Machines | Digi-Key Electronics

DigiKey · 24:24

The supplementary finite-state-machine lesson supports representing states and transitions; it uses FPGA examples rather than this lamp.

1. Model behavior

How can an FSM describe a push-button controlled lamp?

Use states OFF and ON. A validated press event transitions between them; output depends on the current state. Define startup and every relevant event, including no event. This makes behavior reviewable as a transition table rather than hiding it across unrelated conditionals.

Introduction to FPGA Part 5 - Finite State Machines | Digi-Key Electronics

DigiKey · 24:24 · Background lecture

FSM design provides background for classifying state and input dependent outputs; exact Moore-versus-Mealy coverage is not established by the title.

2. State versus output

What distinguishes a Moore-style FSM from a Mealy-style FSM?

In a Moore machine, output depends on the current state. In a Mealy machine, it depends on state and current input. Both need explicit transition rules. When implementing either, define when inputs are sampled and outputs updated so hardware behavior matches the model.

Introduction to RTOS Part 9 - Hardware Interrupts | Digi-Key Electronics

DigiKey · 15:10

Choose a video · 2 lectures

Hardware-interrupt and interrupt-handling lectures support separating urgent interrupt work from deferred processing.

3. Interrupt structure

Why move lengthy work out of an interrupt handler?

An interrupt temporarily diverts execution to service an event. A long handler delays other work and can increase response latency. Capture the event or sample, acknowledge the hardware as required, and arrange for the main loop or a task to perform longer processing.

References