Skip to content

Commit

Permalink
logger: Updated logger
Browse files Browse the repository at this point in the history
- Categorized verbosity levels
- Updated projects and libraries
- Set the default verbosity level none for test_programs

Signed-off-by: Istvan-Zsolt Szekely <[email protected]>
  • Loading branch information
IstvanZsSzekely committed Nov 1, 2024
1 parent 62cf6a9 commit b73cf3c
Show file tree
Hide file tree
Showing 52 changed files with 412 additions and 412 deletions.
8 changes: 4 additions & 4 deletions library/drivers/common/scoreboard.sv
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ package scoreboard_pkg;
this.source_byte_stream.push_front(source_byte);
end
this.source_byte_stream_size += this.source_monitor.mailbox.num();
this.info($sformatf("Source transaction received, size: %d - %d", this.source_monitor.mailbox.num(), this.source_byte_stream_size), ADI_VERBOSITY_DEBUG);
this.info($sformatf("Source transaction received, size: %d - %d", this.source_monitor.mailbox.num(), this.source_byte_stream_size), ADI_VERBOSITY_MEDIUM);
->>source_transaction_event;
this.source_monitor.put_key();
end
Expand Down Expand Up @@ -170,7 +170,7 @@ package scoreboard_pkg;
this.sink_byte_stream.push_front(sink_byte);
end
this.sink_byte_stream_size += this.sink_monitor.mailbox.num();
this.info($sformatf("Sink transaction received, size: %d - %d", this.sink_monitor.mailbox.num(), this.sink_byte_stream_size), ADI_VERBOSITY_DEBUG);
this.info($sformatf("Sink transaction received, size: %d - %d", this.sink_monitor.mailbox.num(), this.sink_byte_stream_size), ADI_VERBOSITY_MEDIUM);
->>sink_transaction_event;
this.sink_monitor.put_key();
end
Expand All @@ -183,7 +183,7 @@ package scoreboard_pkg;
logic [7:0] source_byte;
logic [7:0] sink_byte;

this.info($sformatf("Started"), ADI_VERBOSITY_DEBUG);
this.info($sformatf("Started"), ADI_VERBOSITY_MEDIUM);

