Giter VIP home page Giter VIP logo

proto245's Introduction

PyTest Modelsim Status

Synchronous/Asynchronous FT245 FIFO protocol cores

system-arch

IP-cores written in SystemVerilog for communicating with numerous FTDI chips using FT245 FIFO protocol.

The protocol exists in the two versions: synchronous and asynchronous, and there are two cores proto245s and proto245a to use with the appropriate version. Table with supported FTDI devices (based on the protocol specifications) below.

FTDI Chip USB Speed Asynchronous FIFO Synchronous FIFO
FT245R FullSpeed โ†”๏ธ 1MB/s โŒ
FT240X FullSpeed โ†”๏ธ 1MB/s โŒ
FT2232D FullSpeed โ†”๏ธ 1MB/s โŒ
FT232H HighSpeed โ†”๏ธ 8MB/s โ†”๏ธ 40MB/s
FT2232H HighSpeed โ†”๏ธ 8MB/s โ†”๏ธ 40MB/s
FT232HP/FT233HP HighSpeed โ†”๏ธ 8MB/s โ†”๏ธ 40MB/s
FT2232HP/FT2233HP HighSpeed โ†”๏ธ 8MB/s โ†”๏ธ 40MB/s
FT600Q SuperSpeed โŒ โ†”๏ธ 200MB/s
FT601Q SuperSpeed โŒ โ†”๏ธ 400MB/s
FT602Q SuperSpeed โŒ โ†”๏ธ 400MB/s

proto245a core

Implements asynchronous FT245 protocol from the one side and provides RX & TX FIFO interfaces from the other side.

Features:

  • configurable RX & TX FIFO size
  • configurable RD# & WR# assertion time to adapt to any clock frequency
  • flexible clock domains - FSM and FIFOs might share the same clock or use separate clocks

Notes:

  • Send Immediate / Wake Up signal (SIWU) tied to inactive state

Core hierarchy

Single clock domain:

proto245a (proto245a.sv)
โ”œโ”€โ”€ rxfifo (fifo_sync.sv)
โ”‚   โ””โ”€โ”€ dpram (dpram.sv)
โ””โ”€โ”€ txfifo (fifo_sync.sv)
    โ””โ”€โ”€ dpram (dpram.sv)

Multiple clock domains:

proto245a (proto245a.sv)
โ”œโ”€โ”€ rxfifo (fifo_async.sv)
โ”‚   โ””โ”€โ”€ dpram (dpram.sv)
โ””โ”€โ”€ txfifo (fifo_async.sv)
    โ””โ”€โ”€ dpram (dpram.sv)

FTDI side access waveforms

From FT2232H datasheet.

ft245_async

FIFOs side access

fifos

proto245s core

Implements synchronous FT245 protocol from the one side and provides RX & TX FIFO interfaces from the other side.

Features:

  • configurable data size (e.g. 8 bits needed for HS devices, 16/32 bits for SS devices)
  • configurable RX & TX FIFO size
  • configurable RX & TX burst size - maximum number of words per one read/write burst (optional)
  • configurable RX & TX FIFO thresholds - transaction will start only if FIFO is filled below/above the threshold
  • configurable pause between transactions
  • flexible clock domains - FSM and FIFOs might share the same clock or use separate clocks

Notes:

  • FT2xx chips: Send Immediate / Wake Up signal (SIWU) tied to inactive state
  • FT60x chips: Byte Enable signals (BE) are not supported at the moment, so, all transactions have to be word aligned

Core hierarchy

Single clock domain:

proto245s (proto245s.sv)
โ”œโ”€โ”€ rxfifo (fifo_sync.sv)
โ”‚   โ””โ”€โ”€ dpram (dpram.sv)
โ”œโ”€โ”€ txfifo (fifo_sync.sv)
โ”‚   โ””โ”€โ”€ dpram (dpram.sv)
โ””โ”€โ”€ txovrbuf (fifo_sync.sv)
    โ””โ”€โ”€ dpram (dpram.sv)

Multiple clock domains:

proto245s (proto245s.sv)
โ”œโ”€โ”€ rxfifo (fifo_async.sv)
โ”‚   โ””โ”€โ”€ dpram (dpram.sv)
โ”œโ”€โ”€ txfifo (fifo_async.sv)
โ”‚   โ””โ”€โ”€ dpram (dpram.sv)
โ””โ”€โ”€ txovrbuf (fifo_sync.sv)
    โ””โ”€โ”€ dpram (dpram.sv)

FTDI side access waveforms

From FT2232H datasheet.

ft245_sync_ft2xx

From FT600Q/FT601Q datasheet.

ft245_sync_ft60x

FIFOs side access

The same as for proto245a core.

Examples

Project FPGA/Board FTDI chip Software
ft2232h_de10lite DE10-Lite FT2232H Python (ftd2xx, pylibftdi, pyusb, ftdi1)

For more details please follow README files inside examples/$PROJNAME$ directories.

Simulation and testing

Environment is built around Python pytest framework - it offers some nice and easy to use tools for test execution control and parametrization out of the box.

Current workflow is based on the pyhdlsim example - sim.py is a wrapper around HDL simulators and test_*.py files contain tests.

Tested on:

  • Windows 10, Python 3.8, Modelsim 10.6d
  • Ubuntu 20.04, Python 3.8, Modelsim 2020.02

For more details please follow testing README.

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.