checkpoint
authoradam <adam@megacz.com>
Fri, 22 Sep 2006 10:29:33 +0000 (11:29 +0100)
committeradam <adam@megacz.com>
Fri, 22 Sep 2006 10:29:33 +0000 (11:29 +0100)
Makefile
src/com/atmel/fpslic/FakeFpslic.java
src/com/atmel/fpslic/Fpslic.java
src/com/atmel/fpslic/FpslicUtil.java [new file with mode: 0644]
src/edu/berkeley/slipway/Demo.java [moved from src/edu/berkeley/obits/AtmelSerial.java with 98% similarity]
src/edu/berkeley/slipway/FtdiBoard.java
src/edu/berkeley/slipway/gui/G.java [moved from src/edu/berkeley/obits/gui/G.java with 89% similarity]
src/edu/berkeley/slipway/gui/Gui.java [moved from src/edu/berkeley/obits/gui/Gui.java with 98% similarity]
src/edu/berkeley/slipway/gui/GuiConstants.java [moved from src/edu/berkeley/obits/gui/GuiConstants.java with 98% similarity]
src/edu/berkeley/slipway/gui/P.java [moved from src/edu/berkeley/obits/gui/P.java with 87% similarity]
src/edu/berkeley/slipway/gui/ZoomingPanel.java [moved from src/edu/berkeley/obits/gui/ZoomingPanel.java with 98% similarity]

index 7c9aeb0..639d5a2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ endif
 ## slipway ############################################################################
 
 run: slipway.jar 
-       java -cp slipway.jar edu.berkeley.obits.AtmelSerial < bitstreams/led0.md4
+       java -cp slipway.jar edu.berkeley.slipway.Demo < bitstreams/led0.md4
 
 build/src/com/ftdi/usb/FtdiUart.c: src/com/ftdi/usb/FtdiUart.i
        mkdir -p `dirname $@`
