fix awful c-flag bug in Memory.ship
[fleet.git] / ships / Memory.ship
index 7245737..6291093 100644 (file)
@@ -205,6 +205,7 @@ sequence guarantee problem mentioned in the previous paragraph.
         end
         `fill_out
         out_w <= 0;
+
       end else if (`inCBD_full && `out_draining) begin
         if (counter != inCBD_d[(`CODEBAG_SIZE_BITS-1):0]) begin
           cursor  <= cursor + 1;
@@ -214,9 +215,11 @@ sequence guarantee problem mentioned in the previous paragraph.
           counter <= 0;
           dispatching_cbd <= 0;
         end
+
       end else if (!dispatching_cbd && `out_empty && `inAddrRead_full) begin
         `drain_inAddrRead
         `fill_out
+        out_w <= 0;
 
       end else if (!dispatching_cbd && `out_empty && `inAddrWrite_full && `inDataWrite_full) begin
         // timing note: it's okay to drain here because *_d will still