at.dms.kjc.spacetime
Class InterSliceBuffer

java.lang.Object
  extended by at.dms.kjc.backendSupport.Channel
      extended by at.dms.kjc.spacetime.OffChipBuffer
          extended by at.dms.kjc.spacetime.InterSliceBuffer

public class InterSliceBuffer
extends OffChipBuffer

This class represents a buffer between two traces. The rotating register abstraction is implemented by have rotating buffers, so we can actually have many physical buffers for each buffer.

Author:
mgordon

Field Summary
protected static HashMap<StreamingDram,Integer> dramsToBuffers
          A map of StreamingDrams to the number of InterTraceBuffers mapped to it.
protected  InterSliceEdge edge
           
 
Fields inherited from class at.dms.kjc.spacetime.OffChipBuffer
dram, owner, sizeSteady
 
Fields inherited from class at.dms.kjc.backendSupport.Channel
bufferStore, extraCount, ident, rotationLength, theEdge, unique_id
 
Constructor Summary
protected InterSliceBuffer(InterSliceEdge edge)
           
 
Method Summary
protected  void calculateSize()
           
static InterSliceBuffer getBuffer(InterSliceEdge edge)
           
 InterSliceEdge getEdge()
           
 OffChipBuffer getNonRedundant()
          if this buffer is redundant return the first upstream buffer that is not redundant, return null if this is a input->filter buffer with no input or a filter->output buffer with no output
 int getNumInterTraceBuffers(StreamingDram dram)
           
 boolean redundant()
           
 
Methods inherited from class at.dms.kjc.spacetime.OffChipBuffer
areAllAssigned, getDRAM, getIdent, getIdent, getIdent, getOwner, getRotationLength, getSize, isAssigned, isInterSlice, isIntraSlice, resetDRAMAssignment, setDRAM, setRotationLengths, toString, totalBufferSizeInBytes, unnecessary, unnecessary, unsetDRAM
 
Methods inherited from class at.dms.kjc.backendSupport.Channel
addChannel, assignFromPeekMethod, assignFromPeekMethodName, assignFromPopMethod, assignFromPopMethodName, beginInitRead, beginInitWrite, beginSteadyRead, beginSteadyWrite, dataDecls, dataDeclsH, endInitRead, endInitWrite, endSteadyRead, endSteadyWrite, findChannel, getBuffers, getDest, getExtraCount, getSource, getType, peekMethod, peekMethodName, popManyMethod, popManyMethodName, popMethod, popMethodName, postPreworkInitRead, printBuffers, pushMethod, pushMethodName, readDecls, readDeclsExtern, reset, setExtralength, topOfWorkSteadyRead, topOfWorkSteadyWrite, writeDecls, writeDeclsExtern
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

edge

protected InterSliceEdge edge

dramsToBuffers

protected static HashMap<StreamingDram,Integer> dramsToBuffers
A map of StreamingDrams to the number of InterTraceBuffers mapped to it. StreamingDram->Integer

Constructor Detail

InterSliceBuffer

protected InterSliceBuffer(InterSliceEdge edge)
Method Detail

getBuffer

public static InterSliceBuffer getBuffer(InterSliceEdge edge)

redundant

public boolean redundant()
Specified by:
redundant in class OffChipBuffer
Returns:
True of this buffer is not used because the output intrattracebuffer of the source trace performs its function.

getNonRedundant

public OffChipBuffer getNonRedundant()
Description copied from class: OffChipBuffer
if this buffer is redundant return the first upstream buffer that is not redundant, return null if this is a input->filter buffer with no input or a filter->output buffer with no output

Specified by:
getNonRedundant in class OffChipBuffer

calculateSize

protected void calculateSize()
Specified by:
calculateSize in class OffChipBuffer

getEdge

public InterSliceEdge getEdge()

getNumInterTraceBuffers

public int getNumInterTraceBuffers(StreamingDram dram)
Parameters:
dram -
Returns:
The number of intertracebuffer's mapped to
dram
. Used because each dram can at handle at most StreamingDram.STREAMING_QUEUE_SIZE number of reads and writes.