midterm project report

19
Double buffer SDRAM Memory Double buffer SDRAM Memory Controller Controller Presented by: Yael Dresner Andre Steiner Instructed by: Michael Levilov Project Number: D0713

Upload: brook

Post on 04-Jan-2016

67 views

Category:

Documents


0 download

DESCRIPTION

Midterm Project Report. Double buffer SDRAM Memory Controller. Project Number: D0713. Presented by: Yael Dresner Andre Steiner Instructed by: Michael Levilov. Project Description. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Midterm Project Report

Double buffer SDRAM Memory ControllerDouble buffer SDRAM Memory Controller

Presented by:

Yael Dresner

Andre Steiner

Instructed by:

Michael Levilov

Project Number: D0713

Page 2: Midterm Project Report

Project DescriptionProject Description

• Implementation of a device that receives a

grayscale bit map video stream from a digital video

camera, performs a simple pixel processing and

transfers it to a CPU through a double buffer

SDRAM memory.

Page 3: Midterm Project Report

Blocks DiagramBlocks Diagram

Pixel Processing

Unit

SDRAM controller write part

SDRAM controller read part

Data Bus

Control signal

CPU FPGA CAMERA

Sync

FIFOSwitch

SDRAM A

SDRAM B

Page 4: Midterm Project Report

Camera ModuleCamera Module• This module is implemented by a test-bench process, which

simulates a digital video camera.

Test BenchTest Bench

synch

Clock – 100MHz

reset

Pixels Data

1024 pixels * t clock period

2 us interval between lines

Start pulse

Page 5: Midterm Project Report

Pixel Processing ModulePixel Processing Module

synch

clock

reset

Pixels DataProcessed Pixels Data

synch

Simple image

processing

Page 6: Midterm Project Report

Write Controller ModuleWrite Controller Module

synch

clock

reset

Pixels Data

Control

Addresses Data Path

Input Data

Moore

State Machine

Start pulse

Page 7: Midterm Project Report

Write Controller ModuleWrite Controller Module

Initialization Write full page Refresh

Page 8: Midterm Project Report

Write Controller ModuleWrite Controller ModuleWrite Algorithm

• The data is sent to the Sdram block and switched to the Sdram memory which is not used for reading. The switching is done by a different unit in the read controller.

• The data is written to the memory in Full-Page mode (bursts of 1024 bytes).

• One bank is used (out of four).

• Refresh cycles are being done in the time interval between lines.

Page 9: Midterm Project Report

Switching DiagramSwitching Diagram

SDRAM controller write part

SDRAM controller read part

Switch

SDRAM ASDRAM B

Page 10: Midterm Project Report

Write Controller ModuleWrite Controller ModuleRefresh Algorithm

• One refresh cycle : 80ns (8 clock periods)

• Time interval between 2 lines : 2us

• 2us/80ns = 25 refresh cycles

• In order to refresh all the 4096 lines we need 4096/25 (163.84) time intervals

• Refreshing the whole memory takes 163.84*(2us + 1024*10ns) = 2msec

• Each line should be refreshed every 64 msec

Page 11: Midterm Project Report

Cpu ModuleCpu Module• This module is implemented by a test-bench process,

which simulates a Cpu.

• The Cpu asks for the data pixels randomly, using the

“RD” control line.

• The Cpu reads bursts of bytes from the fifo, after

receiving a “RDY” control line. The burst length is set

randomly for each request.

Page 12: Midterm Project Report

Handling Cpu RequestHandling Cpu Request

Test BenchTest Bench

Pixels Data

RD

RDY

Cpu Clock -100MHz

FIFOFIFO

Read Part

Write Part

SYNCH MODULESYNCH MODULERead Read

ControllerController

RD

RDY

read write

Sdram Clock

Page 13: Midterm Project Report

Read Controller ModuleRead Controller Module

Read Controller Responsibilities

• Handling The switching between Sdrams

• Reading from Sdram and writing to fifo

• Refreshing

• Handling Cpu requests & reading data from FIFO to Cpu

Page 14: Midterm Project Report

Read Controller ModuleRead Controller ModuleReading from Sdram algorithm

• The read controller ensures that the FIFO is always full.

• The read controller keeps 2 pointers:

• The address from which reading should continue

• The address which once accessed, switching should occur. This is the last address of data that was written before the previous switching.

Page 15: Midterm Project Report

Read Controller ModuleRead Controller ModuleRefreshing algorithm

• The read controller is responsible for the refreshing of the Sdram that is currently switched for reading.

• Refreshing all Sdram lines should be done every 64 ms. This process takes 4096*80ns=0.33ms

• during this time the data is not transferred to the FIFO.

Page 16: Midterm Project Report

Read Controller ModuleRead Controller ModuleSwitching algorithm

• Switching is done after:

• The last address of data that was written is read to the FIFO

• Time interval between lines and refreshing of the write controller is done

• Before switching the write controller stores the last address of written data and sends it to the read controller

Page 17: Midterm Project Report

Read Controller ModuleRead Controller Module

Switching Unit

Fifo Handling unit

Reading from Sdram Unit

Switch

SDRAM B SDRAM A

FIFOControl & AddressControl

Page 18: Midterm Project Report

Alternative Write AlgorithmAlternative Write Algorithm

Full page mode Burst mode

1 bank 4 banks

Less complicated implementation of the

write & read controllers

More complicated implementation of the

write & read controllers

Page 19: Midterm Project Report

Time ScheduleTime Schedule• Implementing the camera test-bench module

• Implementing the pixel processing unit

• Implementing the write part of the SDRAM (Initialization, writing and refreshing)

• Implementing the Cpu Test Bench – One week

• Implementing the fifo and sync module – One week

• Implementing the read controller –Two weeks

• Integration and testing – Two weeks

• learning synthesys and PLACE&ROUTE" tools – Two weeks

• Documentation