remove last vestiges of old literal system
[fleet.git] / ships / Memory.ship
index 39110c8..7eb60c3 100644 (file)
@@ -153,8 +153,6 @@ module memory (clk,
   `input(stride_r,       stride_a,      stride_a_,      [(`DATAWIDTH-1):0],         stride_d)
   `input(count_r,        count_a,       count_a_,       [(`DATAWIDTH-1):0],         count_d)
   `output(out_r,         out_r_,        out_a,          [(`DATAWIDTH-1):0],         out_d_)
-  //`defreg(out_d_,                                     [(`DATAWIDTH-1):0],         out_d)
-
   `input(preload_r,      preload_a,     preload_a_,     [(`DATAWIDTH-1):0],         preload_d)
   `input(cbd_r,          cbd_a,         cbd_a_,         [(`DATAWIDTH-1):0],         cbd_d)
   `output(ihorn_r,       ihorn_r_,      ihorn_a,        [(`PACKET_WIDTH-1):0], ihorn_d_)
@@ -250,33 +248,10 @@ module memory (clk,
     end else if (command_valid) begin
       command_valid <= 0;
       command = ramread;
-      case (command[(`INSTRUCTION_WIDTH-1):(`INSTRUCTION_WIDTH-2)])
-        0: begin
-            ihorn_full  <= 1;
-            `packet_data(ihorn_d) <= `instruction_data(command);
-            `packet_dest(ihorn_d) <= `instruction_dest(command);
-           end
-        1: begin
-            dhorn_full  <= 1;
-            temp    = command[(`INSTRUCTION_WIDTH-(2+`DESTINATION_ADDRESS_BITS)):0];
-            temp    = temp + ( { current_instruction_read_from, {(`CODEBAG_SIZE_BITS){1'b0}} });
-            data[(`DATAWIDTH-1):(`CODEBAG_SIZE_BITS)] = temp;
-            data[(`CODEBAG_SIZE_BITS-1):0]            = command[(`CODEBAG_SIZE_BITS-1):0];
-            `packet_data(dhorn_d) <= temp;
-            `packet_dest(dhorn_d) <=
-                  command[(`INSTRUCTION_WIDTH-3):(`INSTRUCTION_WIDTH-(3+`DESTINATION_ADDRESS_BITS)+1)];
-           end
-        2: begin
-            dhorn_full            <= 1;
-            `packet_data(dhorn_d) <= { {(`DATAWIDTH-24){command[23]}}, command[23:0] };
-            `packet_dest(dhorn_d) <= command[34:24];
-           end
-        3: begin
-            dhorn_full            <= 1;
-            `packet_data(dhorn_d) <= { {(`DATAWIDTH-24){command[23]}}, command[23:0] } + current_instruction_read_from;
-            `packet_dest(dhorn_d) <= command[34:24];
-           end
-      endcase
+      ihorn_full  <= 1;
+        `packet_data(ihorn_d) <= `instruction_data(command);
+        `packet_dest(ihorn_d) <= `instruction_dest(command);
+      end
 
     end else if (cbd_pos < cbd_size) begin
       current_instruction_read_from <= cbd_base+cbd_pos;
@@ -332,19 +307,15 @@ endmodule
 // instructions not in any codebag are part of the "root codebag"
 // which is dispatched when the code is loaded
 
-BOB:              sendto memory.inCBD;
-memory.inCBD:     [*] take, deliver;
-debug.in:         [*] take, deliver;
-
-
-// This codebag illustrates how to do a loop.  Notice that this
-// is actually an uncontrolled data emitter -- it could clog the
-//  switch fabric!
+memory.inCBD:
+  literal BOB;
+  deliver;
 
 BOB: {
-  12:           sendto debug.in;
-  13:           sendto debug.in;
-  14:           sendto debug.in;
+  debug.in:
+    literal 12; deliver;
+    literal 13; deliver;
+    literal 14; deliver;
 }