edu.cmu.emulator.dsp
Class DSPConfiguration

java.lang.Object
  extended by edu.cmu.emulator.dsp.DSPConfiguration
All Implemented Interfaces:
Comparator
Direct Known Subclasses:
PathBasedDSPConfiguration

public abstract class DSPConfiguration
extends Object
implements Comparator

DSPConfiguration stores information about the current configuration of the FPGA. This class must be concretely represented by subclasses that contain information about the specific configuration of the FPGA. For instance, it may store the number of signal paths currently supported as well as the delay path depth for each path, etc. Currently the only assumed commonality is that a given number of output ports exist. Part of the idea here is to try to store all configuration specific information in one place. So if we change to having configurations with shared signal paths and such the effects on the rest of the code will be reduced.


Field Summary
protected  Channel[] channels
           
protected static String DEFAULT_IP
           
protected  String ipAddress
           
protected  int numChannels
           
protected  Channel[] unsortedChannels
           
 
Constructor Summary
DSPConfiguration(Channel[] channels)
           
 
Method Summary
protected  void assignEmuPathIndices()
           
 int compare(Object o1, Object o2)
           
 Channel getChannel(int index)
           
 String getHashString()
           
 String getIPAddress()
           
 int getNumChannels()
           
 Channel getUnsortedChannel(int index)
          only used when constructing data structures getChannel() should be used during runtime
 void initializeDSPConfiguration()
          IMPORTANT: must call this routine before accessing members the fact that channels is null until here helps ensure this
static DSPConfiguration parse(Element dspConfigElement, EmuHWConfiguration emuHWConfig, Element channelDefElementDefault, String[] nodeUNames)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

channels

protected Channel[] channels

unsortedChannels

protected Channel[] unsortedChannels

numChannels

protected int numChannels

ipAddress

protected String ipAddress

DEFAULT_IP

protected static final String DEFAULT_IP
See Also:
Constant Field Values
Constructor Detail

DSPConfiguration

public DSPConfiguration(Channel[] channels)
Method Detail

initializeDSPConfiguration

public void initializeDSPConfiguration()
IMPORTANT: must call this routine before accessing members the fact that channels is null until here helps ensure this


assignEmuPathIndices

protected void assignEmuPathIndices()

getNumChannels

public int getNumChannels()

getChannel

public Channel getChannel(int index)

getUnsortedChannel

public Channel getUnsortedChannel(int index)
only used when constructing data structures getChannel() should be used during runtime


getHashString

public String getHashString()

parse

public static DSPConfiguration parse(Element dspConfigElement,
                                     EmuHWConfiguration emuHWConfig,
                                     Element channelDefElementDefault,
                                     String[] nodeUNames)

compare

public int compare(Object o1,
                   Object o2)
Specified by:
compare in interface Comparator

getIPAddress

public String getIPAddress()


Copyright © 2013. All Rights Reserved.