index 421c47b..9bf1742 100644 (file)
@@ -8,6 +8,8 @@ import org.ibex.util.Log;
 
 public class FakeFpslic extends Fpslic {
 
+    public FakeFpslic(int width, int height) { super(width, height); }
+
     public void mode4(int z, int y, int x, int d) { }
     public byte mode4(int z, int y, int x) {
         // FIXME
index 6538a6a..78381b3 100644 (file)
@@ -7,69 +7,17 @@ import static com.atmel.fpslic.FpslicConstants.*;
 
 public abstract class Fpslic {
 
-    public static class Util {
-        public static int lutSwap(int x) {
-            return
-                (x & 0x80)        |
-                ((x & 0x20) << 1) |
-                ((x & 0x40) >> 1) |
-                (x & 0x10) |
-                (x & 0x08)        |
-                ((x & 0x02) << 1) |
-                ((x & 0x04) >> 1) |
-                (x & 0x01);
-        }
-    }
-    
-    /** issue a command to the device in Mode4 format; see Gosset's documentation for further details */
-    public int getWidth() { return 24; }
-    public int getHeight() { return 24; }
-
-    private static String hex2(int i) {
-        String ret = Integer.toString(i, 16);
-        while(ret.length() < 2) ret = "0"+ret;
-        return ret.toUpperCase();
-    }
+    public Fpslic(int width, int height) { this.width = width; this.height = height; }
 
-    public void readMode4(InputStream in) throws IOException {
-        int count = 0;
-        BufferedReader br = new BufferedReader(new InputStreamReader(in));
-        for(String str = br.readLine(); str != null; str = br.readLine()) {
-            long foo = Long.parseLong(str, 16);
-            mode4((int)(foo >> 24), (int)(foo >> 16), (int)(foo >>  8), (int)(foo >>  0));
-            count++;
-        }
-        flush();
-        in.close();
-    }
+    private int width;
+    private int height;
+    public int getWidth() { return width; }
+    public int getHeight() { return height; }
 
     public abstract void flush();
-
-    public void writeMode4(Writer w) throws IOException {
-        for(int x=0; x<getWidth(); x++)
-            for(int y=0; y<getWidth(); y++)
-                for(int z=0; z<255; z++) {
-                    if ((z > 0x09 && z < 0x10) ||
-                        (z > 0x11 && z < 0x20) ||
-                        (z > 0x29 && z < 0x30) ||
-                        (z > 0x39 && z < 0x40) ||
-                        (z > 0x41 && z < 0x60) ||
-                        (z > 0x67 && z < 0x70) ||
-                        (z > 0x77 && z < 0xD0) ||
-                        (z > 0xD3))
-                        continue;
-                    w.write(hex2(z));
-                    w.write(hex2(y));
-                    w.write(hex2(x));
-                    w.write(hex2(mode4(z, y, x) & 0xff));
-                    w.write('\n');
-                }
-        w.flush();
-    }
-
-
     public abstract void mode4(int z, int y, int x, int d);
     public abstract byte mode4(int z, int y, int x);
+
     public          byte mode4zyx(int zyx) { return mode4(zyx>>24, (zyx>>16)&0xff, (zyx>>8)&0xff); }
     public          void mode4zyx(int zyx, int d, int invmask) { mode4(zyx>>24, (zyx>>16)&0xff, (zyx>>8)&0xff, d, invmask); }
     public          void mode4(int z, int y, int x, int d, int invmask) {
@@ -86,9 +34,7 @@ public abstract class Fpslic {
         mode4(z, y, x, old);
     }
 
-    // Fpslic ///////////////////////////////////////////////////////////////////////////////
-
-
+    // Inner Classes ///////////////////////////////////////////////////////////////////////////////
 
     public final class Sector {
         public final int col;
@@ -240,8 +186,8 @@ public abstract class Fpslic {
         public void lut(int xlut, int ylut) { xlut(xlut); ylut(ylut); }
         public void xlut(int table)    { mode4(7, row, col, (byte)(table & 0xff)); }
         public byte xlut()             { return (byte)(mode4(7, row, col) & 0xff); }
-        public String printXLut()      { return printLut(xlut(), "x", "y", "t"); }
-        public String printXLutX()     { return printLut(xlut(), str(xi(), "x"), str(yi(), "y"), str(ti_source(), "t")); }
+        public String printXLut()      { return FpslicUtil.printLut(xlut(), "x", "y", "t"); }
+        public String printXLutX()     { return FpslicUtil.printLut(xlut(), str(xi(), "x"), str(yi(), "y"), str(ti_source(), "t")); }
 
         public String str(int x, String def) {
             switch(x) {
@@ -266,8 +212,8 @@ public abstract class Fpslic {
         /* bit positions mean:  [MSB] zxy zx_ z_y z__ _xy _x_ __y ___ [LSB] */
         public void ylut(int table)    { mode4(6, row, col, (byte)(table & 0xff)); }
         public byte ylut()             { return (byte)(mode4(6, row, col) & 0xff); }
-        public String printYLut()      { return printLut(ylut(), "y", "x", "t"); }
-        public String printYLutX()     { return printLut(ylut(), str(yi(), "y"), str(xi(), "x"), str(ti_source(), "t")) + Integer.toString(ylut() & 0xff, 16); }
+        public String printYLut()      { return FpslicUtil.printLut(ylut(), "y", "x", "t"); }
+        public String printYLutX()     { return FpslicUtil.printLut(ylut(), str(yi(), "y"), str(xi(), "x"), str(ti_source(), "t")) + Integer.toString(ylut() & 0xff, 16); }
 
         public void ff_reset_value(boolean value) {
             //mode4( /* FIXME WRONG!!! */, row, col, 3, !value); return;
@@ -809,63 +755,5 @@ public abstract class Fpslic {
 
     }
 
-    public static void main(String[] s) throws Exception {
-        System.out.println(printLut(0x39, "se", "n", "L0"));
-    }
-    public static synchronized String printLut(int lut, String xn, String yn, String zn) {
-        try {
-            File f = File.createTempFile("mvsis", ".mvs");
-            f.deleteOnExit();
-
-            FileOutputStream fos = new FileOutputStream(f);
-            PrintWriter pw = new PrintWriter(new OutputStreamWriter(fos));
-            pw.println(".model clb");
-            pw.println(".inputs "+xn+" "+yn+" "+zn);
-            pw.println(".outputs O");
-            pw.println(".table "+xn+" "+yn+" "+zn+/*("X_xor_Y X_xor_Z Y_xor_Z")+*/ " -> O");
-            for(int i=8; i>=0; i--) {
-                int x = ((i & 0x01)!=0 ? 1 : 0);
-                int y = ((i & 0x02)!=0 ? 1 : 0);
-                int z = ((i & 0x04)!=0 ? 1 : 0);
-                pw.print(" "+x+" ");
-                pw.print(" "+y+" ");
-                pw.print(" "+z+" ");
-                //pw.print(" "+(x ^ y)+" ");
-                //pw.print(" "+(y ^ z)+" ");
-                //pw.print(" "+(z ^ y)+" ");
-                pw.print((lut & (1<<i))==0 ? 0 : 1);
-                pw.println();
-            }
-            pw.println(".end");
-            pw.flush();
-            pw.close();
-            Process p = Runtime.getRuntime().exec(new String[] { "mvsis", "-c", "simplify;print_factor", f.getAbsolutePath() });
-            new Gobble("mvsis: ", p.getErrorStream()).start();
-            //new Gobble("mvsis: ", p.getInputStream()).start();
-            BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
-            String ret = br.readLine();
-            //f.delete();
-            return ret.trim();
-        } catch (Exception e) {
-            e.printStackTrace();
-            return "*mvsis_error*";
-        }
-    }
-
-    public static class Gobble extends Thread {
-        private final String header;
-        private final BufferedReader br;
-        public Gobble(String header, BufferedReader br) { this.br = br; this.header = header; }
-        public Gobble(String header, Reader r)          { this(header, new BufferedReader(r)); }
-        public Gobble(String header, InputStream is)    { this(header, new InputStreamReader(is)); }
-        public void run() {
-            try {
-                for(String s = br.readLine(); s!=null; s=br.readLine())
-                    System.err.println(header + s);
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-        }
-    }
 
 }
diff --git a/src/com/atmel/fpslic/FpslicUtil.java b/src/com/atmel/fpslic/FpslicUtil.java
new file mode 100644 (file)
index 0000000..dd4b0e7
--- /dev/null
@@ -0,0 +1,115 @@
+package com.atmel.fpslic;
+
+import java.io.*;
+import java.util.*;
+
+public class FpslicUtil {
+
+    public static int lutSwap(int x) {
+        return
+            (x & 0x80)        |
+            ((x & 0x20) << 1) |
+            ((x & 0x40) >> 1) |
+            (x & 0x10) |
+            (x & 0x08)        |
+            ((x & 0x02) << 1) |
+            ((x & 0x04) >> 1) |
+            (x & 0x01);
+    }
+
+    public static void readMode4(InputStream in, Fpslic fpslic) throws IOException {
+        int count = 0;
+        BufferedReader br = new BufferedReader(new InputStreamReader(in));
+        for(String str = br.readLine(); str != null; str = br.readLine()) {
+            long foo = Long.parseLong(str, 16);
+            fpslic.mode4((int)(foo >> 24), (int)(foo >> 16), (int)(foo >>  8), (int)(foo >>  0));
+            count++;
+        }
+        fpslic.flush();
+        in.close();
+    }
+
+    public static void writeMode4(Writer w, Fpslic fpslic) throws IOException {
+        for(int x=0; x<fpslic.getWidth(); x++)
+            for(int y=0; y<fpslic.getWidth(); y++)
+                for(int z=0; z<255; z++) {
+                    if ((z > 0x09 && z < 0x10) ||
+                        (z > 0x11 && z < 0x20) ||
+                        (z > 0x29 && z < 0x30) ||
+                        (z > 0x39 && z < 0x40) ||
+                        (z > 0x41 && z < 0x60) ||
+                        (z > 0x67 && z < 0x70) ||
+                        (z > 0x77 && z < 0xD0) ||
+                        (z > 0xD3))
+                        continue;
+                    w.write(hex2(z));
+                    w.write(hex2(y));
+                    w.write(hex2(x));
+                    w.write(hex2(fpslic.mode4(z, y, x) & 0xff));
+                    w.write('\n');
+                }
+        w.flush();
+    }
+
+    private static String hex2(int i) {
+        String ret = Integer.toString(i, 16);
+        while(ret.length() < 2) ret = "0"+ret;
+        return ret.toUpperCase();
+    }
+
+    public static synchronized String printLut(int lut, String xn, String yn, String zn) {
+        try {
+            File f = File.createTempFile("mvsis", ".mvs");
+            f.deleteOnExit();
+
+            FileOutputStream fos = new FileOutputStream(f);
+            PrintWriter pw = new PrintWriter(new OutputStreamWriter(fos));
+            pw.println(".model clb");
+            pw.println(".inputs "+xn+" "+yn+" "+zn);
+            pw.println(".outputs O");
+            pw.println(".table "+xn+" "+yn+" "+zn+/*("X_xor_Y X_xor_Z Y_xor_Z")+*/ " -> O");
+            for(int i=8; i>=0; i--) {
+                int x = ((i & 0x01)!=0 ? 1 : 0);
+                int y = ((i & 0x02)!=0 ? 1 : 0);
+                int z = ((i & 0x04)!=0 ? 1 : 0);
+                pw.print(" "+x+" ");
+                pw.print(" "+y+" ");
+                pw.print(" "+z+" ");
+                //pw.print(" "+(x ^ y)+" ");
+                //pw.print(" "+(y ^ z)+" ");
+                //pw.print(" "+(z ^ y)+" ");
+                pw.print((lut & (1<<i))==0 ? 0 : 1);
+                pw.println();
+            }
+            pw.println(".end");
+            pw.flush();
+            pw.close();
+            Process p = Runtime.getRuntime().exec(new String[] { "mvsis", "-c", "simplify;print_factor", f.getAbsolutePath() });
+            new Gobble("mvsis: ", p.getErrorStream()).start();
+            //new Gobble("mvsis: ", p.getInputStream()).start();
+            BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
+            String ret = br.readLine();
+            //f.delete();
+            return ret.trim();
+        } catch (Exception e) {
+            e.printStackTrace();
+            return "*mvsis_error*";
+        }
+    }
+
+    public static class Gobble extends Thread {
+        private final String header;
+        private final BufferedReader br;
+        public Gobble(String header, BufferedReader br) { this.br = br; this.header = header; }
+        public Gobble(String header, Reader r)          { this(header, new BufferedReader(r)); }
+        public Gobble(String header, InputStream is)    { this(header, new InputStreamReader(is)); }
+        public void run() {
+            try {
+                for(String s = br.readLine(); s!=null; s=br.readLine())
+                    System.err.println(header + s);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+    }
+}
similarity index 98%
rename from src/edu/berkeley/obits/AtmelSerial.java
rename to src/edu/berkeley/slipway/Demo.java
index aa17b57..4fb97ac 100644 (file)
@@ -1,11 +1,10 @@
-package edu.berkeley.obits;
+package edu.berkeley.slipway;
 
 import edu.berkeley.slipway.*;
 import com.atmel.fpslic.*;
 import static com.atmel.fpslic.FpslicConstants.*;
-import static com.atmel.fpslic.Fpslic.Util.*;
-import edu.berkeley.obits.device.atmel.*;
-import edu.berkeley.obits.gui.*;
+import static com.atmel.fpslic.FpslicUtil.*;
+import edu.berkeley.slipway.gui.*;
 import java.awt.*;
 import java.awt.event.*;
 import java.awt.color.*;
@@ -14,7 +13,7 @@ import java.io.*;
 import java.util.*;
 import gnu.io.*;
 
-public class AtmelSerial {
+public class Demo {
 
     //public static boolean mullers = false;
     public static boolean mullers = true;
@@ -23,13 +22,13 @@ public class AtmelSerial {
         Enumeration e = CommPortIdentifier.getPortIdentifiers();
         while(e.hasMoreElements()) {
             CommPortIdentifier cpi = (CommPortIdentifier)e.nextElement();
-            Log.info(AtmelSerial.class, "trying " + cpi.getName());
+            Log.info(Demo.class, "trying " + cpi.getName());
             if (cpi.getName().startsWith("/dev/cu.usbserial-"))
                 return new RXTXPort(cpi.getName());
             if (cpi.getName().startsWith("/dev/ttyS0"))
                 return new RXTXPort(cpi.getName());
         }
-        Log.info(AtmelSerial.class, "returning null...");
+        Log.info(Demo.class, "returning null...");
         return null;
     }
     public static int PIPELEN=20;
@@ -38,11 +37,11 @@ public class AtmelSerial {
         Fpslic at40k = device;
         try {
             long begin = System.currentTimeMillis();
-            device.readMode4(new ProgressInputStream("configuring fabric", System.in, 111740));
+            FpslicUtil.readMode4(new ProgressInputStream("configuring fabric", System.in, 111740), device);
             long end = System.currentTimeMillis();
-            Log.info(AtmelSerial.class, "finished in " + ((end-begin)/1000) + "s");
+            Log.info(Demo.class, "finished in " + ((end-begin)/1000) + "s");
             Thread.sleep(1000);
-            Log.info(AtmelSerial.class, "issuing command");
+            Log.info(Demo.class, "issuing command");
 
             //at40k.iob_top(2, true).oe(false);
             //at40k.iob_top(2, false).oe(false);
@@ -513,7 +512,7 @@ public class AtmelSerial {
             vis.repaint();
             fr.repaint();
             fr.show();
-            synchronized(AtmelSerial.class) { AtmelSerial.class.wait(); }
+            synchronized(Demo.class) { Demo.class.wait(); }
 
 
 
@@ -624,11 +623,11 @@ public class AtmelSerial {
             device.flush();
             Thread.sleep(3000);
 
-            Log.info(AtmelSerial.class, "issuing command");
+            Log.info(Demo.class, "issuing command");
             at40k.iob_top(1, true).pulldown();
             device.flush();
             */
-            Log.info(AtmelSerial.class, "done");
+            Log.info(Demo.class, "done");
             System.exit(0);
         } catch (Exception e) { e.printStackTrace(); }
     }
@@ -1213,8 +1212,8 @@ public class AtmelSerial {
             case NW: case NE: case SW: case SE: {
                 c.xi(in);
                 loopback(c, XLUT);
-                if (!falling) c.ylut(lutSwap(0x0C)); /* x & !z */
-                else          c.ylut(lutSwap(0x30)); /* !x & z */
+                if (!falling) c.ylut(FpslicUtil.lutSwap(0x0C)); /* x & !z */
+                else          c.ylut(FpslicUtil.lutSwap(0x30)); /* !x & z */
                 c.xlut(LUT_SELF);
                 break;
             }
@@ -1235,8 +1234,8 @@ public class AtmelSerial {
         loopback(cell, YLUT);
         if (!invert) cell.ylut(0xB8);   /* yo = x ?  yi : z => 1011 1000 */
         else         cell.ylut(0x74);   /* yo = x ? !yi : z => 0111 0100 */
-        if (!invert) cell.xlut(lutSwap(0xB8));   /* yo = x ?  yi : z => 1011 1000 */
-        else         cell.xlut(lutSwap(0x74));   /* yo = x ? !yi : z => 0111 0100 */
+        if (!invert) cell.xlut(FpslicUtil.lutSwap(0xB8));   /* yo = x ?  yi : z => 1011 1000 */
+        else         cell.xlut(FpslicUtil.lutSwap(0x74));   /* yo = x ? !yi : z => 0111 0100 */
         cell.xi(xi);
         cell.yi(yi);
     }
index 4277993..9758540 100644 (file)
@@ -22,6 +22,7 @@ public class FtdiBoard extends Fpslic implements Board {
     public OutputStream getOutputStream() { return out; }
 
     public FtdiBoard() throws Exception {
+        super(24, 24);
         chip = new FpslicBoot(new FpslicBootPinsUsb(new FtdiUart(0x6666, 0x3133, 1500 * 1000)));
         String bstFile = this.getClass().getName();
         bstFile = bstFile.substring(0, bstFile.lastIndexOf('.'));
similarity index 89%
rename from src/edu/berkeley/obits/gui/G.java
rename to src/edu/berkeley/slipway/gui/G.java
index 3150823..233e55b 100644 (file)
@@ -1,9 +1,8 @@
-package edu.berkeley.obits.gui;
+package edu.berkeley.slipway.gui;
 
 import static com.atmel.fpslic.FpslicConstants.*;
-import static com.atmel.fpslic.Fpslic.Util.*;
-import edu.berkeley.obits.*;
-import edu.berkeley.obits.device.atmel.*;
+import static com.atmel.fpslic.FpslicUtil.*;
+import edu.berkeley.slipway.*;
 import java.awt.*;
 import java.awt.geom.*;
 import java.awt.event.*;
similarity index 98%
rename from src/edu/berkeley/obits/gui/Gui.java
rename to src/edu/berkeley/slipway/gui/Gui.java
index 1e739e1..7ef21b3 100644 (file)
@@ -1,11 +1,10 @@
-package edu.berkeley.obits.gui;
+package edu.berkeley.slipway.gui;
 
 import com.atmel.fpslic.*;
 import edu.berkeley.slipway.*;
 import static com.atmel.fpslic.FpslicConstants.*;
-import static com.atmel.fpslic.Fpslic.Util.*;
-import edu.berkeley.obits.*;
-import edu.berkeley.obits.device.atmel.*;
+import static com.atmel.fpslic.FpslicUtil.*;
+import edu.berkeley.slipway.*;
 import java.awt.*;
 import java.awt.geom.*;
 import java.awt.event.*;
@@ -14,7 +13,7 @@ import org.ibex.util.*;
 import java.io.*;
 import java.util.*;
 import javax.swing.*;
-import static edu.berkeley.obits.gui.GuiConstants.*;
+import static edu.berkeley.slipway.gui.GuiConstants.*;
 
 public class Gui extends ZoomingPanel implements KeyListener, MouseMotionListener {
 
@@ -35,7 +34,7 @@ public class Gui extends ZoomingPanel implements KeyListener, MouseMotionListene
             final JFileChooser fc = new JFileChooser();
             int returnVal = fc.showSaveDialog(this);
             Writer pw = new OutputStreamWriter(new FileOutputStream(fc.getSelectedFile()));
-            drone.writeMode4(pw);
+            FpslicUtil.writeMode4(pw, drone);
             pw.flush();
             pw.close();
             System.err.println("done writing");
@@ -48,7 +47,7 @@ public class Gui extends ZoomingPanel implements KeyListener, MouseMotionListene
         try {
             final JFileChooser fc = new JFileChooser();
             int returnVal = fc.showOpenDialog(this);
-            drone.readMode4(new FileInputStream(fc.getSelectedFile()));
+            FpslicUtil.readMode4(new FileInputStream(fc.getSelectedFile()), drone);
             System.err.println("done reading");
             repaint();
         } catch (Exception e) {
@@ -723,7 +722,7 @@ public class Gui extends ZoomingPanel implements KeyListener, MouseMotionListene
     public void scan(final Gui.Cell c) {
         try {
             final Fpslic.Cell cell = c.cell;
-            AtmelSerial.scan(at40k, cell, NONE, true);
+            Demo.scan(at40k, cell, NONE, true);
             boolean safe = !cell.fb_relevant();
             if (cell.xo()) safe = false;
             if (cell.yo()) safe = false;
@@ -748,7 +747,7 @@ public class Gui extends ZoomingPanel implements KeyListener, MouseMotionListene
                 }
                 
             }
-            AtmelSerial.scan(at40k, cell, NONE, false);
+            Demo.scan(at40k, cell, NONE, false);
         } catch (IOException e) {
             throw new RuntimeException(e);
         }
@@ -1,10 +1,9 @@
-package edu.berkeley.obits.gui;
+package edu.berkeley.slipway.gui;
 
 import com.atmel.fpslic.*;
 import static com.atmel.fpslic.FpslicConstants.*;
-import static com.atmel.fpslic.Fpslic.Util.*;
-import edu.berkeley.obits.*;
-import edu.berkeley.obits.device.atmel.*;
+import static com.atmel.fpslic.FpslicUtil.*;
+import edu.berkeley.slipway.*;
 import java.awt.*;
 import java.awt.geom.*;
 import java.awt.event.*;
similarity index 87%
rename from src/edu/berkeley/obits/gui/P.java
rename to src/edu/berkeley/slipway/gui/P.java
index b308d2d..79c986e 100644 (file)
@@ -1,9 +1,8 @@
-package edu.berkeley.obits.gui;
+package edu.berkeley.slipway.gui;
 
 import static com.atmel.fpslic.FpslicConstants.*;
-import static com.atmel.fpslic.Fpslic.Util.*;
-import edu.berkeley.obits.*;
-import edu.berkeley.obits.device.atmel.*;
+import static com.atmel.fpslic.FpslicUtil.*;
+import edu.berkeley.slipway.*;
 import java.awt.*;
 import java.awt.geom.*;
 import java.awt.event.*;
@@ -1,10 +1,9 @@
-package edu.berkeley.obits.gui;
+package edu.berkeley.slipway.gui;
 
 import com.atmel.fpslic.*;
 import static com.atmel.fpslic.FpslicConstants.*;
-import static com.atmel.fpslic.Fpslic.Util.*;
-import edu.berkeley.obits.*;
-import edu.berkeley.obits.device.atmel.*;
+import static com.atmel.fpslic.FpslicUtil.*;
+import edu.berkeley.slipway.*;
 import java.awt.*;
 import java.awt.geom.*;
 import java.awt.event.*;