SPI Main Frame Core

Send whole frames with one trigger.

Overview

The SPI Main Frame core is the SPI Main core plus a frame sequencer. One trigger sends N words under a single chip select. A valid/request stream handshake connects it directly to a FIFO, and frame-wide busy and done signals report progress. The host design needs no glue logic.

Features

  • SPI Main core plus frame sequencer
  • One trigger sends N words under a single CS
  • Valid/request stream handshake for FIFOs
  • Frame-wide busy and done
  • No glue logic in the host design
  • Inherits SPI Main: modes 0–3 at runtime, 16-bit divider, 8/16/32-bit words, MSB first, double-registered MISO
  • Single clock domain; synchronous active-high reset; std_logic-only ports; no vendor primitives
  • Self-checking testbenches included

Block diagram

SPI Main Frame core block diagramA trigger with a word count and a transmit stream with valid and request handshake enter a frame sequencer. The sequencer feeds words to an SPI Main core and returns received words and frame-wide busy and done. The SPI Main core drives SCLK, MOSI and CS_N and reads MISO.spi_main_frametrigger, N wordstx data + validrequestrx wordbusy / doneFrame sequencerword count,CS held for frameSPI Mainmodes 0–3,16-bit dividerwordrxSCLKMOSIMISOCS_N
Fig. 1 SPI Main Frame core, functional view. clk and rst not drawn.

Specifications

ParameterValue
HDLVHDL, synthesizable
Clock domains1 (fclk)
ResetSynchronous, active-high
SPI modes0, 1, 2, 3; CPOL/CPHA at runtime
Bit orderMSB first
Word width8, 16 or 32 bits (generic)
SCLK divider16-bit; SCLK = fclk / (2·(div+1))
FramesN words per trigger under one chip select
Host interfaceValid/request stream handshake; frame busy and done
Port typesstd_logic only
Vendor primitivesNone
VerificationSelf-checking testbenches

Interface

PortDirWidthDescription
clkin1System clock, fclk
rstin1Synchronous reset, active-high
cpolin1Clock polarity
cphain1Clock phase
clk_divin16SCLK divider value
triggerin1Start a frame
n_wordsinNWords in the frame
tx_datainWStream data
tx_validin1Stream data valid
tx_reqout1Request next word
rx_dataoutWWord received
busyout1Frame in progress
doneout1Frame complete
sclkout1SPI clock
cs_nout1Chip select, active low
mosiout1Main out, subordinate in
misoin1Main in, subordinate out
Port list for orientation; the datasheet is authoritative. W = word width generic.

Performance

TransferSCLK ratio@ fclk = 40 MHz@ fclk = 100 MHz
Writefclk/220 MHz50 MHz
Read-backfclk/66.67 MHz16.7 MHz
Verified in simulation. Same SPI engine as the SPI Main core. Maximum SCLK on hardware also depends on board, I/O timing and the connected device.

Resource utilisation

DeviceLUTsFFsFmax
AMD 7 SeriesPublished after synthesis — ask sales
Altera CyclonePublished after synthesis — ask sales
Lattice ECP5Published after synthesis — ask sales

Supported targets

Vendor-neutral VHDL with no vendor primitives or constraints. The source licence targets any family listed under supported FPGA vendors, including NI LabVIEW FPGA targets through the IP Integration Node. An evaluation netlist is built for one named device and toolchain version.

Deliverables

ItemEvaluationSource licence
Delivered asNetlist for one named device + toolchainVHDL source + testbenches
DocumentationDatasheetDatasheet, integration guide, testbench guide
UseEvaluation only, [terms to fill in]Production, [terms to fill in]
Full terms: Licensing & evaluation.

Documentation

DocumentFormatAvailability
SPI Main Frame Core — DatasheetPDFPublic
Integration guidePDFWith source licence
Testbench guidePDFWith source licence