Documentation
 ASIC datasheet 
DSPI-APB

Serial Peripheral Interface – Master/Slave with APB interface


The DSPI-APB is a fully configurable SPI master/slave device, which allows user to configure polarity and phase of serial clock signal SCK. It allows the microcontroller to communicate with serial peripheral devices. The DSPI-APB uses APB bus on the parallel interface side. It is also capable of interprocessor communications in a multi-master system. A serial clock line (SCK) synchronizes shifting and sampling of the information on the two independent serial data lines. DSPI-APB data are simultaneously transmitted and received. The DSPI-APB is a technology independent design that can be implemented in a variety of process technologies. The DSPI-APB system is flexible enough to interface directly with numerous standard product peripherals from several manufacturers. The system can be configured as a master or a slave device. Data rates as high as CLK/4. Clock control logic allows a selection of clock polarity and a choice of two fundamentally different clocking protocols to accommodate most available synchronous serial peripheral devices. When the DSPI-APB is configured as a master, software selects one of eight different bit rates for the serial clock.
The DSPI-APB automatically drives, selected by SSCR (Slave Select Control Register), slave select outputs (SS7O – SS0O), and address SPI slave device to exchange serially shifted data. Error-detection logic is included to support interprocessor communications. A writecollision detector indicates when an attempt is made to write data to the serial shift register while a transfer is in progress. A multiple-master mode-fault detector automatically disables DSPI-APB output drivers if more than one SPI devices simultaneously attempts to become bus master.
The DSPI-APB is fully customizable, which means it is delivered in the exact configuration to meet users’ requirements. There is no need to pay extra for not used features and wasted silicon. It includes fully automated testbench with complete set of tests allowing easy package validation at each stage of SoC design flow.
The DSPI-APB is a technology independent design that can be implemented in a variety of process technologies.


Key Features

Applications

  • Compliant with AMBA specification, Revision 2.0
  • SPI Master
    • Master and Multi-master operations
    • 8 SPI slave select lines
    • System error detection
    • Mode fault error
    • Write collision error
    • Interrupt generation
    • Supports speeds up ¼ of system clock
    • Bit rates generated 1/4 - 1/512 of system clock.
    • Four transfer formats supported
  • SPI Slave
    • Slave operation
    • System error detection
    • Interrupt generation
    • Supports speeds up ¼ of system clock
    • Four transfer formats supported
  • Fully synthesizable
  • Static synchronous design
  • Positive edge clocking and no internal tri-states
  • Scan test ready
  • Embedded microprocessor boards
  • Consumer and professional audio/video
  • Home and automotive radio
  • Low-power applications
  • Communication systems
  • Digital multimeters


Symbol

 presetn
 pclk
 pwdata (7:0)
 pwrite
 penable
 psel
 paddr (1:0)
prdata (7:0) 
 mi
 si
mo 
so 
 scki
scko 
 ss
scken 
sso (7:0) 
int 
soen 

Pins description

PinTypeDescription
presetninputActive low APB global reset
pclkinputAPB global clock
pwdata (7:0)inputAPB write data bus
pwriteinputAPB write strobe
penableinputIndicates the second cycle of APB bus
pselinputAPB slave select
paddr (1:0)inputAPB address bus
miinputMaster serial data input
siinputSlave serial data input
sckiinputSPI clock input
ssinputSlave select
prdata (7:0)outputAPB read data bus
mooutputMaster serial data output
sooutputSlave serial data output
sckooutputSPI clock output
sckenoutputSPI clock output enable
sso (7:0)outputSlave select outputs
intoutputInterrupt request
soenoutputSlave output enable

Block diagram

APB Interface
pwdata (7:0)
prdata (7:0)
pwrite
penable
psel
paddr (1:0)
Shift register
mi
mo
si
so
SPI Clock Logic
scki
scko
SPI Controller
scken
ss
sso (7:0)
int
soen
presetn
pclk

Units

APB Interface

APB Interface performs the interface functions between DSPI internal blocks and APB bus. Allows easy connection of the core to existing APB systems.

Shift register

It is a central element in the SPI system. The system is single buffered in the transmit direction and double buffered in the receive direction. This fact means new data for transmission cannot be written to the shifter until the previous transaction is complete; however, received data is transferred into a parallel read data buffer so the shifter is free to accept a second serial character. As long as the first character is read out of the read data buffer before the next serial character is ready to be transferred, no overrun condition will occur. When an SPI transfer occurs, an 8-bit character is shifted out on data pin while a different 8-bit character is simultaneously shifted in a second data pin. Another way to view this transfer is that an 8-bit shift register in the master and another 8-bit shift register in the slave are connected as a circular 16-bit shift register. When a transfer occurs, this distributed shift register is shifted eight bit positions; thus, the characters in the master and slave are effectively exchanged.

SPI Clock Logic

Software can select any of four combinations of serial clock (SCK) phase and polarity using two bits in the SPI control register (SPCR). The clock polarity is specified by the CPOL control bit, which selects an active high or active low clock and has no significant effect on the transfer format. The clock phase (CPHA) control bit selects one of two fundamentally different transfer formats. The clock phase and polarity should be identical for the master SPI device and the communicating slave device. In some cases, the phase and polarity are changed between transfers to allow a master device to communicate with peripheral slaves having different requirements. The flexibility of the SPI system on the DSPI allows direct interface to almost any existing synchronous serial peripheral.

SPI Controller

SPI Controller manages the Master/Slave operation and controls the transmission. The SPI Controller manages the transmission speed and format (Phase and polarity). Controller is also responsible for generating of interrupt request and detection of transmission errors.

Performance


Each core has been tested in variety of FPGA and ASIC technologies. Its implementation's results are summarized below.

TechnologySpeed
grade
Area
[gates]
Frequency
[MHz]
0.25u areatypical800160
0.25u speedtypical1200400

The presented above table gives a survey about the DISPI-APB area and performance in ASIC devices (all features are included).