switch fpga->host communication from 8-bit words to 6-bit words
authormegacz <adam@megacz.com>
Sat, 28 Feb 2009 06:39:58 +0000 (22:39 -0800)
committermegacz <adam@megacz.com>
Sat, 28 Feb 2009 06:39:58 +0000 (22:39 -0800)
ships/Debug.ship
src/edu/berkeley/fleet/fpga/Client.java

index 4ce4f09..739fb80 100644 (file)
@@ -114,10 +114,10 @@ public void service() {
        end else if (count_out==0 && `in_full) begin
          `drain_in
          data_to_host_full_word <= in_d;
-         count_out <= 6;
+         count_out <= 8;
        end else if (count_out!=0 && !data_to_host_full && !data_to_host_write_enable) begin
-         data_to_host <= data_to_host_full_word[7:0];
-         data_to_host_full_word <= (data_to_host_full_word >> 8);
+         data_to_host <= { 2'b0, data_to_host_full_word[5:0] };
+         data_to_host_full_word <= (data_to_host_full_word >> 6);
          data_to_host_write_enable <= 1;
          count_out <= count_out-1;
        end
index 859e062..fb65e43 100644 (file)
@@ -75,11 +75,11 @@ public class Client extends FleetProcess {
                     while(true) {
                         long result = 0;
                         int val = 0;
-                        for(int i=0; i<6; i++) {
+                        for(int i=0; i<8; i++) {
                             val = is.read();
                             if (val==-1) break;
                             long val2 = (val & 0xffL);
-                            val2 = val2 << (i * 8);
+                            val2 = val2 << (i * 6);
                             result |= val2;
                         }
                         if (val==-1) break;