An open API service indexing awesome lists of open source software.

https://github.com/alyqamar/verilog-playground


https://github.com/alyqamar/verilog-playground

Last synced: 7 months ago
JSON representation

Awesome Lists containing this project

README

          

# Verilog Playground

Welcome to my Verilog playground, where I experiment with digital logic designs and test my skills! This repository houses various Verilog implementations I've created during my college coursework in Computer-aided design.

## Contents

```
โ””โ”€โ”€ ๐Ÿ“and_gate
โ””โ”€โ”€ and_gate.v
โ””โ”€โ”€ and_gate_tb.v
โ””โ”€โ”€ ๐Ÿ“comparator
โ””โ”€โ”€ comparator.png
โ””โ”€โ”€ comparator.v
โ””โ”€โ”€ comparator_tb.v
โ””โ”€โ”€ ๐Ÿ“decoder_7seg
โ””โ”€โ”€ conditional_decoder_7seg.v
โ””โ”€โ”€ conditional_decoder_7seg_tb.v
โ””โ”€โ”€ logical_decoder_7seg.v
โ””โ”€โ”€ logical_decoder_7seg_tb.v
โ””โ”€โ”€ seven_segment.png
โ””โ”€โ”€ seven_segment_decoder-with-conditional-operators.png
โ””โ”€โ”€ seven_segment_decoder-with-logical-operators.png
โ””โ”€โ”€ ๐Ÿ“d_flip_flop
โ””โ”€โ”€ d_flip_flop.v
โ””โ”€โ”€ d_flip_flop_tb.v
โ””โ”€โ”€ ๐Ÿ“full_adder
โ””โ”€โ”€ full_adder.png
โ””โ”€โ”€ full_adder.v
โ””โ”€โ”€ full_adder_tb.v
โ””โ”€โ”€ ๐Ÿ“half_adder
โ””โ”€โ”€ half_adder.v
โ””โ”€โ”€ half_adder_tb.v
โ””โ”€โ”€ ๐Ÿ“rca_4bit
โ””โ”€โ”€ rca_4bit.png
โ””โ”€โ”€ rca_4bit.v
โ””โ”€โ”€ ๐Ÿ“rbs_4bit
โ””โ”€โ”€ rbs_4bit.png
โ””โ”€โ”€ rbs_4bit.v

```

- **and_gate:** Explores the fundamental AND gate and its behavior in Verilog.
- **comparator:** Builds a comparator to compare two binary numbers, demonstrating comparison logic.
- **decoder_7seg:** Implements 7-segment decoders using both conditional and logical operators, showcasing different design approaches.
- **d_flip_flop:** Constructs a D flip-flop, a crucial building block in sequential logic circuits.
- **full_adder:** Creates a full adder circuit, essential for arithmetic operations in digital systems.
- **half_adder:** Implements a half adder, a foundational component for understanding binary addition.
- **rba_4bit:** Designs a 4-bit ripple carry adder, demonstrating the concept of ripple carry addition.
- **rcs_4bit:** Implements a 4-bit ripple subcurator with full-adders.

## Usage

- Clone this repository: git clone https://github.com/alyQamar/verilog-playground.git
- Navigate to the desired project directory.
Use a Verilog simulator (e.g., Icarus Verilog, ModelSim) to simulate the code.
- Refer to the testbench files (ending in \_tb.v) for simulation examples.

## Simulate the code

- Using [iverilog](https://bleyer.org/icarus/)

```bash
iverilog -o simulation_output module_name.v module_name_tb.v

vvp simulation_output.vvp

gtkwave simulation_output.vcd
```

- Using VS Code (with the [Verilog HDL](https://marketplace.visualstudio.com/items?itemName=leafvmaple.verilog) extension)
1 - Open the module_name_tb.v file in VS Code.
2 - Configure the launch configuration for iverilog and gtkwave.
3- Run the simulation to get "simulation_output.vsd" within VS Code.
4- Run the simulation output with gtkwave.
```bash
gtkwave simulation_output.vcd
```

## About Me

I'm a Computer Engineering student and this repository serves as a platform for my learning and experimentation.

## References

- Dr. Mohamed Ali Rohaim: Lectures notes (Computer Aided Design - SCE403).
- Verilogยฎ Quickstart: A Practical Guide to Simulation and Synthesis in Verilog (The Springer International Series in Engineering and Computer Science, 667) by James M. Lee
- Verilog Tutorial Playlist by Ahmed Hany : [Verilog HDL tutorial in arabic](https://youtube.com/playlist?list=PL3wGfPnyEQlHD09fR30jL3SQndmtXnCt5&feature=shared)


**Happy experimenting!**