From 6168adb8d357e92272726a766c692eb99e7b2928 Mon Sep 17 00:00:00 2001 From: megacz Date: Fri, 27 Feb 2009 22:39:58 -0800 Subject: [PATCH] switch fpga->host communication from 8-bit words to 6-bit words --- ships/Debug.ship | 6 +++--- src/edu/berkeley/fleet/fpga/Client.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ships/Debug.ship b/ships/Debug.ship index 4ce4f09..739fb80 100644 --- a/ships/Debug.ship +++ b/ships/Debug.ship @@ -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 diff --git a/src/edu/berkeley/fleet/fpga/Client.java b/src/edu/berkeley/fleet/fpga/Client.java index 859e062..fb65e43 100644 --- a/src/edu/berkeley/fleet/fpga/Client.java +++ b/src/edu/berkeley/fleet/fpga/Client.java @@ -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; -- 1.7.10.4