edu.cmu.emulator.controlComm
Class SetScaleMessage

java.lang.Object
  extended by edu.cmu.emulator.controlComm.CMessage
      extended by edu.cmu.emulator.controlComm.TupleMessage
          extended by edu.cmu.emulator.controlComm.SetScaleMessage

public class SetScaleMessage
extends TupleMessage


Field Summary
protected  int filledTuples
           
protected static int O_INDEX
           
protected static int O_MULT_FACTOR
           
protected static int O_MULT_FACTOR_Q
           
protected static int O_SHIFT_FACTOR
           
 
Fields inherited from class edu.cmu.emulator.controlComm.TupleMessage
I_NUM_TUPLES, I_TUPLE_0, TUPLE_SIZE
 
Fields inherited from class edu.cmu.emulator.controlComm.CMessage
D_AUX_FPGA, I_BODY, I_DEST, I_SOURCE, I_TYPE, MAX_LENGTH, msg, S_EMU_CONTROLLER, T_DCC_LOCAL, T_MISC_COMMAND, T_READ_REG, T_REG_VALUE, T_SET_DELAY, T_SET_PHASE_SHIFT, T_SET_SCALE, T_SET_TIMED_SCALE, T_STORE_SIGNAL, T_TEST, T_WRITE_REG
 
Constructor Summary
SetScaleMessage(int numTuples)
           
 
Method Summary
 void addScaleSet(int index, int multFactor, int shiftFactor)
          The semantics of each scale set are as follows: For the signal path identified by index, the internal registers are updated so that: outSignal = ((inSignal * multFactor) / 2**shiftFactor)
 void addScaleSet(int index, int multFactor, int shiftFactor, int multFactorQ)
           
(package private)  byte[] getBytes()
           
private  int getIndex(int tupleNum)
           
private  int getMultFactor(int tupleNum)
           
private  int getMultFactorQ(int tupleNum)
           
 int getNumTuples()
           
private  int getShiftFactor(int tupleNum)
           
 String toString()
           
 
Methods inherited from class edu.cmu.emulator.controlComm.CMessage
getByte, getDest, getLength, getSource, getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

filledTuples

protected int filledTuples

O_INDEX

protected static final int O_INDEX
See Also:
Constant Field Values

O_MULT_FACTOR

protected static final int O_MULT_FACTOR
See Also:
Constant Field Values

O_SHIFT_FACTOR

protected static final int O_SHIFT_FACTOR
See Also:
Constant Field Values

O_MULT_FACTOR_Q

protected static final int O_MULT_FACTOR_Q
See Also:
Constant Field Values
Constructor Detail

SetScaleMessage

public SetScaleMessage(int numTuples)
Method Detail

getNumTuples

public int getNumTuples()

addScaleSet

public void addScaleSet(int index,
                        int multFactor,
                        int shiftFactor)
The semantics of each scale set are as follows: For the signal path identified by index, the internal registers are updated so that: outSignal = ((inSignal * multFactor) / 2**shiftFactor)

Parameters:
index - Identifies the path for which a change is to be made.
multFactor - Multiplication factor.
shiftFactor - Right-shift value

addScaleSet

public void addScaleSet(int index,
                        int multFactor,
                        int shiftFactor,
                        int multFactorQ)

getIndex

private int getIndex(int tupleNum)

getMultFactor

private int getMultFactor(int tupleNum)

getShiftFactor

private int getShiftFactor(int tupleNum)

getMultFactorQ

private int getMultFactorQ(int tupleNum)

getBytes

byte[] getBytes()
Overrides:
getBytes in class CMessage

toString

public String toString()
Overrides:
toString in class CMessage


Copyright © 2013. All Rights Reserved.