All Projects → jakubcabal → Spi Fpga

jakubcabal / Spi Fpga

Licence: lgpl-3.0
SPI master and slave for FPGA written in VHDL

Projects that are alternatives of or similar to Spi Fpga

Edalize
An abstraction library for interfacing EDA tools
Stars: ✭ 270 (+440%)
Mutual labels:  fpga, vhdl
Vexriscv
A FPGA friendly 32 bit RISC-V CPU implementation
Stars: ✭ 1,041 (+1982%)
Mutual labels:  fpga, vhdl
Cores
Various HDL (Verilog) IP Cores
Stars: ✭ 271 (+442%)
Mutual labels:  fpga, spi
Fpga Fft
A highly optimized streaming FFT core based on Bailey's 4-step large FFT algorithm
Stars: ✭ 45 (-10%)
Mutual labels:  fpga, vhdl
Aes
AES-128 hardware implementation
Stars: ✭ 25 (-50%)
Mutual labels:  fpga, vhdl
intfftk
Fully pipelined Integer Scaled / Unscaled Radix-2 Forward/Inverse Fast Fourier Transform (FFT) IP-core for newest Xilinx FPGAs (Source language - VHDL / Verilog). GNU GPL 3.0.
Stars: ✭ 43 (-14%)
Mutual labels:  fpga, vhdl
F32c
A 32-bit RISC-V / MIPS ISA retargetable CPU core & SoC, 1.63 DMIPS/MHz
Stars: ✭ 338 (+576%)
Mutual labels:  fpga, vhdl
math
Useful m-scripts for DSP (CIC, FIR, FFT, Fast convolution, Partial Filters etc.)
Stars: ✭ 15 (-70%)
Mutual labels:  fpga, vhdl
Audioxtreamer
ASIO driver, Usb Driver, FX2LP Firmware, VHDL Fpga, Schematics & PCB Layout for the AudioXtreamer, a USB 2.0 32ch Audio/Midi interface for retrofitting into digital mixers/interfaces.
Stars: ✭ 22 (-56%)
Mutual labels:  fpga, vhdl
Spinalhdl
Scala based HDL
Stars: ✭ 696 (+1292%)
Mutual labels:  fpga, vhdl
fpga puf
🔑 Technology-agnostic Physical Unclonable Function (PUF) hardware module for any FPGA.
Stars: ✭ 44 (-12%)
Mutual labels:  fpga, vhdl
Clash Compiler
Haskell to VHDL/Verilog/SystemVerilog compiler
Stars: ✭ 958 (+1816%)
Mutual labels:  fpga, vhdl
hwt
VHDL/Verilog/SystemC code generator, simulator API written in python/c++
Stars: ✭ 145 (+190%)
Mutual labels:  fpga, vhdl
simple-riscv
A simple three-stage RISC-V CPU
Stars: ✭ 14 (-72%)
Mutual labels:  fpga, vhdl
getting-started
List of ideas for getting started with TimVideos projects
Stars: ✭ 50 (+0%)
Mutual labels:  fpga, vhdl
Hal
HAL – The Hardware Analyzer
Stars: ✭ 298 (+496%)
Mutual labels:  fpga, vhdl
PoC-Examples
This repository contains synthesizable examples which use the PoC-Library.
Stars: ✭ 27 (-46%)
Mutual labels:  fpga, vhdl
QNICE-FPGA
QNICE-FPGA is a 16-bit computer system for recreational programming built as a fully-fledged System-on-a-Chip in portable VHDL.
Stars: ✭ 51 (+2%)
Mutual labels:  fpga, vhdl
Vunit
VUnit is a unit testing framework for VHDL/SystemVerilog
Stars: ✭ 438 (+776%)
Mutual labels:  fpga, vhdl
Lxp32 Cpu
A lightweight, open source and FPGA-friendly 32-bit CPU core based on an original instruction set
Stars: ✭ 27 (-46%)
Mutual labels:  fpga, vhdl

SPI MASTER AND SLAVE FOR FPGA

The SPI master and SPI slave are simple controllers for communication between FPGA and various peripherals via the SPI interface. The SPI master and SPI slave have been implemented using VHDL 93 and are applicable to any FPGA.

The SPI master and SPI slave controllers support only SPI mode 0 (CPOL=0, CPHA=0)!

The SPI master and SPI slave controllers were simulated and tested in hardware. If you have a question or you have a tip for improvement, send me an e-mail or create a issue.

Table of resource usage summary:

CONTROLLER LE (LUT) FF BRAM Fmax
SPI MASTER 34 23 0 327.3 MHz
SPI SLAVE 24 15 0 318.0 MHz

Synthesis have been performed using Quartus Prime 17 Lite Edition for FPGA Altera Cyclone IV with these settings: CLK_FREQ = 50 MHz, SCLK_FREQ = 2 MHz, SLAVE_COUNT = 1.

The SPI loopback example design:

The SPI loopback example design is for testing data transfer between SPI master and SPI slave over external wires.

Please read README file of SPI loopback example design.

Video of SPI loopback example design

License:

The SPI master and SPI slave controllers are available under the GNU LESSER GENERAL PUBLIC LICENSE Version 3.

Please read LICENSE file.

SPI master

Table of generics:

Generic name Type Default value Generic description
CLK_FREQ natural 50e6 System clock frequency in Hz.
SCLK_FREQ natural 2e6 Set SPI clock frequency in Hz (condition: SCLK_FREQ <= CLK_FREQ/10).
SLAVE_COUNT natural 1 Count of SPI slave controllers.

Table of inputs and outputs ports:

Port name IN/OUT Width [b] Port description
CLK IN 1 System clock.
RST IN 1 High active synchronous reset.
--- --- --- ---
SCLK OUT 1 SPI clock.
CS_N OUT SLAVE_COUNT SPI chip select, active in low.
MOSI OUT 1 SPI serial data from master to slave.
MISO IN 1 SPI serial data from slave to master.
--- --- --- ---
ADDR IN log2(SLAVE_COUNT) SPI slave address.
DIN IN 8 Input data for SPI slave.
DIN_LAST IN 1 When DIN_LAST = 1, after transmit these input data is asserted CS_N.
DIN_VLD IN 1 When DIN_VLD = 1, input data are valid.
READY OUT 1 When READY = 1, valid input data are accept.
DOUT OUT 8 Output data from SPI slave.
DOUT_VLD OUT 1 When DOUT_VLD = 1, output data are valid.

SPI slave

Table of inputs and outputs ports:

Port name IN/OUT Width [b] Port description
CLK IN 1 System clock.
RST IN 1 High active synchronous reset.
--- --- --- ---
SCLK IN 1 SPI clock.
CS_N IN 1 SPI chip select active in low.
MOSI IN 1 SPI serial data from master to slave.
MISO OUT 1 SPI serial data from slave to master.
--- --- --- ---
DIN IN 8 Input data for SPI master.
DIN_VLD IN 1 When DIN_VLD = 1, input data are valid.
READY OUT 1 When READY = 1, valid input data are accept.
DOUT OUT 8 Output data from SPI master.
DOUT_VLD OUT 1 When DOUT_VLD = 1, output data are valid.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].