forever begin : tx_path
if (this.enabled == 0)
Expand All @@ -198,7 +198,7 @@ package scoreboard_pkg;
this.source_byte_stream_size--;
sink_byte = this.sink_byte_stream.pop_back();
this.sink_byte_stream_size--;
this.info($sformatf("Source-sink data: exp %h - rcv %h", source_byte, sink_byte), ADI_VERBOSITY_DEBUG);
this.info($sformatf("Source-sink data: exp %h - rcv %h", source_byte, sink_byte), ADI_VERBOSITY_MEDIUM);
if (source_byte != sink_byte) begin
this.error($sformatf("Failed at: exp %h - rcv %h", source_byte, sink_byte));
end
Expand Down
2 changes: 1 addition & 1 deletion library/drivers/common/watchdog.sv
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ package watchdog_pkg;
@this.stop_event;
join_any
disable fork;
this.info($sformatf("Watchdog timer reset. %s", this.message), ADI_VERBOSITY_DEBUG);
this.info($sformatf("Watchdog timer reset. %s", this.message), ADI_VERBOSITY_MEDIUM);
end
join_none
endtask: start
Expand Down
4 changes: 2 additions & 2 deletions library/drivers/common/x_monitor.sv
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ package x_monitor_pkg;
this.axi_byte_stream_size++;
end
end
this.info($sformatf("Caught an AXI4 transaction: %d", this.axi_byte_stream_size), ADI_VERBOSITY_DEBUG);
this.info($sformatf("Caught an AXI4 transaction: %d", this.axi_byte_stream_size), ADI_VERBOSITY_MEDIUM);
this.transaction_captured();
#1step;
#1step;
Expand Down Expand Up @@ -214,7 +214,7 @@ package x_monitor_pkg;
if (keep_beat[j+:1] || !this.agent.vif_proxy.C_XIL_AXI4STREAM_SIGNAL_SET[XIL_AXI4STREAM_SIGSET_POS_KEEP])
this.mailbox.put(axi_byte);
end
this.info($sformatf("Caught an AXI4 stream transaction: %d", this.mailbox.num()), ADI_VERBOSITY_DEBUG);
this.info($sformatf("Caught an AXI4 stream transaction: %d", this.mailbox.num()), ADI_VERBOSITY_MEDIUM);
this.transaction_captured();
#1step;
this.mailbox.flush();
Expand Down
36 changes: 18 additions & 18 deletions library/drivers/dmac/dma_trans.sv
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ package dma_trans_pkg;
//
// -----------------
virtual function void print();
`INFO(("--------------------------"), ADI_VERBOSITY_DEBUG);
`INFO(("src_addr is 0x%h",src_addr), ADI_VERBOSITY_DEBUG);
`INFO(("dst_addr is 0x%h",dst_addr), ADI_VERBOSITY_DEBUG);
`INFO(("length is %0d",length), ADI_VERBOSITY_DEBUG);
`INFO(("first is %0d",first), ADI_VERBOSITY_DEBUG);
`INFO(("last is %0d",last), ADI_VERBOSITY_DEBUG);
`INFO(("skip is %0d",skip), ADI_VERBOSITY_DEBUG);
`INFO(("--------------------------"), ADI_VERBOSITY_MEDIUM);
`INFO(("src_addr is 0x%h",src_addr), ADI_VERBOSITY_MEDIUM);
`INFO(("dst_addr is 0x%h",dst_addr), ADI_VERBOSITY_MEDIUM);
`INFO(("length is %0d",length), ADI_VERBOSITY_MEDIUM);
`INFO(("first is %0d",first), ADI_VERBOSITY_MEDIUM);
`INFO(("last is %0d",last), ADI_VERBOSITY_MEDIUM);
`INFO(("skip is %0d",skip), ADI_VERBOSITY_MEDIUM);
endfunction

// -----------------
Expand Down Expand Up @@ -174,7 +174,7 @@ package dma_trans_pkg;
// -----------------
virtual function void print();
super.print();
`INFO(("partial length is %0d", reduced_length), ADI_VERBOSITY_DEBUG);
`INFO(("partial length is %0d", reduced_length), ADI_VERBOSITY_MEDIUM);
endfunction

// length resolution
Expand Down Expand Up @@ -266,9 +266,9 @@ package dma_trans_pkg;
// -----------------
virtual function void print();
super.print();
`INFO(("ylength is %0d", ylength), ADI_VERBOSITY_DEBUG);
`INFO(("src_stride is 0x%0h", src_stride), ADI_VERBOSITY_DEBUG);
`INFO(("dst_stride is 0x%0h", dst_stride), ADI_VERBOSITY_DEBUG);
`INFO(("ylength is %0d", ylength), ADI_VERBOSITY_MEDIUM);
`INFO(("src_stride is 0x%0h", src_stride), ADI_VERBOSITY_MEDIUM);
`INFO(("dst_stride is 0x%0h", dst_stride), ADI_VERBOSITY_MEDIUM);
endfunction

// -----------------
Expand Down Expand Up @@ -348,8 +348,8 @@ package dma_trans_pkg;
// -----------------
virtual function void print();
super.print();
`INFO(("partial_segment_no is %0d", partial_segment_no), ADI_VERBOSITY_DEBUG);
`INFO(("reduced_length is %0d", reduced_length), ADI_VERBOSITY_DEBUG);
`INFO(("partial_segment_no is %0d", partial_segment_no), ADI_VERBOSITY_MEDIUM);
`INFO(("reduced_length is %0d", reduced_length), ADI_VERBOSITY_MEDIUM);
endfunction

