Sei sulla pagina 1di 19

SERIAL PERIPHERAL INTERFACE

Member:

Mai Nht Tn (20092340)


Trn Th Thu Hon (20091135)

MAIN CONTENT

Introduction

Background
Design Simulation

Sumary
Plan References

Introduction

Design an SPI (synchronous serial peripheral interface) module suitable for use with a microcontroller. Use tool: Quartus II 12.1 and ModelSim-Altera 10.1b.

Complete by 5 steps:

design strategy for the system and draw block diagrams. Write VHDL code for each module, simulate and debug it. Integrate the VHDL code for the modules, simulate, and test the overall system. Make any needed changes and synthesize the VHDL code for the target device. Simulate the system after synthesis Generate a bit file for the target device and download it. Verify that the hardware works correctly.

Background

Definition

Operator

Data transmission Clock polarity and phase

Background
Definition

SPI (Serial Peripheral Bus) is a synchronous serial data link standard, named by Motorola, that operates in full duplex mode

Multiple slave devices are allowed with individual slave select (chip select) lines. SPI is called a four-wire serial bus.

Background
Operator
Data transmission Clock polarity and phase

Design

SPI data loop

Design

Block diagram

Design
Dout

Master block

Reset
8-bit dout_reg

Spi_miso
8-bit dout_next

Clk Ena D_ena Spi_mosi

Spi_clk Spi_done_stick
8-bit din_reg 8-bit din_next

Clk_idle

Din

Design

Sketch of SPI controller

Design

Slave block

Design

Port Descriptions reportvhdl.docx

Design

Clock

4 types of clock and 1 clock control: Clock 50 Mhz to 2s (0.5 Hz) Clock 50 Mhz to 1s Clock 50 Mhz to 0.5s Clock 50 Mhz to 0.25s 00 : clock out = clock 0.25s

Clock control:

01 : clock out = clock 0.5s


10 : clock out = clock 1s 11 : clock out = clock 2s

Design

Code
Master Slave

VHDL
code

code

Simulation

Summary
Advantages

Disadvantages
Application

Plan
Mai Nhat Tan

Define the requirement Design the structure

Deliver the work for each team member and check the process rate.
Distribute to finish slide and reports Tran Thu Hoan

Design the structure Buid blocks Simulation

Edit slide and report

References

RTL Hardware Design Using VHDL Pong P. Chu http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus http://www.eeherald.com/section/design-guide/esmod12.html http://avrbeginners.net/architecture/spi/spi.html http://avrhelp.mcselec.com/index.html?using_the_spi_protocol.htm

http://www.doulos.com/knowhow/perl/testbench_creation/
DE1 User Manual

Thanks you for listening

Potrebbero piacerti anche