Skip to content

Commit

Permalink
logger: Requested changes
Browse files Browse the repository at this point in the history
Signed-off-by: Istvan-Zsolt Szekely <istvan.szekely@analog.com>
  • Loading branch information
IstvanZsSzekely committed Nov 20, 2024
1 parent fa8aa78 commit 6de3537
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 22 deletions.
8 changes: 4 additions & 4 deletions library/utilities/logger_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,19 @@ package logger_pkg;
input string message,
input adi_verbosity_t verbosity);

`INFO(("[%s] %s", this.get_path(), message), verbosity);
PrintInfo($sformatf("[%s] %s", this.get_path(), message), verbosity);
endfunction: info

function void warning(input string message);
`WARNING(("[%s] %s", this.get_path(), message));
PrintWarning($sformatf("[%s] %s", this.get_path(), message));
endfunction: warning

function void error(input string message);
`ERROR(("[%s] %s", this.get_path(), message));
PrintError($sformatf("[%s] %s", this.get_path(), message));
endfunction: error

function void fatal(input string message);
`FATAL(("[%s] %s", this.get_path(), message));
PrintFatal($sformatf("[%s] %s", this.get_path(), message));
endfunction: fatal
endclass: adi_reporter

Expand Down
15 changes: 0 additions & 15 deletions library/utilities/utils.svh
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,6 @@
`define AXIS 1
`define FIFO 2

`define RELATIVE_PATH(src) {"../../../../../../", src}

// Macros used in Simulation files during simulation
`define INFO(m,v) \
PrintInfo($sformatf("%s", \
Expand All @@ -206,19 +204,6 @@
PrintFatal($sformatf("%s\n found in %s:%0d", \
$sformatf m , `__FILE__, `__LINE__))

// Macros used in VIPs during elaboration
`define INFOV(m) \
$display("[INFO] @ %s", $sformatf m)

`define WARNINGV(m) \
$warning("[WARNING] @ %s", $sformatf m)

`define ERRORV(m) \
$error("[ERROR] @ %s", $sformatf m)

`define FATALV(m) \
$fatal("[FATAL] @ %s", $sformatf m)

`define MAX(a,b) ((a > b) ? a : b)
`define MIN(a,b) ((a > b) ? b : a)

Expand Down
2 changes: 1 addition & 1 deletion library/vip/adi/spi_vip/adi_spi_vip.sv
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ module adi_spi_vip #(
initial begin : ASSERT_PARAMETERS
assert (MODE == MODE_SLAVE)
else begin
`ERRORV(("Unsupported mode %s. Valid values are 0=SLAVE, 1=MASTER, 2=MONITOR. Only 0(SLAVE) is currently supported.", MODE));
$error("Unsupported mode %s. Valid values are 0=SLAVE, 1=MASTER, 2=MONITOR. Only 0(SLAVE) is currently supported.", MODE);
end
end : ASSERT_PARAMETERS

Expand Down
4 changes: 2 additions & 2 deletions library/vip/adi/spi_vip/spi_vip_if.sv
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ interface spi_vip_if #(
intf_slave_mode = 0;
intf_master_mode = 1;
intf_monitor_mode = 0;
`ERRORV(("Unsupported mode master")); //TODO
$error("Unsupported mode master"); //TODO
endfunction : set_master_mode

function void set_monitor_mode();
intf_slave_mode = 0;
intf_master_mode = 0;
intf_monitor_mode = 1;
`ERRORV(("Unsupported mode monitor")); //TODO
$error("Unsupported mode monitor"); //TODO
endfunction : set_monitor_mode

endinterface

0 comments on commit 6de3537

Please sign in to comment.