// -----------------
Expand All @@ -372,7 +372,7 @@ package dma_trans_pkg;
if (i != ylength-1)
s.last = 0;
sa[i] = s;
`INFO((" generating segment "), ADI_VERBOSITY_DEBUG);
`INFO((" generating segment "), ADI_VERBOSITY_MEDIUM);
s.print();
end else begin
ps = new(p);
Expand All @@ -384,7 +384,7 @@ package dma_trans_pkg;
ps.last = 1;
sa[i] = ps;
skip_segment = 1;
`INFO((" generating partial segment "), ADI_VERBOSITY_DEBUG);
`INFO((" generating partial segment "), ADI_VERBOSITY_MEDIUM);
ps.print();
end
end
Expand Down Expand Up @@ -422,11 +422,11 @@ package dma_trans_pkg;
//
// -----------------
virtual function void print();
`INFO(("transfer S"), ADI_VERBOSITY_DEBUG);
`INFO(("transfer S"), ADI_VERBOSITY_MEDIUM);
for (int i=0; i<group.size(); i++) begin
group[i].print();
end
`INFO(("transfer E"), ADI_VERBOSITY_DEBUG);
`INFO(("transfer E"), ADI_VERBOSITY_MEDIUM);
endfunction

// -----------------
Expand All @@ -435,7 +435,7 @@ package dma_trans_pkg;
function void post_randomize();
dma_segment s;
group = new[size];
`INFO(("groups size %0d",group.size()), ADI_VERBOSITY_DEBUG);
`INFO(("groups size %0d",group.size()), ADI_VERBOSITY_MEDIUM);
for (int i=0;i<size;i++) begin
s = new(p);
if (i != size-1)
Expand Down
24 changes: 12 additions & 12 deletions library/drivers/dmac/dmac_api.sv
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ package dmac_api_pkg;
p.DMA_TYPE_DEST == 0 ? "AXI MemoryMap" : p.DMA_TYPE_DEST == 1 ? "AXI Stream" : p.DMA_TYPE_DEST == 2 ? "FIFO" : "Unknown",
p.DMA_DATA_WIDTH_DEST,
p.DMA_TYPE_SRC == 0 ? "AXI MemoryMap" : p.DMA_TYPE_SRC == 1 ? "AXI Stream" : p.DMA_TYPE_SRC == 2 ? "FIFO" : "Unknown",
p.DMA_DATA_WIDTH_SRC), ADI_VERBOSITY_DEBUG);
this.info($sformatf("Found %0d max bytes per burst" , p.MAX_BYTES_PER_BURST), ADI_VERBOSITY_DEBUG);
this.info($sformatf("Transfer length alignment requirement: %0d bytes" , p.DMA_LENGTH_ALIGN), ADI_VERBOSITY_DEBUG);
this.info($sformatf("Enabled support for 2D transfers: %0d" , p.DMA_2D_TRANSFER), ADI_VERBOSITY_DEBUG);
p.DMA_DATA_WIDTH_SRC), ADI_VERBOSITY_MEDIUM);
this.info($sformatf("Found %0d max bytes per burst" , p.MAX_BYTES_PER_BURST), ADI_VERBOSITY_MEDIUM);
this.info($sformatf("Transfer length alignment requirement: %0d bytes" , p.DMA_LENGTH_ALIGN), ADI_VERBOSITY_MEDIUM);
this.info($sformatf("Enabled support for 2D transfers: %0d" , p.DMA_2D_TRANSFER), ADI_VERBOSITY_MEDIUM);
endtask : probe

