edu.cmu.emulator.hw
Class DSPHardwareConfiguration

java.lang.Object
  extended by edu.cmu.emulator.hw.DSPHardwareConfiguration

public class DSPHardwareConfiguration
extends Object

DSPConfiguration stores information about the hardware configuration of the DSP module. Port information can be accessed either by index or id. The id of the port is the "name" of the port. This is specified in the config file. Port id's are a number between 0 and the number of ports on the board minus 1. The index of the port is a number between 0 and the number of ports actually in use in this configuration minus 1. I.e. some physical ports might not be in use so this distinction allows us to handle that. So the id reflects the setup of the hardware while the index is simply for coding convenience.


Field Summary
protected  DSPHardwareProperties dspHWProps
           
protected static Logger log
           
protected  DSPPortConfiguration[] portConfigMap
           
protected  DSPPortConfiguration[] portConfigs
           
 
Constructor Summary
DSPHardwareConfiguration(DSPHardwareProperties dspHWProps, DSPPortConfiguration[] portConfigs)
           
 
Method Summary
 int getAuxFPGAPortID()
           
 String getHashString()
           
 int getIDForIndex(int index)
           
 int getIndexForID(int id)
           
 int getNumPorts()
           
 DSPPortConfiguration getPortConfigById(int index)
           
 DSPPortConfiguration getPortConfigByIndex(int index)
           
static DSPHardwareConfiguration parse(Element dspConfigElement)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dspHWProps

protected DSPHardwareProperties dspHWProps

portConfigs

protected DSPPortConfiguration[] portConfigs

portConfigMap

protected DSPPortConfiguration[] portConfigMap

log

protected static Logger log
Constructor Detail

DSPHardwareConfiguration

public DSPHardwareConfiguration(DSPHardwareProperties dspHWProps,
                                DSPPortConfiguration[] portConfigs)
Method Detail

getNumPorts

public int getNumPorts()

getPortConfigByIndex

public DSPPortConfiguration getPortConfigByIndex(int index)

getPortConfigById

public DSPPortConfiguration getPortConfigById(int index)

getIndexForID

public int getIndexForID(int id)

getIDForIndex

public int getIDForIndex(int index)

getAuxFPGAPortID

public int getAuxFPGAPortID()

toString

public String toString()
Overrides:
toString in class Object

getHashString

public String getHashString()

parse

public static DSPHardwareConfiguration parse(Element dspConfigElement)


Copyright © 2013. All Rights Reserved.