byucc.jhdl.platforms.util.hwi
Class RemoteHardwareControl

java.lang.Object
  extended byjava.rmi.server.RemoteObject
      extended byjava.rmi.server.RemoteServer
          extended byjava.rmi.server.UnicastRemoteObject
              extended bybyucc.jhdl.platforms.util.hwi.RemoteHardwareControl
All Implemented Interfaces:
HardwareControlInterfaceStub, java.rmi.Remote, java.io.Serializable

public class RemoteHardwareControl
extends java.rmi.server.UnicastRemoteObject
implements HardwareControlInterfaceStub

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
RemoteHardwareControl(HardwareControlInterface HCI)
           
 
Method Summary
 int close()
          Closes the board.
 void finalize()
           
 int freeRunClock(int clock)
          Free runs the specified clock.
 RemoteDataReturn getMemory(int set, int memory, int address, int length, byte[][] data)
          Gets the contents of the specified memory.
 int getMemoryWidth(int set, int memory)
          Returns the width of the specified memory element.
 RemoteDataReturn getRegister(int set, int register, byte[] data)
          Returns the width of the specified memory element.
 int getRegisterWidth(int set, int register)
          Returns the width of the specified memory element.
 int open()
          Opens the board.
 int program(int fpga, byte[] data)
          Programs the specified FPGA.
 RemoteDataReturn readback(int fpga, byte[] data)
          Readbacks the state of the specified FPGA.
 int setClockFrequency(int clock, float freq)
          Sets the frequency of the specified clock.
 int setMemory(int set, int memory, int address, int length, byte[][] data)
          Sets the contents of the specified memory.
 int setRegister(int set, int register, byte[] data)
          Returns the width of the specified memory element.
 int stepClock(int clock, int steps)
          Steps the specified hardware clock the given number of cycles.
 int stopClock(int clock)
          Stops the specified free-running clock.
 int writeback(int fpga, byte[] data)
          Writeback the state of a circuit.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RemoteHardwareControl

public RemoteHardwareControl(HardwareControlInterface HCI)
                      throws java.rmi.RemoteException
Method Detail

open

public int open()
         throws java.rmi.RemoteException
Opens the board.

Specified by:
open in interface HardwareControlInterfaceStub
Throws:
java.rmi.RemoteException

close

public int close()
          throws java.rmi.RemoteException
Closes the board.

Specified by:
close in interface HardwareControlInterfaceStub
Throws:
java.rmi.RemoteException

stepClock

public int stepClock(int clock,
                     int steps)
              throws java.rmi.RemoteException
Steps the specified hardware clock the given number of cycles.

Specified by:
stepClock in interface HardwareControlInterfaceStub
Parameters:
clock - Clock number.
steps - Number of steps to perform.
Throws:
java.rmi.RemoteException

setClockFrequency

public int setClockFrequency(int clock,
                             float freq)
                      throws java.rmi.RemoteException
Sets the frequency of the specified clock.

Specified by:
setClockFrequency in interface HardwareControlInterfaceStub
Parameters:
clock - Clock number.
freq - Frequency to which the clock will be set.
Throws:
java.rmi.RemoteException

freeRunClock

public int freeRunClock(int clock)
                 throws java.rmi.RemoteException
Free runs the specified clock.

Specified by:
freeRunClock in interface HardwareControlInterfaceStub
Parameters:
clock - Clock number.
Throws:
java.rmi.RemoteException

stopClock

public int stopClock(int clock)
              throws java.rmi.RemoteException
Stops the specified free-running clock.

Specified by:
stopClock in interface HardwareControlInterfaceStub
Parameters:
clock - Clock number.
Throws:
java.rmi.RemoteException

program

public int program(int fpga,
                   byte[] data)
            throws java.rmi.RemoteException
Programs the specified FPGA.

Specified by:
program in interface HardwareControlInterfaceStub
Parameters:
data - Programming data.
Throws:
java.rmi.RemoteException

readback

public RemoteDataReturn readback(int fpga,
                                 byte[] data)
                          throws java.rmi.RemoteException
Readbacks the state of the specified FPGA.

Specified by:
readback in interface HardwareControlInterfaceStub
Parameters:
fpga - FPGA to readback.
data - Byte array to fill with the readback data.
Throws:
java.rmi.RemoteException

writeback

public int writeback(int fpga,
                     byte[] data)
              throws java.rmi.RemoteException
Writeback the state of a circuit.

Specified by:
writeback in interface HardwareControlInterfaceStub
Parameters:
fpga - FPGA to which data will be written.
data - Data to write back to device.
Throws:
java.rmi.RemoteException

getMemoryWidth

public int getMemoryWidth(int set,
                          int memory)
                   throws java.rmi.RemoteException
Returns the width of the specified memory element.

Specified by:
getMemoryWidth in interface HardwareControlInterfaceStub
Parameters:
set - Memory set.
memory - Memory number in the specified memory set.
Throws:
java.rmi.RemoteException

setMemory

public int setMemory(int set,
                     int memory,
                     int address,
                     int length,
                     byte[][] data)
              throws java.rmi.RemoteException
Sets the contents of the specified memory.

Specified by:
setMemory in interface HardwareControlInterfaceStub
Parameters:
set - Memory set.
memory - Memory number in the specified memory set.
address - Address at which the data will start to be written.
length - Number of addresses to be written.
data - Data to be written to the memory.
Throws:
java.rmi.RemoteException

getMemory

public RemoteDataReturn getMemory(int set,
                                  int memory,
                                  int address,
                                  int length,
                                  byte[][] data)
                           throws java.rmi.RemoteException
Gets the contents of the specified memory.

Specified by:
getMemory in interface HardwareControlInterfaceStub
Parameters:
set - Memory set.
memory - Memory number in the specified memory set.
address - Address at which the data will start to be read.
length - Number of addresses to be read.
data - Byte[] to which data will be written.
Throws:
java.rmi.RemoteException

getRegisterWidth

public int getRegisterWidth(int set,
                            int register)
                     throws java.rmi.RemoteException
Returns the width of the specified memory element.

Specified by:
getRegisterWidth in interface HardwareControlInterfaceStub
Parameters:
set - Register set.
Throws:
java.rmi.RemoteException

setRegister

public int setRegister(int set,
                       int register,
                       byte[] data)
                throws java.rmi.RemoteException
Returns the width of the specified memory element.

Specified by:
setRegister in interface HardwareControlInterfaceStub
Parameters:
set - Register set.
data - Data to be written to the register.
Throws:
java.rmi.RemoteException

getRegister

public RemoteDataReturn getRegister(int set,
                                    int register,
                                    byte[] data)
                             throws java.rmi.RemoteException
Returns the width of the specified memory element.

Specified by:
getRegister in interface HardwareControlInterfaceStub
Parameters:
set - Register set.
data - Byte[] to which the register data will be written.
Throws:
java.rmi.RemoteException

finalize

public void finalize()
              throws java.rmi.RemoteException
Specified by:
finalize in interface HardwareControlInterfaceStub
Throws:
java.rmi.RemoteException


Copyright ? 2006 Brigham Young University, Configurable Computing Laboratory. All Rights Reserved.