bugfix to Alu3
authoradam <adam@megacz.com>
Fri, 10 Aug 2007 13:25:52 +0000 (14:25 +0100)
committeradam <adam@megacz.com>
Fri, 10 Aug 2007 13:25:52 +0000 (14:25 +0100)
ships/Alu3.ship

index e605f34..8daed2b 100644 (file)
@@ -94,7 +94,8 @@ public void service() {
           out2_d                       <= (keep_in1 ^ keep_in2 ^ keep_in3) >> 1;
           out3_d                       <= 0;
           bitstorage_count             <= bitstorage_count+1;
-          bitstorage[bitstorage_count] <= (keep_in1[0] ^ keep_in2[0] ^ keep_in3[0]);
+          bitstorage[bitstorage_count] = (keep_in1[0] ^ keep_in2[0] ^ keep_in3[0]);
+          outBits_d                    = bitstorage[(`DATAWIDTH-1):0];
           wrote = 1;
         end
         have_out1 <= 1;
@@ -107,10 +108,9 @@ public void service() {
     end
 
     if (!wrote && bitstorage_count >= `DATAWIDTH) begin
-       outBits_d         <= bitstorage[(`DATAWIDTH-1):0];
       `onwrite(outBits_r, outBits_a) begin
         bitstorage_count <= bitstorage_count - `DATAWIDTH;
-        bitstorage       <= bitstorage >> `DATAWIDTH;
+        bitstorage       = bitstorage >> `DATAWIDTH;
       end
     end    
   end