CS/COE 536 Reconfigurable System on Chip Design Lockwood, Fall 2002

Machine Problem 3 -- Part 2

Implementation of Hybrid Priority and Per-Flow Queuing

Distribution revised: Friday, October 18th - Minor changes to Makefile and running time of simulation.  (new files are /sim/Makefile, /sim/testbench.do)

Instructions revised: Friday, October 18th - Additional hints about SRAM, and "anding" of scheduler's empty signals.

 

AssignedMonday, October 14, 2002 at 4:00PM
Due Date Thursday, October 24, 2002 at 5:00PM
Description: Add packet buffering and priority and per-flow pacing
to the firewall. Implement the queue manager
that uses a 3DQ scheduler to service flows. The
flow contexts must be maintained in SRAM.

The queue manager will interface to the
flow buffer to supply the head and tail pointers
needed for packet read and write operations.
Points  100

Introduction

In part 1 of this machine problem, you implemented the preparations for packet classification. Now, you will implement 3D-Queueing based on the assigned FlowID. The FPX platform supports off-chip SRAM and SDRAM, which will be utilized in this MP. You will create a queue manager that will manage linked-list pointers in the form of SDRAM addresses in SRAM. Packet data is stored in off-chip SDRAM by the Flow Buffer with is supplied as a simulation file and .edn file. The scheduler allows 3D-queueing by providing four levels of priority and Round-Robin within each priority. The scheduler is very flexible, for example, if all packets are assigned the identical priority then the scheduler is Round-Robin. In contrast, if all packets are given different priorities then the scheduler services the highest priority first.


Figure 1: MP3 Logical Component Diagram

 

Background: Flow Buffer

The flow buffer stores incoming packets in SDRAM by segmenting the packet into 124 byte "chunks." The chunks are maintained as a link-list, where each chunk has a pointer to the next 124 byte segment. The last chunk of the packet has the pointer to the first chunk of the next packet.

When the queue manager gives the flow buffer the pointer to the head of the packet queue, the flow buffer reads all the chunks of the packet, buffers them in temporary storage, and transmits them as a contiguous packet. At the same time, it retrieves the pointer to the next packet and gives it to the queue manager as the head of the packet queue.

Similarly, when the queue manager gives the flow buffer the pointer to the tail of the packet queue, then the flow buffer writes the incoming packet in the form of a link-list of chunks (starting from the tail pointer). After the packet has been written completely, it gives the new tail pointer to the queue manager.


Figure 2: Queue Manage Protocol

 

Background: Queue Manager

The queue manager is comprised of three independent functions: enqueue, dequeue, and scheduler. The queue manager maintains a head pointer,number of reads, number of writes, and tail pointer for each FlowID. Since we are allowing a 16 bit flowID, we have the potential of 64K individual flows. Given each FlowID contex consists of 4 32-bit values, how much memory is required to maintain 64K flows?


Figure 3: Queue Manager Interface

 

Background: The SRAM Interface

The SRAM interface provides the user with an arbitrated interface between two modules. In this machine problem, you can use one interface for the enqueue process and the other for the dequeue process. The timing diagram shown uses signal that are named from the perspective of the queue manager module. For example, SRAM_D_IN is the data that is coming into the queue manager module from the SRAM interface. The timing shown in the waveforms is accurate on the interface to the SRAM interface, if you flop your input/output signals, then you need to take that into account. The SRAM interface has 19 address pins (18 downto 0) of which we will use 18 (17 downto 0) and assign pin 18 always low.  This extra pin was to allow the FPX to accept 2MB SRAM modules instead of 1MB module.  The data bus is 36 bits wide, however we will be only using the lower 32 bits.  The additional 4 bits can be used for CRC over the data, but is not implemented in this lab.  You can assign the higher order 4 bits to be zero.

Figure 4: SRAM Timing Waveforms (Assumes signals are flopped.. adjust as your design requires)

 

Directions:

Table 1: Symbol Key

Of Interest Modify Synthesizable

Table 2: Contents of MP3.tar.gz

MP3_Part2/sim/ Simulation Folder    
  /testbench/    
    testbench.vhd The testbench for this FPX module.      
    clock.vhd   The clock for this FPX module.      
    fake_NID_in.vhd The fake input from the NID      
    fake_NID_out.vhd The fake output from the NID      
  INPUT_CELLS.TBP     Testbench Script for generating the incoming IP packets.  
  testbench.do The Modelsim macro files.      
  wave.do Another Modelsim macro files.      
  Makefile Example make file used to automate compilation and simulation      
   
MP3_Part2/syn/ Synthesis Folder
  /rad-xcv2000e/
    fpx.ucf The FPGA chip pin constraints file      
    bitgen.ut The BITGEN option file.      
    build The backend script for executing the Xilinx backend tools      
    *.edn The EDIF Macro files for synthesis with the Xilinx backend tools.    
  wrapper_app.prj  The project files for Synplicity Pro. It tells Synplicity Pro which vhdl files should be included for synthesis.      
  Makefile Example make file used to automate synthesis      
   
MP3_Part2/vhdl/ VHDL Source Folder
  wrappers/
    cellproc_sim.vhd The vhdl file for simulating the Cell Processor.      
    frameproc_sim.vhd The vhdl file for simulating the Frame Processor.      
    ipproc_sim.vhd The vhdl file for simulating the IP Processor.      
    udpproc_sim.vhd The vhdl file for simulating the UDP Processor.      
    framewrapper.vhd The vhdl file for the Frame Wrapper. It instantiates the Cell Processor and the Frame Processor and connects them together.    
    ipwrapper.vhd The vhdl file for the IP Wrapper. It instantiates the Frame Wrapper and the IP Processor and connects them together.    
    udpwrapper.vhd The vhdl file for the UDP Wrapper. It instantiates the IP Wrapper and the UDP Processor and connects them together.    
  /rad_loopback/ The Rad_Loopback Package Folder
    blink.vhd he vhdl file for the blink component. It controls the blinking of the LED on the FPX.    
    loopback_module.vhd The vhdl file for the loopback_module that is instantiated by the rad_loopback_core    
    rad_loopback_core.vhd The vhdl file for the rad_loopback_core component. It instantiates the wrapper_module at the ingress and the loopback_module at the egress.    
    rad_loopback.vhd The vhdl file for the top-level design of the rad_loopback.    
  regex_app_sim.vhd The vhdl file for simulating the Content Matching Module.  Use this file to copy the regex_app interface.    
  wrapper_module.vhd  The vhdl file for the FireWall_module.
  <wrapper_app.vhd>  The vhdl file for the FireWall_module. This needs to be copied from MP3 part 1.
  queue.vhd Partial VHDL file for Queue Manager
  flowbuffer_sim.vhd the vhdl file for simulating the FLow Buffer.    

Things to Turn In:

Here is a checklist of the things you need to turn in: