Build error fixes

Changed run_phase to be a task
This commit is contained in:
2026-06-05 22:22:19 -07:00
parent e1b0143830
commit 73b38f7e55
3 changed files with 13 additions and 23 deletions
+2 -2
View File
@@ -102,10 +102,10 @@ class axi_agent extends uvm_agent;
// -------------------------------------------------- // --------------------------------------------------
// Run phase // Run phase
virtual function void run_phase(uvm_phase phase); virtual task run_phase(uvm_phase phase);
`uvm_info("axi_agent", $sformatf("Running AXI agent: %s as %s", `uvm_info("axi_agent", $sformatf("Running AXI agent: %s as %s",
get_full_name(), agent_type.name()), UVM_LOW) get_full_name(), agent_type.name()), UVM_LOW)
endfunction endtask
endclass : axi_agent endclass : axi_agent
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
+2 -2
View File
@@ -47,7 +47,7 @@ class axi_driver extends uvm_driver; // #(axi_transaction);
// -------------------------------------------------- // --------------------------------------------------
// Run phase // Run phase
virtual function void run_phase(uvm_phase phase); virtual task run_phase(uvm_phase phase);
// Open transaction log file // Open transaction log file
trk_file = $fopen($sformatf("axi_driver.%s.log", agent_type.name()), "w"); trk_file = $fopen($sformatf("axi_driver.%s.log", agent_type.name()), "w");
if (trk_file == 0) begin if (trk_file == 0) begin
@@ -58,7 +58,7 @@ class axi_driver extends uvm_driver; // #(axi_transaction);
// Start driver // Start driver
drive_axi(phase); drive_axi(phase);
endfunction endtask
// -------------------------------------------------- // --------------------------------------------------
virtual task drive_axi(uvm_phase phase); virtual task drive_axi(uvm_phase phase);
+9 -19
View File
@@ -44,7 +44,7 @@ class axi_monitor extends uvm_monitor; // #(axi_transaction);
// -------------------------------------------------- // --------------------------------------------------
// Run phase // Run phase
virtual function void run_phase(uvm_phase phase); virtual task run_phase(uvm_phase phase);
// Open transaction log file // Open transaction log file
trk_file = $fopen($sformatf("axi_transactions.%s.log", agent_type.name()), "w"); trk_file = $fopen($sformatf("axi_transactions.%s.log", agent_type.name()), "w");
if (trk_file == 0) begin if (trk_file == 0) begin
@@ -55,7 +55,7 @@ class axi_monitor extends uvm_monitor; // #(axi_transaction);
// Start monitoring // Start monitoring
do_monitor(); do_monitor();
endfunction endtask
// -------------------------------------------------- // --------------------------------------------------
// Monitor logic to capture transactions // Monitor logic to capture transactions
@@ -93,6 +93,7 @@ class axi_monitor extends uvm_monitor; // #(axi_transaction);
txn.txn_type = AXI_WRITE; txn.txn_type = AXI_WRITE;
txn.addr = mon_if.AWADDR; txn.addr = mon_if.AWADDR;
txn.length = mon_if.AWLEN; txn.length = mon_if.AWLEN;
txn.size = mon_if.AWSIZE;
end end
end end
@@ -112,11 +113,12 @@ class axi_monitor extends uvm_monitor; // #(axi_transaction);
if (txn_ph == 2) begin if (txn_ph == 2) begin
if (((mon_if.BREADY != prev_bready) || (mon_if.BVALID != prev_bvalid)) if (((mon_if.BREADY != prev_bready) || (mon_if.BVALID != prev_bvalid))
&& ((mon_if.BREADY === 1'b1) && (mon_if.BVALID === 1'b1))) begin && ((mon_if.BREADY === 1'b1) && (mon_if.BVALID === 1'b1))) begin
txn_ph = 2; // DATA txn_ph = 0; // IDLE
// Capture transaction details here // Capture transaction details here
txn.resp = mon_if.WSTRB; txn.resp = mon_if.BRESP;
txn.sample_coverage();
ap.write(txn); ap.write(txn);
write_transaction_to_file(txn); write_transaction_to_file(txn);
end end
@@ -155,6 +157,7 @@ class axi_monitor extends uvm_monitor; // #(axi_transaction);
txn.txn_type = AXI_READ; txn.txn_type = AXI_READ;
txn.addr = mon_if.ARADDR; txn.addr = mon_if.ARADDR;
txn.length = mon_if.ARLEN; txn.length = mon_if.ARLEN;
txn.size = mon_if.ARSIZE;
end end
end end
@@ -166,27 +169,14 @@ class axi_monitor extends uvm_monitor; // #(axi_transaction);
// Capture transaction details here // Capture transaction details here
txn.data = mon_if.RDATA; txn.data = mon_if.RDATA;
txn.resp = mon_if.RRESP;
txn.sample_coverage();
ap.write(txn); ap.write(txn);
write_transaction_to_file(txn); write_transaction_to_file(txn);
end end
end end
if (((mon_if.ARREADY != prev_arready) || (mon_if.ARVALID != prev_arvalid))
&& ((mon_if.ARREADY === 1'b1) && (mon_if.ARVALID === 1'b1))) begin
axi_transaction txn;
txn = axi_transaction::type_id::create("txn");
// Capture transaction details here
txn.txn_type = AXI_READ;
txn.addr = mon_if.ARADDR;
txn.length = mon_if.ARLEN;
ap.write(txn);
write_transaction_to_file(txn);
end
// Update previous values // Update previous values
prev_arready = mon_if.ARREADY; prev_arready = mon_if.ARREADY;
prev_arvalid = mon_if.ARVALID; prev_arvalid = mon_if.ARVALID;