X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ships%2FDebug.ship;h=c3ea67d78798c1dd41d3b6b781a239a3f8fc8d5e;hb=385617cefcb2b4442b7316bd3e8cdf658ce43c99;hp=842059c125364f3de6c40a69279ee4a223b9d301;hpb=546aa1df21781684fc2407504d41b58b1e887dd4;p=fleet.git diff --git a/ships/Debug.ship b/ships/Debug.ship index 842059c..c3ea67d 100644 --- a/ships/Debug.ship +++ b/ships/Debug.ship @@ -7,34 +7,49 @@ data in: in == TeX ============================================================== +This ship is used for debugging. It has only one port, {\tt in}. +Programmers should send debug report values to this port. How such +values are reported back to the programmer doing the debugging is left +unspecified. + +\subsection*{To Do} + +Provide an {\tt inOp} port and use opcode ports \cite{am25} to +effectively allow multiple independent ``debug streams'' + +Provide a way to programmatically read back the output of the debug +ship. + == Fleeterpreter ==================================================== public void service() { if (box_in.dataReadyForShip()) ((Interpreter)getFleet()).debug(box_in.removeDataForShip()); } -== ArchSim ============================================================== +== FleetSim ============================================================== == FPGA ============================================================== -`include "macros.v" -module debug (clk, data_debug_data_r, data_debug_data_a, data_debug_data, - data_debug_out_r, data_debug_out_a, data_debug_out ); - input clk; + assign out_d_ = in_d; + assign out_r_ = in_r; - input data_debug_data_r; - output data_debug_data_a; - input [`DATAWIDTH:0] data_debug_data; + always @(posedge clk) begin + if (!rst) begin + `reset + end else begin + `flush + in_a <= out_a; + end + end - output data_debug_out_r; - input data_debug_out_a; - output [`DATAWIDTH:0] data_debug_out; +== Test ================================================================ +#expect 25 - assign data_debug_out_r = data_debug_data_r; - assign data_debug_data_a = data_debug_out_a; - assign data_debug_out = data_debug_data; +#ship debug : Debug -endmodule +debug.in: + set word= 25; + deliver; == Contributors ========================================================= Adam Megacz