Skip to content

Commit

Permalink
Merge pull request #27 from leibnewton/master
Browse files Browse the repository at this point in the history
concat filename and line number with colon for better redirection
  • Loading branch information
dpretet authored Jun 27, 2024
2 parents 00b733b + 98173a0 commit 0496633
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions svut/svut_h.sv
Original file line number Diff line number Diff line change
Expand Up @@ -54,29 +54,29 @@
/// and information with an appropriate color.

`define MSG(msg) \
$display("\033[0;37m%s (@ %0t) (L%0d %s)\033[0m", msg, $realtime, `__LINE__, `__FILE__)
$display("\033[0;37m%s (@ %0t) (%s:%0d)\033[0m", msg, $realtime, `__FILE__, `__LINE__)

`define INFO(msg) \
$display("\033[0;34mINFO: %s (@ %0t) (L%0d %s)\033[0m", msg, $realtime, `__LINE__, `__FILE__)
$display("\033[0;34mINFO: %s (@ %0t) (%s:%0d)\033[0m", msg, $realtime, `__FILE__, `__LINE__)

`define SUCCESS(msg) \
$display("\033[0;32mSUCCESS: %s (@ %0t) (L%0d %s)\033[0m", msg, $realtime, `__LINE__, `__FILE__)
$display("\033[0;32mSUCCESS: %s (@ %0t) (%s:%0d)\033[0m", msg, $realtime, `__FILE__, `__LINE__)

`define WARNING(msg) \
begin\
$display("\033[1;33mWARNING: %s (@ %0t) (L%0d %s)\033[0m", msg, $realtime, `__LINE__, `__FILE__);\
$display("\033[1;33mWARNING: %s (@ %0t) (%s:%0d)\033[0m", msg, $realtime, `__FILE__, `__LINE__);\
svut_warning += 1;\
end

`define CRITICAL(msg) \
begin\
$display("\033[1;35mCRITICAL: %s (@ %0t) (L%0d %s)\033[0m", msg, $realtime, `__LINE__, `__FILE__);\
$display("\033[1;35mCRITICAL: %s (@ %0t) (%s:%0d)\033[0m", msg, $realtime, `__FILE__, `__LINE__);\
svut_critical += 1;\
end

`define ERROR(msg)\
begin\
$display("\033[1;31mERROR: %s (@ %0t) (L%0d %s)\033[0m", msg, $realtime, `__LINE__, `__FILE__);\
$display("\033[1;31mERROR: %s (@ %0t) (%s:%0d)\033[0m", msg, $realtime, `__FILE__, `__LINE__);\
svut_error += 1;\
end

Expand Down

0 comments on commit 0496633

Please sign in to comment.