CS/COE 535M Acceleration of Algorithms in Reconfigurable Hardware Lockwood, Fall 2001

Machine Problem 4

Packet Buffering in SDRAM for Rate Control

Assigned Monday October 22, 2001
Due Date Part 1: Monday, October 29, 2001, 5pm
Part 2: Thursday, November 1, 2001, 4pm
Purpose: Buffer packets to regulate network traffic flow
Points50

Introduction

A common function of networking hardware involves buffering of packets. Synchronous Dynamic Random Access Memory (SDRAM) is a suitable technology for packet buffering because it has high capacity at very low cost. A bare SDRAM chip, however, is somewhat difficult to use. Further, SDRAM is a resource which must be shared among mutiple modules on the FPX. A SDRAM memory controller has been implemented for the FPX which provides a simplied interface to SDRAM memory and allows multiple modules to to share memory.

There are many ways in which packets can be buffered. The simpliest of all is First-In-First-Out (FIFO). In this machine problem you are to use SDRAM to build a simple FIFO packet buffer for the FPX. The module will accept cells at the input, store them into the FIFO memory, then transmit them to the output in the same order in which they arrived.

The rate at which packets will be transmitted on the outgoing link will be regulated. In this machine problem, we will also implement a control policy which transmits packets no faster than a constant rate.

Description of the Assignment

The purpose of this assignment is to build a simple FIFO for buffering cells and to control the rate at which the packets are dequeued from the FIFO. The following diagram illustrates the concept of the the rate control circuit. The module receives bursty data traffic but gives out cells out at a regular rate. The pace at which the cells are given out should be controllable.



Rate Control Mechanism

Thus, the module stores incoming cells in the cell FIFO as they arrive and pulls out the cells only at a regular interval. The following diagram shows how the module should be built. Most of the components in this figure are provided to you. You are required to design only the "CellFifo" component in this design.



Components of the Fifo

Some more clarification for the CellFIFO

Details of the SDRAM Memory Controller Interface

The SDRAM memory controller on the FPX has several features. It The following figure shows how the module is interfaced with the SDRAM controller. note that the actual SDRAM is hidden from the user and that the user interacts only with the controller.



Connection of a module to the SDRAM controller

The SDRAM Controller interface document gives the details of each signal in the SDRAM controller and shows how to connect a module to the SDRAM controller. This document also describes the protocol for reading and writing the words in the SDRAM. This document should be thoroughly understood before the SDRAM controller is used.

The following figures shows the bubble diagram of a state machine which reads and writes memory. The statements in blue color show the actions to be taken on that clock edge for the Read operation and the statements in the red color show the corresponding actions in a write operation. By default the state-machine sits in the Start state. When the state-machine gets the StartRead or a StartWrite signal, it goes to a Request state and while making this transition, it makes a request by asserting the request signal high for only one clock cycle. The request signal should be pulled down on the next clock edge. From the Request state, the state-machine goes to the WaitGrant1 state where it waits for Grant1 from the SDRAM controller.

Note that the state-machine looks at the Clocked Grant1 signal and not the Grant1 signal. The Grant1 signal must be clocked before it is used



Bubble diagram for state machine that reads and writes to the SDRAM controller

After receiving the ClockedGrant1, the state-machine goes into the SendAddress state and during this transition, it puts the starting address of the burst read/write on the InfoBus. From the SendAddress state, the state-machine goes to the SendBLType state and during this transition it puts the Burst Length and the Operation Type on the InfoBus (as described in the interface document). From the SendBlType state, state-machine goes into the WaitGrant2 state where it keeps waiting for Grant2. Again note that the state-machine looks at the Clocked Grant2 signal and not the Grant2 signal. The Grant2 signal must be clocked before it is used Once the Clocked Grant2 is received, the state-machine goes to the Read/Write state. During this transition it reads or writes the first word. After going to the Read/Write state,it keeps reading or writing the words for the rest of the burst. Once the last word is read or written, the state-machine goes back to the Start state again.

Assignment Details

Things to turn in