+
+== UCF ===============================================================
+
+#Net "dvi_0/dvi_xclk_p_unbuffered" PERIOD = 5 ns HIGH 50%;
+
+NET dvi_d0 LOC="AB8" | IOSTANDARD="LVDCI_33"; # Bank 22, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET dvi_d1 LOC="AC8" | IOSTANDARD="LVDCI_33"; # Bank 22, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET dvi_d2 LOC="AN12" | IOSTANDARD="LVDCI_33"; # Bank 22, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET dvi_d3 LOC="AP12" | IOSTANDARD="LVDCI_33"; # Bank 22, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET dvi_d4 LOC="AA9" | IOSTANDARD="LVDCI_33"; # Bank 22, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET dvi_d5 LOC="AA8" | IOSTANDARD="LVDCI_33"; # Bank 22, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET dvi_d6 LOC="AM13" | IOSTANDARD="LVDCI_33"; # Bank 22, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET dvi_d7 LOC="AN13" | IOSTANDARD="LVDCI_33"; # Bank 22, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET dvi_d8 LOC="AA10" | IOSTANDARD="LVDCI_33"; # Bank 22, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET dvi_d9 LOC="AB10" | IOSTANDARD="LVDCI_33"; # Bank 22, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET dvi_d10 LOC="AP14" | IOSTANDARD="LVDCI_33"; # Bank 22, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET dvi_d11 LOC="AN14" | IOSTANDARD="LVDCI_33"; # Bank 22, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET dvi_de LOC="AE8" | IOSTANDARD="LVDCI_33" | SLEW=FAST; # Bank 22, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET dvi_reset_b LOC="AK6" | IOSTANDARD="LVCMOS33"; # Bank 18, Vcco=3.3V, No DCI
+NET dvi_h LOC="AM12" | IOSTANDARD="LVDCI_33" | SLEW=FAST; # Bank 22, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET dvi_v LOC="AM11" | IOSTANDARD="LVDCI_33" | SLEW=FAST; # Bank 22, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET dvi_xclk_n LOC="AL10" | IOSTANDARD="LVCMOS33" | DRIVE=24 | SLEW=FAST; # Bank 22, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET dvi_xclk_p LOC="AL11" | IOSTANDARD="LVCMOS33" | DRIVE=24 | SLEW=FAST; # Bank 22, Vcco=3.3V, DCI using 49.9 ohm resistors
+
+NET dvi_gpio1 LOC="N30" | IOSTANDARD="LVCMOS18"; # Bank 15, Vcco=1.8V, DCI using 49.9 ohm resistors
+NET dvi_iic_scl LOC="U27" | PULLUP | IOSTANDARD="LVCMOS18"; # Bank 15, Vcco=1.8V, DCI using 49.9 ohm resistors
+NET dvi_iic_sda LOC="T29" | PULLUP | IOSTANDARD="LVCMOS18"; # Bank 15, Vcco=1.8V, DCI using 49.9 ohm resistors
+
+NET gpio_led_0 LOC="H18"; # Bank 3, Vcco=2.5V, No DCI
+NET gpio_led_1 LOC="L18"; # Bank 3, Vcco=2.5V, No DCI
+NET gpio_led_2 LOC="G15"; # Bank 3, Vcco=2.5V, No DCI
+NET gpio_led_3 LOC="AD26" | IOSTANDARD="LVCMOS18"; # Bank 21, Vcco=1.8V, DCI using 49.9 ohm resistors
+NET gpio_led_4 LOC="G16"; # Bank 3, Vcco=2.5V, No DCI
+NET gpio_led_5 LOC="AD25" | IOSTANDARD="LVCMOS18"; # Bank 21, Vcco=1.8V, DCI using 49.9 ohm resistors
+NET gpio_led_6 LOC="AD24" | IOSTANDARD="LVCMOS18"; # Bank 21, Vcco=1.8V, DCI using 49.9 ohm resistors
+NET gpio_led_7 LOC="AE24" | IOSTANDARD="LVCMOS18"; # Bank 21, Vcco=1.8V, DCI using 49.9 ohm resistors
+
+######
+
+NET sram_adv_ld_b LOC="H8"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_bw0 LOC="D10"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_bw1 LOC="D11"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_bw2 LOC="J11"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_bw3 LOC="K11"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_clk LOC="AG21"; # Bank 4, Vcco=3.3V, No DCI
+NET sram_clk LOC="G8"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_cs_b LOC="J10"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_d16 LOC="N10"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_d17 LOC="E13"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_d18 LOC="E12"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_d19 LOC="L9"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_d20 LOC="M10"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_d21 LOC="E11"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_d22 LOC="F11"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_d23 LOC="L8"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_d24 LOC="M8"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_d25 LOC="G12"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_d26 LOC="G11"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_d27 LOC="C13"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_d28 LOC="B13"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_d29 LOC="K9"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_d30 LOC="K8"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_d31 LOC="J9"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_dqp0 LOC="D12"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_dqp1 LOC="C12"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_dqp2 LOC="H10"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_dqp3 LOC="H9"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_flash_a0 LOC="K12"; # Bank 1, Vcco=3.3V
+NET sram_flash_a1 LOC="K13"; # Bank 1, Vcco=3.3V
+NET sram_flash_a2 LOC="H23"; # Bank 1, Vcco=3.3V
+NET sram_flash_a3 LOC="G23"; # Bank 1, Vcco=3.3V
+NET sram_flash_a4 LOC="H12"; # Bank 1, Vcco=3.3V
+NET sram_flash_a5 LOC="J12"; # Bank 1, Vcco=3.3V
+NET sram_flash_a6 LOC="K22"; # Bank 1, Vcco=3.3V
+NET sram_flash_a7 LOC="K23"; # Bank 1, Vcco=3.3V
+NET sram_flash_a8 LOC="K14"; # Bank 1, Vcco=3.3V
+NET sram_flash_a9 LOC="L14"; # Bank 1, Vcco=3.3V
+NET sram_flash_a10 LOC="H22"; # Bank 1, Vcco=3.3V
+NET sram_flash_a11 LOC="G22"; # Bank 1, Vcco=3.3V
+NET sram_flash_a12 LOC="J15"; # Bank 1, Vcco=3.3V
+NET sram_flash_a13 LOC="K16"; # Bank 1, Vcco=3.3V
+NET sram_flash_a14 LOC="K21"; # Bank 1, Vcco=3.3V
+NET sram_flash_a15 LOC="J22"; # Bank 1, Vcco=3.3V
+NET sram_flash_a16 LOC="L16"; # Bank 1, Vcco=3.3V
+NET sram_flash_a17 LOC="L15"; # Bank 1, Vcco=3.3V
+NET sram_flash_a18 LOC="L20"; # Bank 1, Vcco=3.3V
+NET sram_flash_a19 LOC="L21"; # Bank 1, Vcco=3.3V
+NET sram_flash_a20 LOC="AE23"; # Bank 2, Vcco=3.3V
+NET sram_flash_a21 LOC="AE22"; # Bank 2, Vcco=3.3V
+NET sram_flash_d0 LOC="AD19"; # Bank 2, Vcco=3.3V
+NET sram_flash_d1 LOC="AE19"; # Bank 2, Vcco=3.3V
+NET sram_flash_d2 LOC="AE17"; # Bank 2, Vcco=3.3V
+NET sram_flash_d3 LOC="AF16"; # Bank 2, Vcco=3.3V
+NET sram_flash_d4 LOC="AD20"; # Bank 2, Vcco=3.3V
+NET sram_flash_d5 LOC="AE21"; # Bank 2, Vcco=3.3V
+NET sram_flash_d6 LOC="AE16"; # Bank 2, Vcco=3.3V
+NET sram_flash_d7 LOC="AF15"; # Bank 2, Vcco=3.3V
+NET sram_flash_d8 LOC="AH13"; # Bank 4, Vcco=3.3V, No DCI
+NET sram_flash_d9 LOC="AH14"; # Bank 4, Vcco=3.3V, No DCI
+NET sram_flash_d10 LOC="AH19"; # Bank 4, Vcco=3.3V, No DCI
+NET sram_flash_d11 LOC="AH20"; # Bank 4, Vcco=3.3V, No DCI
+NET sram_flash_d12 LOC="AG13"; # Bank 4, Vcco=3.3V, No DCI
+NET sram_flash_d13 LOC="AH12"; # Bank 4, Vcco=3.3V, No DCI
+NET sram_flash_d14 LOC="AH22"; # Bank 4, Vcco=3.3V, No DCI
+NET sram_flash_d15 LOC="AG22"; # Bank 4, Vcco=3.3V, No DCI
+NET sram_flash_we_b LOC="AF20"; # Bank 2, Vcco=3.3V
+NET sram_mode LOC="A13"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+NET sram_oe_b LOC="B12"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors
+
+
+
+== TeX ==============================================================
+
+== Fleeterpreter ====================================================
+private java.awt.Frame frame = null;
+private java.awt.Panel panel = null;
+private long[][] bits;
+public static int SCREEN_WIDTH = 577;
+public static int SCREEN_HEIGHT = 478;
+public void service() {
+ long x,y,d;
+ if (box_inPixelX.dataReadyForShip() &&
+ box_inPixelY.dataReadyForShip() &&
+ box_inPixelValue.dataReadyForShip()) {
+ x = box_inPixelX.removeDataForShip();
+ y = box_inPixelY.removeDataForShip();
+ d = box_inPixelValue.removeDataForShip();
+ } else if (box_inAddrWrite.dataReadyForShip() &&
+ box_inDataWrite.dataReadyForShip() &&
+ box_out.readyForDataFromShip()) {
+ long addr = box_inAddrWrite.removeDataForShip();
+ x = addr % SCREEN_WIDTH;
+ y = addr / SCREEN_WIDTH;
+ d = box_inDataWrite.removeDataForShip();
+ box_out.addDataFromShip(0,true);
+ } else if (box_inAddrRead.dataReadyForShip() &&
+ box_out.readyForDataFromShip()) {
+ long addr = box_inAddrRead.removeDataForShip();
+ x = addr % SCREEN_WIDTH;
+ y = addr / SCREEN_WIDTH;
+ box_out.addDataFromShip(bits[(int)x][(int)y],false);
+ return;
+ } else {
+ return;
+ }
+ if (frame==null) {
+ frame = new java.awt.Frame();
+ bits = new long[SCREEN_WIDTH][SCREEN_HEIGHT];
+ for(int i=0; i<SCREEN_WIDTH; i++) bits[i] = new long[SCREEN_HEIGHT];
+ frame.setSize(SCREEN_WIDTH,SCREEN_HEIGHT);
+ panel = new java.awt.Panel() {
+ public void paint(java.awt.Graphics g_) {
+ java.awt.Graphics2D g2 = (java.awt.Graphics2D)g_;
+ g2.transform(java.awt.geom.AffineTransform.getScaleInstance(((double)panel.getWidth())/SCREEN_WIDTH,
+ ((double)panel.getHeight())/SCREEN_HEIGHT));
+ for(int xx=0; xx<SCREEN_WIDTH; xx++) {
+ for(int yy=0; yy<SCREEN_HEIGHT; yy++) {
+ long d = bits[xx][yy];
+ java.awt.Color c = new java.awt.Color(
+ (int)(((d >> 12) & ~((-1L) << 6)) << 2),
+ (int)(((d >> 6) & ~((-1L) << 6)) << 2),
+ (int)(((d >> 0) & ~((-1L) << 6)) << 2)
+ );
+ g2.setColor(c);
+ g2.fillRect((int)xx,(int)yy,1,1);
+ }
+ }
+ }
+ };
+ frame.setLayout(new java.awt.BorderLayout());
+ frame.add(panel, java.awt.BorderLayout.CENTER);
+ panel.setBackground(java.awt.Color.black);
+ frame.show();
+ }
+ bits[(int)x][(int)y] = d;
+ panel.repaint();
+}
+
+== FleetSim ==============================================================
+
+== Constants =========================================================