Skip to content

This repo contains documentation of the "VSD Open Digital-Design-on-FPGA" tutorial.

License

Notifications You must be signed in to change notification settings

Eyantra698Sumanto/Digital-Design-on-FPGA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 

Repository files navigation

Digital-Design-on-FPGA

image

This repo contains documentation of the "VSD Open Digital-Design-on-FPGA" tutorial.


Contents

Introduction

Makerchip

Makerchip is an Open Source App for circuit design, verilog programming, VLSI design, etc. Makerchip provides free and instant access to the latest tools from your browser and from your desktop. This includes open-source tools and proprietary ones. For more detail refer:
https://www.makerchip.com/

Virtual FPGA

It is an FPGA board that can be simulated using Makerchip IDE. It is very useful to see the simulation of the real FPGA on a desktop. For more details refer:
https://github.com/BalaDhinesh/Digital-Design-on-FPGA--VSDOpen21

Interfacing LEDs

This topic dealing with interfacing of the LEDs on the Virtual FPGA by writing a System Verilog code in Makerchip.
Please refer the following link for the project:

https://www.makerchip.com/sandbox/0mZf5hwmG/076hWmn#

Code and FPGA

image image image

Diagram

image

Waveform

image

LED Counter

Please refer the following link for the project:

https://www.makerchip.com/sandbox/0mZf5hwmG/0j2hyj6

Code and FPGA

image image

Diagram

image

Waveform

image

Interfacing LEDs Lab

Please refer the following link for the project:

https://www.makerchip.com/sandbox/0mZf5hwmG/0lOhzop

Code and FPGA

image image image

Diagram

image

Waveform

image

Interfacing Seven segment

A seven-segment display (SSD) is a form of electronic display device for displaying decimal numbers. They can be used as an alternative to complex display's such as dot matrix.

A SSD has 7 segments and theoretically we can use it to display 2^7 = 128 combinations of characters. But most of these combinations, doesn't make sense to a human eye. Decimal numbers can be displayed correctly on a 7 segment panel. Please refer the following link for the project:

https://www.makerchip.com/sandbox/0mZf5hwmG/0k5hqnm

Code and FPGA

image

Diagram

image

Waveform

image

Interfacing Seven Segment Labs

Truth table for the BCD to seven segment display:
image

The Seven Segment Display interfacing is done in this workshop using the Virtual FPGA in Makerchip. A System Verilog code is written in order to describe the functionallity of the seven segment display. A reg is used to store a BCD value and is incremented for every count of the counter and then converted to Seven Segment equivalent using the above truth table.

Please refer the following link for the project:

https://www.makerchip.com/sandbox/0mZf5hwmG/0Wnhyjg#

Code

image

Diagram

image

FPGA

image image image

Waveform

image

Traffic Light lab

Problem Statement

image

Finite State Machine

image
This project deals with the Traffic Controller Design using the Makerchip Virtual FPGA. As shown above we are focussing on the Yellow and Green light and these are depicted using the G and D of the 7 segment display respectively. Green light turns ON for 8 clock pulses while Yellow turns on for 4 clock pulses. All lights OFF are considered as Red Signal. The fours 7 segment display are considered as signal for the four ways.

Please refer the following link for the project:

https://www.makerchip.com/sandbox/0mZf5hwmG/0nZh6G5#

Code

Code Snippet for NORTH, SOUTH, EAST and WEST

NORTH :
                    begin                      
                       // Enable first seven segment and set to Green 
                       digit <= 4'b0111;
                       segment <= 7'b1110111;
                        /* TODO: 1. Keep the green NORTH signal active for 8 seconds 
                                2. Set state of signal to yellow NORTH after that 
                          HINT: Use if-else block
                        */
                       if(count==7) begin
                             assign state=NORTH_Y;
                        	  assign count=0;    
                          end
                       else assign count=count+1;   
                    end

Code Snippet for NORTH_Y, SOUTH_Y, EAST_Y and WEST_Y

NORTH_Y :
                    begin
                        // Enable first seven segment and set to Yellow
                        digit <= 4'b0111;
                        segment <= 7'b1111110;
                        /* TODO: 1. Keep the yellow NORTH signal active for 4 seconds 
                                2. Set state of signal to green SOUTH after that 
                        */
                      if(count==3) begin
                             assign state=SOUTH;
                        	  assign count=0;    
                          end
                       else assign count=count+1;
							end

Diagram

image

FPGA Simulation

image image image

Acknowledgement

I would like to thank Mr. Kunal Ghosh, Mrs. Anagha Ghosh, Mr. Steve Hoover and Mr. Bala Dinesh for the tutorial explained in the simplest way possible. It helped me to learn more about the FPGA and Makerchip in a very easy and structured manner. It will be very helpful for students to work on Virtual FPGA as many cannot afford the real one. It is also useful for the simulation purpose.

References

  1. https://github.com/BalaDhinesh/Digital-Design-on-FPGA--VSDOpen21
  2. https://www.makerchip.com/
  3. https://verilogcodes.blogspot.com/2015/10/verilog-code-for-bcd-to-7-segment.html
  4. https://www.geeksforgeeks.org/bcd-to-7-segment-decoder/
  5. http://www.sunburst-design.com/papers/CummingsSNUG2019SV_FSM1.pdf

About

This repo contains documentation of the "VSD Open Digital-Design-on-FPGA" tutorial.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published