Skip to content

DLD Project - A simple vending machine simulation with Verilog (Spring 2024)

License

Notifications You must be signed in to change notification settings

ZahraAziziGit/simple-vending-machine

Repository files navigation

Simple Vending Machine

This repository contains the implementation of a simple vending machine written in Verilog. The vending machine is designed to dispense items based on user input, manage inventory, and handle transactions. The simulation and testing of the design can be done using Icarus Verilog (iverilog). The wave simulation can be done by gtkwave. This is a digital logic design project, for Spring 2024.

Table of Contents

Features

  • Item Selection: Allows users to select items from a predefined list.
  • Inventory Management: Tracks the quantity of items in stock.
  • Transaction Handling: Manages user inputs for selecting items and handling payments.
  • Error Handling: Provides feedback for out-of-stock items or invalid inputs. you can read more details here.

Installation

  1. Clone the repository:

    git clone https://github.com/ZahraAziziGit/simple-vending-machine.git
  2. Navigate to the project directory:

    cd simple-vending-machine
  3. Install Icarus Verilog:

    • For Ubuntu:
      sudo apt-get install iverilog
    • For macOS:
      brew install icarus-verilog
    • For windows: link
  4. Install GTKWave:

    • For Ubuntu:
      sudo apt-get install gtkwave
    • For macOS:
      brew install gtkwave
    • For windows: link

Usage

  1. Compile the Verilog files:

    iverilog vending_machine_tb.v -o vending_machine_wave
  2. Run the simulation:

    vvp vending_machine_wave
  3. Follow the simulation output to observe the vending machine's behavior.

    gtkwave test_vm.vcd

terminal wave_complete

Project Structure

simple-vending-machine/
├── LICENSE.txt
├── README.md
├── Report (en).pdf
├── test_vm.vcd
├── vending_machine.v
├── vending_machine_tb.v
└── vending_machine_wave

Contributing

Contributions are welcome! Please follow these steps to contribute:

  1. Fork the repository.
  2. Create a new branch:
    git checkout -b <feature-name>
  3. Make your changes and commit them:
    git commit -m 'feat: add some feature'
  4. Push to the branch:
    git push origin <feature-name>
  5. Open a pull request.

License

This project is licensed under the MIT License.

Thank you for checking out the Simple Vending Machine project! If you have any questions or feedback, feel free to reach out.

Telegram E-mail: azizi.zahra.tehran@gmail.com

About

DLD Project - A simple vending machine simulation with Verilog (Spring 2024)

Topics

Resources

License

Stars

Watchers

Forks