MatchLib
Macros

debug print statements More...

Macros

#define DCOUT(x)   cout << x
 
#define CDCOUT(x, y)
 

Detailed Description

debug print statements

Macro Definition Documentation

◆ DCOUT

#define DCOUT (   x)    cout << x

Debug print statements to print x. It is enabled in SystemC/C++ simulation but disabled in HLS as they are non-synthesizable.

A Simple Example
#include <hls_globals.h>
...
DCOUT("Starting SystemC simulation\n"); // Always prints in SystemC/C++ simulation

Definition at line 72 of file hls_globals.h.

◆ CDCOUT

#define CDCOUT (   x,
 
)
Value:
{ \
CTC_SKIP_CDCOUT \
if (DEBUG_LEVEL >= y) cout << x; \
CTC_ENDSKIP_CDCOUT }

Debug print statements to print x if DEBUG_LEVEL set during compilation is greater than or equal to y. This is useful is we want to limit print statements during debugging. It is also enabled in SystemC/C++ simulation but disabled in HLS as they are non-synthesizable.

A Simple Example
#include <hls_globals.h>
...
CDCOUT("Starting SystemC simulation with debug level:" << y << endl); // Prints if DEBUG_LEVEL >= y

Definition at line 73 of file hls_globals.h.