aboutsummaryrefslogtreecommitdiff
path: root/include/messages.vh
blob: 83ab6a4333d0291043b4b809b157e2094f313f7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
`ifndef MESSAGES_VH
 `define MESSAGES_VH 1

 `define MSG(msg) \
     if (1) begin \
	$write("[%0t] ", $time); \
        $display msg; \
     end else

 `ifdef DEBUG
  `define DBG(msg) `MSG(msg)
 `else
  `define DBG(msg) if (1)  begin end else
 `endif

`endif

// Use like this: DBG(("Wishbone master: a = %x, b = %x", a, b))