Skip to content

A Verilog-based RTL design of a configurable vending machine controller with APB configuration, asynchronous input handling, and real-time item dispensing.

Notifications You must be signed in to change notification settings

SOWJANYA-MADANA/Vending-Machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Vending Machine Controller – RTL Design

This project is a Verilog RTL-based implementation of a configurable vending machine controller. It simulates a real vending system, supporting dynamic item setup, asynchronous user input, and real-time dispensing logic.


Features

  • Supports up to 1024 unique items
  • APB-like configuration interface (10 MHz)
  • Real-time operation mode on a 100 MHz system clock
  • Handles asynchronous currency and item select inputs (10 kHz – 50 MHz)
  • Dispenses items within 10 system clock cycles
  • Returns change if overpaid
  • Modular and clean RTL architecture

πŸ” Operating Modes

1. Reset Mode

  • Initializes all internal memories and registers.

2. Configuration Mode

  • Item setup via APB-like interface:
    • Set total items
    • Configure item price
    • Set availability
  • Configuration data is safely synchronized from pclk to system_clk.

3. Operation Mode

  • Processes currency and item selection.
  • Compares inserted amount with item price.
  • Dispenses item and returns change if needed.
  • Ensures vending decision in under 10 cycles.

πŸ“‚ Module Overview

  • fsm: Controls system mode transitions (Reset, Config, Operation)
  • cfg_block: Handles APB-based configuration and clock domain crossing
  • operation_controller: Performs runtime vending logic
  • vending_machine_top: Top-level integration and memory coordination

About

A Verilog-based RTL design of a configurable vending machine controller with APB configuration, asynchronous input handling, and real-time item dispensing.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published