GithubHelp home page GithubHelp logo

stylesoftware / tang-nano-fifo-ip-example Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 38 KB

Explore how to use the FIFO IP from Gowin, setup for the Tang Nano

License: The Unlicense

Verilog 100.00%
gowin fifo verilog

tang-nano-fifo-ip-example's Introduction

Tang-Nano-FIFO-IP-Example

Exploring the timing of the FIFO IP from Gowin, setup for the Tang Nano.

The problem

After reading the documentation, I found there were no code examples and no explaination as to how many ticks I need to wait before releasing the fifo_read_enable or fifo_write_enable registers. So I had to investigate.

How to figure it out

Write a state machine to figure out when to turn on fifo_write_enable and fifo_read_enable and when to turn them off.

The state machine

Write 3 bytes to the FIFO. Wait for fifo_empty to be turned off. Read 3 bytes from the FIFO. Confirm each byte by turning on one of the 3 Tang Nano LED elements.

The result

For the Tang Nano FIFO IP to succeed, both the fifo_write_enable and fifo_read_enable have to be left alone for 3 ticks before they can be turned off.

How to setup for testing

In the GOWIN FPGA Designer, start a new project. Add the FIFO IP by clicking on the Tools Menu / IP Core Generator. Untick Almost Full and Almost Empty. Tick Output Registers Selected. Set Read and Write Depth to 16. Set Read and Write Width to 8. Click OK, then Add to your project when asked. Add the two files in this GIT (TOP.v and constrains.cst) to your FPGA project.

Literature

Search for the "Gowin FIFO User guide".

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.