remove macros include from Debug.ship
[fleet.git] / ships / Debug.ship
1 ship: Debug
2
3 == Ports ===========================================================
4 data  in:   in
5
6 == Constants ========================================================
7
8 == TeX ==============================================================
9
10 This ship is used for debugging.  It has only one port, {\tt in}.
11 Programmers should send debug report values to this port.  How such
12 values are reported back to the programmer doing the debugging is left
13 unspecified.
14
15 \subsection*{To Do}
16
17 Provide an {\tt inOp} port and use opcode ports \cite{am25} to
18 effectively allow multiple independent ``debug streams''
19
20 Provide a way to programmatically read back the output of the debug
21 ship.
22
23 == Fleeterpreter ====================================================
24 public void service() {
25   if (box_in.dataReadyForShip())
26     ((Interpreter)getFleet()).debug(box_in.removeDataForShip());
27 }
28
29 == FleetSim ==============================================================
30
31 == FPGA ==============================================================
32
33 module debug (clk, rst,
34               data_debug_data_r, data_debug_data_a, data_debug_data,
35               data_debug_out_r, data_debug_out_a, data_debug_out );
36   input clk;
37   input rst;
38
39   input  data_debug_data_r;
40   output data_debug_data_a;
41   input  [`DATAWIDTH:0] data_debug_data;
42
43   output  data_debug_out_r;
44   input   data_debug_out_a;
45   output  [`DATAWIDTH:0] data_debug_out;
46
47   assign  data_debug_out_r  = data_debug_data_r;
48   assign  data_debug_data_a = data_debug_out_a;
49   assign  data_debug_out    = data_debug_data;
50
51 endmodule
52
53 == Test ================================================================
54 #expect 25
55
56 #ship debug : Debug
57
58 debug.in:
59   literal 25;
60   deliver;
61
62 == Contributors =========================================================
63 Adam Megacz <megacz@cs.berkeley.edu>