updates that were lying around but never got checked in; includes reorg of gui
[slipway.git] / src / edu / berkeley / abits / Board.java
1 package edu.berkeley.abits;
2
3 import edu.berkeley.abits.*;
4 import java.io.*;
5
6 /** interface for controlling an FPGA on a development board */
7 public interface Board {
8
9     /** "deepest" possible reset of the FPGA */
10     public void reset() throws IOException;
11
12     /** return an OutputStream to which a configuration bitstream may be written */
13     public OutputStream getConfigStream() throws IOException;
14
15     /** InputStream for communicating with the device after configuration */
16     public InputStream  getInputStream() throws IOException;
17
18     /** OutputStream for communicating with the device after configuration */
19     public OutputStream getOutputStream() throws IOException;
20
21     /** causes the device to perform a self-test */
22     public void selfTest(SelfTestResultListener resultListener) throws Exception;
23
24     /** returns the actual device on the board */
25     public Device getDevice();
26
27     public static interface SelfTestResultListener {
28         public void reportTestResult(int testNumber, int totalNumberOfTests, boolean didPass);
29     }
30 }