Adaptive Traffic Light Controller — Digital systems — Verilog

Adaptive Traffic Light Controller — Verilog FPGA Design

Real-time traffic controller that adjusts signal timing to measured vehicle throughput, written in Verilog and synthesised to FPGA.

Language
Verilog
Target
FPGA
Level
RTL

What it had to solve

A fixed-cycle traffic light is optimal for exactly one traffic pattern and wrong the rest of the day — it holds an empty approach on green while a queue builds on the other. Adapting means measuring demand and changing timing while the junction is running, and doing it with hard timing guarantees, which is a poor fit for software on a general-purpose processor and a natural one for hardware.

The decisions that shaped it

A state machine in hardware, not software

The controller is written in Verilog at register-transfer level and synthesised to an FPGA. Signal control is a hard-real-time problem where a missed deadline is a safety property, not a dropped frame — expressing it as synchronous logic gives timing that is guaranteed by the clock rather than by a scheduler.

Timing driven by measured throughput

Phase durations respond to measured vehicle throughput instead of a preset cycle, so green time follows demand. That is the entire difference between this and a conventional fixed-plan controller.

Parallel by construction

On an FPGA the approaches are evaluated concurrently rather than in a loop, so adding another one costs area rather than latency — the response time of the junction does not degrade as it grows.

RTL through to synthesis

The design was carried from RTL description through to synthesis on the target device, which is where a hardware design stops being a simulation and starts having a real critical path.

How the pieces sit together

Sensing
Per-approach vehicle throughput measurement
Control
Synchronous finite state machine over signal phases
Adaptation
Phase duration computed from measured demand
Target
Verilog RTL synthesised to FPGA

Built into the product

Adaptive phase timing

Green time following measured demand.

Hard real-time

Timing guaranteed by synchronous logic.

Concurrent approaches

Evaluated in parallel, not in sequence.

Synthesised design

Carried from RTL through to the device.

What it is built out of

Design
Verilog, RTL design
Target
FPGA, Digital systems

What it looks like

Adaptive Traffic Light Controller — The DE2-115 running the design, its state on the LEDs and the display.
The DE2-115 running the design, its state on the LEDs and the display.
Adaptive Traffic Light Controller — The bench it was brought up on — board, host and the switches driving input.
The bench it was brought up on — board, host and the switches driving input.
Adaptive Traffic Light Controller — The RTL itself: the counter, the emergency path and the light assignments.
The RTL itself: the counter, the emergency path and the light assignments.
Adaptive Traffic Light Controller — The junction the controller is timing.
The junction the controller is timing.

What it produced

RTL
Described and synthesised to hardware
Adaptive
Timing rather than a fixed cycle
Parallel
Approaches evaluated concurrently