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.
- 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.
-
Clone the repository:
git clone https://github.com/ZahraAziziGit/simple-vending-machine.git
-
Navigate to the project directory:
cd simple-vending-machine
-
Install Icarus Verilog:
- For Ubuntu:
sudo apt-get install iverilog
- For macOS:
brew install icarus-verilog
- For windows: link
- For Ubuntu:
-
Install GTKWave:
- For Ubuntu:
sudo apt-get install gtkwave
- For macOS:
brew install gtkwave
- For windows: link
- For Ubuntu:
-
Compile the Verilog files:
iverilog vending_machine_tb.v -o vending_machine_wave
-
Run the simulation:
vvp vending_machine_wave
-
Follow the simulation output to observe the vending machine's behavior.
gtkwave test_vm.vcd
simple-vending-machine/
├── LICENSE.txt
├── README.md
├── Report (en).pdf
├── test_vm.vcd
├── vending_machine.v
├── vending_machine_tb.v
└── vending_machine_wave
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch:
git checkout -b <feature-name>
- Make your changes and commit them:
git commit -m 'feat: add some feature'
- Push to the branch:
git push origin <feature-name>
- Open a pull request.
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: [email protected]