[i2c,dv] Update uvm_info in various *vseq and remove redundant constraints in i2c_sanity
Signed-off-by: Tung Hoang <hoang.tung@wdc.com>
diff --git a/hw/dv/sv/i2c_agent/i2c_driver.sv b/hw/dv/sv/i2c_agent/i2c_driver.sv
index f445fd2..76d430f 100644
--- a/hw/dv/sv/i2c_agent/i2c_driver.sv
+++ b/hw/dv/sv/i2c_agent/i2c_driver.sv
@@ -8,12 +8,12 @@
`uvm_component_new
virtual task reset_signals();
- `uvm_info(`gfn, "driver in reset progress", UVM_HIGH)
+ `uvm_info(`gfn, "\ndriver in reset progress", UVM_HIGH)
@(negedge cfg.vif.rst_ni);
cfg.vif.scl_o <= 1'b1;
cfg.vif.sda_o <= 1'b1;
@(posedge cfg.vif.rst_ni);
- `uvm_info(`gfn, "driver out of reset", UVM_HIGH)
+ `uvm_info(`gfn, "\ndriver out of reset", UVM_HIGH)
endtask : reset_signals
endclass : i2c_driver
diff --git a/hw/dv/sv/i2c_agent/i2c_monitor.sv b/hw/dv/sv/i2c_agent/i2c_monitor.sv
index 0a61fd0..2d0d198 100644
--- a/hw/dv/sv/i2c_agent/i2c_monitor.sv
+++ b/hw/dv/sv/i2c_agent/i2c_monitor.sv
@@ -45,7 +45,7 @@
if (cfg.en_monitor == 1'b1) begin
if (mon_dut_item.stop || (!mon_dut_item.stop && !mon_dut_item.start && !mon_dut_item.rstart)) begin
cfg.vif.wait_for_host_start(cfg.timing_cfg);
- `uvm_info(`gfn, $sformatf("monitor, detect HOST START"), UVM_DEBUG)
+ `uvm_info(`gfn, $sformatf("\nmonitor, detect HOST START"), UVM_DEBUG)
end else begin
mon_dut_item.rstart = 1'b1;
end
@@ -86,7 +86,7 @@
`downcast(clone_item, mon_dut_item.clone());
mon_item_port.write(clone_item);
cfg.vif.wait_for_device_ack(cfg.timing_cfg);
- `uvm_info(`gfn, $sformatf("monitor, address, detect TARGET ACK"), UVM_DEBUG)
+ `uvm_info(`gfn, $sformatf("\nmonitor, address, detect TARGET ACK"), UVM_DEBUG)
endtask : address_thread
virtual protected task read_thread(i2c_item mon_dut_item);
@@ -108,7 +108,7 @@
// sample read data
for (int i = 7; i >= 0; i--) begin
cfg.vif.get_bit_data("device", cfg.timing_cfg, mon_data[i]);
- `uvm_info(`gfn, $sformatf("monitor, rd_data, trans %0d, byte %0d, bit[%0d] %0b",
+ `uvm_info(`gfn, $sformatf("\nmonitor, rd_data, trans %0d, byte %0d, bit[%0d] %0b",
mon_dut_item.tran_id, mon_dut_item.num_data+1, i, mon_data[i]), UVM_DEBUG)
end
mon_dut_item.data_q.push_back(mon_data);
@@ -116,7 +116,7 @@
// sample host ack/nack (in the last byte, nack can be issue if rcont is set)
cfg.vif.wait_for_host_ack_or_nack(cfg.timing_cfg, mon_dut_item.ack, mon_dut_item.nack);
`DV_CHECK_NE_FATAL({mon_dut_item.ack, mon_dut_item.nack}, 2'b11)
- `uvm_info(`gfn, $sformatf("monitor, detect HOST %s",
+ `uvm_info(`gfn, $sformatf("\nmonitor, detect HOST %s",
(mon_dut_item.ack) ? "ACK" : "NO_ACK"), UVM_DEBUG)
end
begin
@@ -124,7 +124,7 @@
mon_dut_item.rstart,
mon_dut_item.stop);
`DV_CHECK_NE_FATAL({mon_dut_item.rstart, mon_dut_item.stop}, 2'b11)
- `uvm_info(`gfn, $sformatf("monitor, rd_data, detect HOST %s",
+ `uvm_info(`gfn, $sformatf("\nmonitor, rd_data, detect HOST %s",
(mon_dut_item.stop) ? "STOP" : "RSTART"), UVM_DEBUG)
end
join_any
@@ -160,7 +160,7 @@
mon_dut_item.rstart,
mon_dut_item.stop);
`DV_CHECK_NE_FATAL({mon_dut_item.rstart, mon_dut_item.stop}, 2'b11)
- `uvm_info(`gfn, $sformatf("monitor, wr_data, detect HOST %s %0b",
+ `uvm_info(`gfn, $sformatf("\nmonitor, wr_data, detect HOST %s %0b",
(mon_dut_item.stop) ? "STOP" : "RSTART", mon_dut_item.stop), UVM_DEBUG)
end
join_any
diff --git a/hw/ip/i2c/dv/env/i2c_scoreboard.sv b/hw/ip/i2c/dv/env/i2c_scoreboard.sv
index 56f17f4..e8fb06f 100644
--- a/hw/ip/i2c/dv/env/i2c_scoreboard.sv
+++ b/hw/ip/i2c/dv/env/i2c_scoreboard.sv
@@ -59,7 +59,7 @@
csr = ral.default_map.get_reg_by_offset(csr_addr);
`DV_CHECK_NE_FATAL(csr, null)
end else begin
- `uvm_fatal(`gfn, $sformatf("access unexpected addr 0x%0h", csr_addr))
+ `uvm_fatal(`gfn, $sformatf("\naccess unexpected addr 0x%0h", csr_addr))
end
sb_exp_wr_item = new();
@@ -239,11 +239,11 @@
if (!dut_trn.compare(exp_trn)) begin
if (!check_overflow_data_fmt_fifo(exp_trn, dut_trn)) begin // fmt_overflow transaction
- `uvm_error(`gfn, $sformatf("%s item mismatch!\n--> EXP:\n%0s\--> DUT:\n%0s",
+ `uvm_error(`gfn, $sformatf("\ndirection %s item mismatch!\n--> EXP:\n%0s\--> DUT:\n%0s",
(dir == BusOpWrite) ? "WRITE" : "READ", exp_trn.sprint(), dut_trn.sprint()))
end
end else begin
- `uvm_info(`gfn, $sformatf("direction %s item match!\n--> EXP:\n%0s\--> DUT:\n%0s",
+ `uvm_info(`gfn, $sformatf("\ndirection %s item match!\n--> EXP:\n%0s\--> DUT:\n%0s",
(dir == BusOpWrite) ? "WRITE" : "READ", exp_trn.sprint(), dut_trn.sprint()), UVM_DEBUG)
end
end
@@ -279,7 +279,7 @@
`uvm_info(`gfn, $sformatf("%s", cfg.convert2string()), UVM_DEBUG)
if (cfg.en_scb) begin
str = {$sformatf("\n\n*** SCOREBOARD CHECK\n")};
- str = {str, $sformatf(" - Total checked trans %0d\n", num_exp_tran)};
+ str = {str, $sformatf(" - total checked trans %0d\n", num_exp_tran)};
`uvm_info(`gfn, $sformatf("%s", str), UVM_DEBUG)
end
endfunction : report_phase
diff --git a/hw/ip/i2c/dv/env/seq_lib/i2c_base_vseq.sv b/hw/ip/i2c/dv/env/seq_lib/i2c_base_vseq.sv
index f545a3d..ba0138d 100644
--- a/hw/ip/i2c/dv/env/seq_lib/i2c_base_vseq.sv
+++ b/hw/ip/i2c/dv/env/seq_lib/i2c_base_vseq.sv
@@ -139,7 +139,7 @@
i2c_device_seq m_dev_seq;
m_dev_seq = i2c_device_seq::type_id::create("m_dev_seq");
- `uvm_info(`gfn, "start i2c_device sequence", UVM_DEBUG)
+ `uvm_info(`gfn, "\nstart i2c_device sequence", UVM_DEBUG)
fork
m_dev_seq.start(p_sequencer.i2c_sequencer_h);
join_none
@@ -148,7 +148,7 @@
virtual task host_init();
bit [TL_DW-1: 0] intr_state;
- `uvm_info(`gfn, "initialize i2c host registers", UVM_DEBUG)
+ `uvm_info(`gfn, "\ninitialize i2c host registers", UVM_DEBUG)
ral.ctrl.enablehost.set(1'b1);
csr_update(ral.ctrl);
diff --git a/hw/ip/i2c/dv/env/seq_lib/i2c_common_vseq.sv b/hw/ip/i2c/dv/env/seq_lib/i2c_common_vseq.sv
index 01f40ab..24fdec2 100644
--- a/hw/ip/i2c/dv/env/seq_lib/i2c_common_vseq.sv
+++ b/hw/ip/i2c/dv/env/seq_lib/i2c_common_vseq.sv
@@ -15,13 +15,13 @@
virtual task body();
// disable i2c_monitor since it can not handle this test
- `uvm_info(`gfn, $sformatf("disable i2c_monitor and i2c_scoreboard"), UVM_DEBUG)
+ `uvm_info(`gfn, $sformatf("\ndisable i2c_monitor and i2c_scoreboard"), UVM_DEBUG)
cfg.m_i2c_agent_cfg.en_monitor = 1'b0;
run_common_vseq_wrapper(num_trans); // inherit from cip_base_vseq.sv
endtask : body
task post_start();
- `uvm_info(`gfn, "stop simulation", UVM_DEBUG)
+ `uvm_info(`gfn, "\nstop simulation", UVM_DEBUG)
endtask : post_start
endclass : i2c_common_vseq
diff --git a/hw/ip/i2c/dv/env/seq_lib/i2c_fifo_overflow_vseq.sv b/hw/ip/i2c/dv/env/seq_lib/i2c_fifo_overflow_vseq.sv
index 803d6da..5d04761 100644
--- a/hw/ip/i2c/dv/env/seq_lib/i2c_fifo_overflow_vseq.sv
+++ b/hw/ip/i2c/dv/env/seq_lib/i2c_fifo_overflow_vseq.sv
@@ -50,7 +50,7 @@
// since fmt_fifo can be drained thus decreasing cnt_fmt_overflow counter
`DV_CHECK_GT(cnt_fmt_overflow, 0)
`DV_CHECK_LE(cnt_fmt_overflow, num_data_ovf)
- `uvm_info(`gfn, $sformatf("\nRun %0d, cnt_fmt_overflow %0d",
+ `uvm_info(`gfn, $sformatf("\nrun %0d, cnt_fmt_overflow %0d",
i, cnt_fmt_overflow), UVM_DEBUG)
end
@@ -64,7 +64,7 @@
csr_spinwait(.ptr(ral.status.rxempty), .exp_data(1'b1));
check_rx_overflow = 1'b0;
`DV_CHECK_EQ(cnt_rx_overflow, 1)
- `uvm_info(`gfn, $sformatf("\nRun %0d, cnt_rx_overflow %d",
+ `uvm_info(`gfn, $sformatf("\nrun %0d, cnt_rx_overflow %d",
i, cnt_rx_overflow), UVM_DEBUG)
end
end
diff --git a/hw/ip/i2c/dv/env/seq_lib/i2c_fifo_watermark_vseq.sv b/hw/ip/i2c/dv/env/seq_lib/i2c_fifo_watermark_vseq.sv
index 65ab4e4..4810ae5 100644
--- a/hw/ip/i2c/dv/env/seq_lib/i2c_fifo_watermark_vseq.sv
+++ b/hw/ip/i2c/dv/env/seq_lib/i2c_fifo_watermark_vseq.sv
@@ -58,7 +58,7 @@
// 2: fmtilvl is crossed twice when data fills up or drains from fmt_fifo
`DV_CHECK_GT(cnt_fmt_watermark, 0)
`DV_CHECK_LE(cnt_fmt_watermark, 2)
- `uvm_info(`gfn, $sformatf("\nRun %0d, cnt_fmt_watermark %0d",
+ `uvm_info(`gfn, $sformatf("\nrun %0d, cnt_fmt_watermark %0d",
i, cnt_fmt_watermark), UVM_DEBUG)
end
diff --git a/hw/ip/i2c/dv/env/seq_lib/i2c_rx_tx_vseq.sv b/hw/ip/i2c/dv/env/seq_lib/i2c_rx_tx_vseq.sv
index f399a86..3d737cb 100644
--- a/hw/ip/i2c/dv/env/seq_lib/i2c_rx_tx_vseq.sv
+++ b/hw/ip/i2c/dv/env/seq_lib/i2c_rx_tx_vseq.sv
@@ -37,12 +37,12 @@
end
last_tran = (cur_tran == num_trans);
- `uvm_info(`gfn, $sformatf("start sending %s transaction %0d/%0d",
+ `uvm_info(`gfn, $sformatf("\nstart sending %s transaction %0d/%0d",
(rw_bit) ? "READ" : "WRITE", cur_tran, num_trans), UVM_DEBUG)
if (rw_bit) host_read_trans(last_tran);
else host_write_trans(last_tran);
- `uvm_info(`gfn, $sformatf("finish sending %s transaction, %0s at the end, %0d/%0d, ",
+ `uvm_info(`gfn, $sformatf("\nfinish sending %s transaction, %0s at the end, %0d/%0d, ",
(rw_bit) ? "read" : "write",
(fmt_item.stop) ? "stop" : "rstart", cur_tran, num_trans), UVM_DEBUG)
// check a completed transaction is programmed to the host/dut (stop bit must be issued)
@@ -85,15 +85,15 @@
)
`DV_CHECK_EQ(fmt_item.stop | fmt_item.rcont, 1)
if (num_rd_bytes == 0) begin
- `uvm_info(`gfn, "\nRead transaction length is 256 byte", UVM_DEBUG)
+ `uvm_info(`gfn, "\nread transaction length is 256 byte", UVM_DEBUG)
end
// accumulate number of read byte
total_rd_bytes += (num_rd_bytes) ? num_rd_bytes : 256;
if (fmt_item.rcont) begin
- `uvm_info(`gfn, "\nTransaction READ is chained with next READ transaction", UVM_DEBUG)
+ `uvm_info(`gfn, "\ntransaction READ is chained with next READ transaction", UVM_DEBUG)
end else begin
- `uvm_info(`gfn, $sformatf("\nTransaction READ ended %0s", (fmt_item.stop) ?
+ `uvm_info(`gfn, $sformatf("\ntransaction READ ended %0s", (fmt_item.stop) ?
"with STOP, next transaction should begin with START" :
"without STOP, next transaction should begin with RSTART"), UVM_DEBUG)
end
@@ -135,7 +135,7 @@
`DV_CHECK_MEMBER_RANDOMIZE_FATAL(num_wr_bytes)
`DV_CHECK_MEMBER_RANDOMIZE_FATAL(wr_data)
if (num_wr_bytes == 256) begin
- `uvm_info(`gfn, "\nWrite transaction length is 256 byte", UVM_DEBUG)
+ `uvm_info(`gfn, "\nwrite transaction length is 256 byte", UVM_DEBUG)
end
for (int i = 1; i <= num_wr_bytes; i++) begin
@@ -153,7 +153,7 @@
// last write byte of other tran., stop is randomly set/unset to issue stop/rstart bit
fmt_item.stop = (i != num_wr_bytes) ? 1'b0 : ((last_tran) ? 1'b1 : fmt_item.stop);
if (i == num_wr_bytes) begin
- `uvm_info(`gfn, $sformatf("\nTransaction WRITE ended %0s", (fmt_item.stop) ?
+ `uvm_info(`gfn, $sformatf("\ntransaction WRITE ended %0s", (fmt_item.stop) ?
"with STOP, next transaction should begin with START" :
"without STOP, next transaction should begin with RSTART"), UVM_DEBUG)
end
diff --git a/hw/ip/i2c/dv/env/seq_lib/i2c_sanity_vseq.sv b/hw/ip/i2c/dv/env/seq_lib/i2c_sanity_vseq.sv
index 7478e93..7120f19 100644
--- a/hw/ip/i2c/dv/env/seq_lib/i2c_sanity_vseq.sv
+++ b/hw/ip/i2c/dv/env/seq_lib/i2c_sanity_vseq.sv
@@ -7,9 +7,6 @@
`uvm_object_utils(i2c_sanity_vseq)
`uvm_object_new
- constraint clear_intr_dly_c { clear_intr_dly inside {[0 : 10]}; }
- constraint num_wr_bytes_c { num_wr_bytes inside {[1 : 5]}; }
- constraint num_rd_bytes_c { num_rd_bytes inside {[1 : 5]}; }
// increase num_trans to cover all transaction types
constraint num_trans_c { num_trans inside {[50 : 100]}; }