Giter Site home page Giter Site logo

jeffdecola / my-verilog-examples Goto Github PK

View Code? Open in Web Editor NEW
29.0 2.0 9.0 13.46 MB

A place to keep my synthesizable verilog examples.

License: MIT License

Shell 18.03% Verilog 80.32% SystemVerilog 1.64%
systemverilog gtkwave iverilog hardware-description-language verilog hardware asic-design fpga vivado asic

my-verilog-examples's Introduction

MY VERILOG EXAMPLES

Tag Latest codeclimate Issue Count MIT License jeffdecola.com

A place to keep my synthesizable verilog examples.

Table of Contents

Documentation and Reference

OVERVIEW

Each example uses iverilog to simulate and GTKWave to view the waveform. I also used Xilinx Vivado to synthesize and program these verilog examples on a Digilent ARTY-S7 FPGA development board.

I declare my ports as follows because that's what the synthesis tools want. Who am I to argue.

    module NAME (
        input             a,     // Input A
        input       [7:0] b,     // Input B
        output reg  [3:0] y);    // Output Y

Also, I would stay away from asynchronous design. It can have problems when you synthesize to an FPGA.

    // DO THIS
    always @(posedge clk) begin
        if (~reset) begin
            ...

    // NOT THIS
    always @(posedge clk or negedge reset) begin

Each example has the following 4 files,

  • *.v - The verilog code files(s)
  • *.vh - A header file listing the included verilog files
  • *_tb.v - The verilog testbench code
  • *_tb.tv - Test vectors used with the testbench

The artifacts created are,

  • *_tb.vvp - The verilog compiled code to be used by the simulator
  • *_tb.vcd - The dump of the waveform data
  • *_tb.gtkw - The GTKWave saved waveform

Where the testbench structure is,

testbench-structure.jpg

BASIC CODE

COMBINATIONAL LOGIC

FPGA DEVELOPMENT BOARDS

  • BUTTONS

    • buttons

      A few different ways to use buttons on a FPGA development board.

SEQUENTIAL LOGIC

SYSTEMS

my-verilog-examples's People

Contributors

jeffdecola avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.