From 2e92ee9a728acaecf6c2fd2efdee3bd2377c0f91 Mon Sep 17 00:00:00 2001 From: Damien Pretet Date: Thu, 27 Jun 2024 10:51:25 +0200 Subject: [PATCH] New: Add line number and file calling a display macro --- svut/svut_h.sv | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/svut/svut_h.sv b/svut/svut_h.sv index 313acb4..559d633 100644 --- a/svut/svut_h.sv +++ b/svut/svut_h.sv @@ -54,29 +54,29 @@ /// and information with an appropriate color. `define MSG(msg) \ - $display("\033[0;37m%s (L%0d @ %0t)\033[0m", msg, `__LINE__, $realtime) + $display("\033[0;37m%s (@ %0t) (L%0d %s)\033[0m", msg, $realtime, `__LINE__, `__FILE__) `define INFO(msg) \ - $display("\033[0;34mINFO: %s (L%0d @ %0t)\033[0m", msg, `__LINE__, $realtime) + $display("\033[0;34mINFO: %s (@ %0t) (L%0d %s)\033[0m", msg, $realtime, `__LINE__, `__FILE__) `define SUCCESS(msg) \ - $display("\033[0;32mSUCCESS: %s (L%0d @ %0t)\033[0m", msg, `__LINE__, $realtime) + $display("\033[0;32mSUCCESS: %s (@ %0t) (L%0d %s)\033[0m", msg, $realtime, `__LINE__, `__FILE__) `define WARNING(msg) \ begin\ - $display("\033[1;33mWARNING: %s (L%0d @ %0t)\033[0m", msg, `__LINE__, $realtime);\ + $display("\033[1;33mWARNING: %s (@ %0t) (L%0d %s)\033[0m", msg, $realtime, `__LINE__, `__FILE__);\ svut_warning += 1;\ end `define CRITICAL(msg) \ begin\ - $display("\033[1;35mCRITICAL: %s (L%0d @ %0t)\033[0m", msg, `__LINE__, $realtime);\ + $display("\033[1;35mCRITICAL: %s (@ %0t) (L%0d %s)\033[0m", msg, $realtime, `__LINE__, `__FILE__);\ svut_critical += 1;\ end `define ERROR(msg)\ begin\ - $display("\033[1;31mERROR: %s (L%0d @ %0t)\033[0m", msg, `__LINE__, $realtime);\ + $display("\033[1;31mERROR: %s (@ %0t) (L%0d %s)\033[0m", msg, $realtime, `__LINE__, `__FILE__);\ svut_error += 1;\ end