// -----------------
Expand Down Expand Up @@ -157,7 +157,7 @@ package dmac_api_pkg;
do
this.axi_read(GetAddrs(DMAC_TRANSFER_SUBMIT), regData);
while (`GET_DMAC_TRANSFER_SUBMIT_TRANSFER_SUBMIT(regData) != 0);
this.info($sformatf("Ready for submission "), ADI_VERBOSITY_DEBUG);
this.info($sformatf("Ready for submission "), ADI_VERBOSITY_MEDIUM);
end
begin
#2ms;
Expand All @@ -175,7 +175,7 @@ package dmac_api_pkg;
task transfer_start;
this.axi_write(GetAddrs(DMAC_TRANSFER_SUBMIT),
`SET_DMAC_TRANSFER_SUBMIT_TRANSFER_SUBMIT(1));
this.info($sformatf("Transfer start"), ADI_VERBOSITY_DEBUG);
this.info($sformatf("Transfer start"), ADI_VERBOSITY_MEDIUM);
endtask : transfer_start

// -----------------
Expand Down Expand Up @@ -225,7 +225,7 @@ package dmac_api_pkg;
while (~regData[transfer_id]) begin
this.axi_read(GetAddrs(DMAC_TRANSFER_DONE), regData);
end
this.info($sformatf("Transfer id %0d DONE",transfer_id), ADI_VERBOSITY_DEBUG);
this.info($sformatf("Transfer id %0d DONE",transfer_id), ADI_VERBOSITY_MEDIUM);

