checkpoint
authoradam <adam@megacz.com>
Tue, 21 Aug 2007 00:28:28 +0000 (01:28 +0100)
committeradam <adam@megacz.com>
Tue, 21 Aug 2007 00:28:28 +0000 (01:28 +0100)
src/edu/berkeley/fleet/fpga/Generator.java
src/edu/berkeley/fleet/ies44/InstructionEncoder.java

index 95593d9..5036f9c 100644 (file)
@@ -529,9 +529,9 @@ public class Generator {
         Module.SinkPort   ififo_in      = ififo.getInputPort("in");
         Module.SourcePort ififo_out     = ififo.getOutputPort("out");
 
-        Value instruction_count_ondeck        = ondeck  .getBits(1+WIDTH_DEST_ADDR+WIDTH_COUNT-1, 1+WIDTH_DEST_ADDR);
-        Value instruction_count_instr         = instr   .getBits(1+WIDTH_DEST_ADDR+WIDTH_COUNT-1, 1+WIDTH_DEST_ADDR);
-        Assignable instruction_count_ififo_in = ififo_in.getAssignableBits(1+WIDTH_DEST_ADDR+WIDTH_COUNT-1, 1+WIDTH_DEST_ADDR);
+        Value instruction_count_ondeck        = ondeck  .getBits(OFFSET_COUNT+WIDTH_COUNT-1, OFFSET_COUNT);
+        Value instruction_count_instr         = instr   .getBits(OFFSET_COUNT+WIDTH_COUNT-1, OFFSET_COUNT);
+        Assignable instruction_count_ififo_in = ififo_in.getAssignableBits(OFFSET_COUNT+WIDTH_COUNT-1, OFFSET_COUNT);
 
         // Clog (must be first)
         box.new Event(
index 5d1e3b3..0d02f15 100644 (file)
@@ -12,8 +12,7 @@ public abstract class InstructionEncoder {
     public static final int WIDTH_DEST_ADDR     = 11;
     public static final int WIDTH_COUNT         = 7;
 
-    public static final int OFFSET_RQ           = 0;
-    public static final int OFFSET_DEST         = 1;
+    public static final int OFFSET_DEST         = 0;
     public static final int OFFSET_COUNT        = OFFSET_DEST+WIDTH_DEST_ADDR;
     public static final int OFFSET_CONTROL      = OFFSET_COUNT+WIDTH_COUNT;
     public static final int OFFSET_TI           = OFFSET_CONTROL+0;
@@ -21,6 +20,7 @@ public abstract class InstructionEncoder {
     public static final int OFFSET_DL           = OFFSET_CONTROL+2;
     public static final int OFFSET_DO           = OFFSET_CONTROL+3;
     public static final int OFFSET_TO           = OFFSET_CONTROL+4;
+    public static final int OFFSET_RQ           = OFFSET_CONTROL+5;
     public static final int OFFSET_PUMP_ADDR    = 24;
 
     /** get the bits describing this box's location on the DESTINATION HORN */