summaryrefslogtreecommitdiff
path: root/nios2sim-ng.h
diff options
context:
space:
mode:
Diffstat (limited to 'nios2sim-ng.h')
-rw-r--r--nios2sim-ng.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/nios2sim-ng.h b/nios2sim-ng.h
index 7a3d711..6b45405 100644
--- a/nios2sim-ng.h
+++ b/nios2sim-ng.h
@@ -7,15 +7,20 @@
#include <stdlib.h>
#include <stdint.h>
+#include <stdbool.h>
#include "compiler.h"
+extern bool verbose;
+
#define __round_mask(x, y) ((__typeof__(x))((y) - 1))
#define round_up(x, y) ((((x) - 1) | __round_mask(x, y)) + 1)
#define err(fmt, args...) fprintf(stderr, "Error: " fmt, ##args)
#define warn(fmt, args...) fprintf(stderr, "Warning: " fmt, ##args)
#define info(fmt, args...) fprintf(stdout, fmt, ##args)
+#define vinfo(fmt, args...) \
+ do { if (verbose) fprintf(stdout, fmt, ##args); } while (0)
#ifdef DEBUG
# define dbg(fmt, args...) fprintf(stdout, fmt, ##args)
#else