partial_info_available = `GET_DMAC_TRANSFER_DONE_PARTIAL_TRANSFER_DONE(regData);

Expand All @@ -234,14 +234,14 @@ package dmac_api_pkg;
this.error($sformatf("Partial transfer info availability not set for ID %0d", transfer_id));
end

this.info($sformatf("Found partial data info for ID %0d",transfer_id), ADI_VERBOSITY_DEBUG);
this.info($sformatf("Found partial data info for ID %0d",transfer_id), ADI_VERBOSITY_MEDIUM);
this.axi_read(GetAddrs(DMAC_PARTIAL_TRANSFER_LENGTH), regData);
segment_length_found = `GET_DMAC_PARTIAL_TRANSFER_LENGTH_PARTIAL_LENGTH(regData);
if (segment_length_found != segment_length) begin
this.error($sformatf("Partial transfer length does not match Expected %0d Found %0d",
segment_length, segment_length_found));
end else begin
this.info($sformatf("Found partial data info length is %0d",segment_length), ADI_VERBOSITY_DEBUG);
this.info($sformatf("Found partial data info length is %0d",segment_length), ADI_VERBOSITY_MEDIUM);
end
this.axi_read(GetAddrs(DMAC_PARTIAL_TRANSFER_ID), regData);
id_found = `GET_DMAC_PARTIAL_TRANSFER_ID_PARTIAL_TRANSFER_ID(regData);
Expand Down Expand Up @@ -270,7 +270,7 @@ package dmac_api_pkg;
// -----------------
task transfer_id_get(output bit [3:0] transfer_id);
this.axi_read(GetAddrs(DMAC_TRANSFER_ID), transfer_id);
this.info($sformatf("Found transfer ID = %0d", transfer_id), ADI_VERBOSITY_DEBUG);
this.info($sformatf("Found transfer ID = %0d", transfer_id), ADI_VERBOSITY_MEDIUM);
endtask : transfer_id_get

// -----------------
Expand All @@ -282,9 +282,9 @@ package dmac_api_pkg;
dma_2d_segment t_2d;

wait_transfer_submission();
this.info($sformatf(" Submitting up a segment of : "), ADI_VERBOSITY_DEBUG);
this.info($sformatf(" Submitting up a segment of : "), ADI_VERBOSITY_MEDIUM);
t.print();
this.info($sformatf(" --------------------------"), ADI_VERBOSITY_DEBUG);
this.info($sformatf(" --------------------------"), ADI_VERBOSITY_MEDIUM);

if (t.length % p.DMA_LENGTH_ALIGN > 0) begin
this.error($sformatf("Transfer length (%0d) must be multiple of largest interface (%0d)", t.length, p.DMA_LENGTH_ALIGN));
Expand Down
50 changes: 25 additions & 25 deletions library/drivers/jesd/adi_jesd204_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -124,22 +124,22 @@ package adi_jesd204_pkg;
//
// -----------------
virtual function void print();
`INFO(("--------------------------"), ADI_VERBOSITY_DEBUG);
`INFO(("--Link parameters---------"), ADI_VERBOSITY_DEBUG);
`INFO(("--------------------------"), ADI_VERBOSITY_DEBUG);
`INFO(("L is %0d", L), ADI_VERBOSITY_DEBUG);
`INFO(("M is %0d", M), ADI_VERBOSITY_DEBUG);
`INFO(("F is %0d", F), ADI_VERBOSITY_DEBUG);
`INFO(("S is %0d", S), ADI_VERBOSITY_DEBUG);
`INFO(("K is %0d", K), ADI_VERBOSITY_DEBUG);
`INFO(("E is %0d", E), ADI_VERBOSITY_DEBUG);
`INFO(("N is %0d", N), ADI_VERBOSITY_DEBUG);
`INFO(("N' is %0d", NP), ADI_VERBOSITY_DEBUG);
`INFO(("CS is %0d", CS), ADI_VERBOSITY_DEBUG);
`INFO(("HD is %0d", HD), ADI_VERBOSITY_DEBUG);
`INFO(("SCR is %0d", SCR), ADI_VERBOSITY_DEBUG);
`INFO(("SUBCLASSV is %0d", SUBCLASSV), ADI_VERBOSITY_DEBUG);
`INFO(("ENCODING is %s", encoding_s[encoding]), ADI_VERBOSITY_DEBUG);
`INFO(("--------------------------"), ADI_VERBOSITY_MEDIUM);
`INFO(("--Link parameters---------"), ADI_VERBOSITY_MEDIUM);
`INFO(("--------------------------"), ADI_VERBOSITY_MEDIUM);
`INFO(("L is %0d", L), ADI_VERBOSITY_MEDIUM);
`INFO(("M is %0d", M), ADI_VERBOSITY_MEDIUM);
`INFO(("F is %0d", F), ADI_VERBOSITY_MEDIUM);
`INFO(("S is %0d", S), ADI_VERBOSITY_MEDIUM);
`INFO(("K is %0d", K), ADI_VERBOSITY_MEDIUM);
`INFO(("E is %0d", E), ADI_VERBOSITY_MEDIUM);
`INFO(("N is %0d", N), ADI_VERBOSITY_MEDIUM);
`INFO(("N' is %0d", NP), ADI_VERBOSITY_MEDIUM);
`INFO(("CS is %0d", CS), ADI_VERBOSITY_MEDIUM);
`INFO(("HD is %0d", HD), ADI_VERBOSITY_MEDIUM);
`INFO(("SCR is %0d", SCR), ADI_VERBOSITY_MEDIUM);
`INFO(("SUBCLASSV is %0d", SUBCLASSV), ADI_VERBOSITY_MEDIUM);
`INFO(("ENCODING is %s", encoding_s[encoding]), ADI_VERBOSITY_MEDIUM);
endfunction

// -----------------
Expand Down Expand Up @@ -411,15 +411,15 @@ package adi_jesd204_pkg;
bit [31:0] val;
this.bus.RegRead32(this.base_address + GetAddrs(JESD_RX_LINK_STATUS), val);
if (link.encoding == enc8b10b) begin
this.info($sformatf("Link status : %s", rx_link_states_8b10b[`GET_JESD_RX_LINK_STATUS_STATUS_STATE(val)]), ADI_VERBOSITY_DEBUG);
this.info($sformatf("Link status : %s", rx_link_states_8b10b[`GET_JESD_RX_LINK_STATUS_STATUS_STATE(val)]), ADI_VERBOSITY_MEDIUM);
end else begin
this.info($sformatf("Link status : %s", rx_link_states_64b66b[`GET_JESD_RX_LINK_STATUS_STATUS_STATE(val)]), ADI_VERBOSITY_DEBUG);
this.info($sformatf("Link status : %s", rx_link_states_64b66b[`GET_JESD_RX_LINK_STATUS_STATUS_STATE(val)]), ADI_VERBOSITY_MEDIUM);
end

// Check SYSREF alignment ERROR
this.bus.RegRead32(this.base_address + GetAddrs(JESD_RX_SYSREF_STATUS), val);
this.info($sformatf("SYSREF captured : %s", `GET_JESD_RX_SYSREF_STATUS_SYSREF_DETECTED(val) ? "Yes" : "No"), ADI_VERBOSITY_DEBUG);
this.info($sformatf("SYSREF alignment error : %s", `GET_JESD_RX_SYSREF_STATUS_SYSREF_ALIGNMENT_ERROR(val) ? "Yes" : "No"), ADI_VERBOSITY_DEBUG);
this.info($sformatf("SYSREF captured : %s", `GET_JESD_RX_SYSREF_STATUS_SYSREF_DETECTED(val) ? "Yes" : "No"), ADI_VERBOSITY_MEDIUM);
this.info($sformatf("SYSREF alignment error : %s", `GET_JESD_RX_SYSREF_STATUS_SYSREF_ALIGNMENT_ERROR(val) ? "Yes" : "No"), ADI_VERBOSITY_MEDIUM);

endtask : link_status_print

Expand Down Expand Up @@ -551,16 +551,16 @@ package adi_jesd204_pkg;
// There is no SYNC signal in 64b66b
this.bus.RegRead32(this.base_address + GetAddrs(JESD_TX_LINK_STATUS), val);
if (link.encoding == enc8b10b) begin
this.info($sformatf("Link status : %s", tx_link_states_8b10b[`GET_JESD_TX_LINK_STATUS_STATUS_STATE(val)]), ADI_VERBOSITY_DEBUG);
this.info($sformatf("SYNC~ : %s", `SET_JESD_TX_LINK_STATUS_STATUS_SYNC(val) ? "deasserted" : "asserted"), ADI_VERBOSITY_DEBUG);
this.info($sformatf("Link status : %s", tx_link_states_8b10b[`GET_JESD_TX_LINK_STATUS_STATUS_STATE(val)]), ADI_VERBOSITY_MEDIUM);
this.info($sformatf("SYNC~ : %s", `SET_JESD_TX_LINK_STATUS_STATUS_SYNC(val) ? "deasserted" : "asserted"), ADI_VERBOSITY_MEDIUM);
end else begin
this.info($sformatf("Link status %s", tx_link_states_64b66b[`GET_JESD_TX_LINK_STATUS_STATUS_STATE(val)]), ADI_VERBOSITY_DEBUG);
this.info($sformatf("Link status %s", tx_link_states_64b66b[`GET_JESD_TX_LINK_STATUS_STATUS_STATE(val)]), ADI_VERBOSITY_MEDIUM);
end

// Check SYSREF alignment ERROR
this.bus.RegRead32(this.base_address + GetAddrs(JESD_TX_SYSREF_STATUS), val);
this.info($sformatf("SYSREF captured : %s", `GET_JESD_TX_SYSREF_STATUS_SYSREF_DETECTED(val) ? "Yes" : "No"), ADI_VERBOSITY_DEBUG);
this.info($sformatf("SYSREF alignment error : %s", `GET_JESD_TX_SYSREF_STATUS_SYSREF_ALIGNMENT_ERROR(val) ? "Yes" : "No"), ADI_VERBOSITY_DEBUG);
this.info($sformatf("SYSREF captured : %s", `GET_JESD_TX_SYSREF_STATUS_SYSREF_DETECTED(val) ? "Yes" : "No"), ADI_VERBOSITY_MEDIUM);
this.info($sformatf("SYSREF alignment error : %s", `GET_JESD_TX_SYSREF_STATUS_SYSREF_ALIGNMENT_ERROR(val) ? "Yes" : "No"), ADI_VERBOSITY_MEDIUM);

endtask : link_status_print

Expand Down
Loading

0 comments on commit b73cf3c

Please sign in to comment.