Build error fixes
Changed run_phase to be a task
This commit is contained in:
@@ -102,10 +102,10 @@ class axi_agent extends uvm_agent;
|
||||
|
||||
// --------------------------------------------------
|
||||
// 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",
|
||||
get_full_name(), agent_type.name()), UVM_LOW)
|
||||
endfunction
|
||||
endtask
|
||||
endclass : axi_agent
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
@@ -47,7 +47,7 @@ class axi_driver extends uvm_driver; // #(axi_transaction);
|
||||
|
||||
// --------------------------------------------------
|
||||
// Run phase
|
||||
virtual function void run_phase(uvm_phase phase);
|
||||
virtual task run_phase(uvm_phase phase);
|
||||
// Open transaction log file
|
||||
trk_file = $fopen($sformatf("axi_driver.%s.log", agent_type.name()), "w");
|
||||
if (trk_file == 0) begin
|
||||
@@ -58,7 +58,7 @@ class axi_driver extends uvm_driver; // #(axi_transaction);
|
||||
|
||||
// Start driver
|
||||
drive_axi(phase);
|
||||
endfunction
|
||||
endtask
|
||||
|
||||
// --------------------------------------------------
|
||||
virtual task drive_axi(uvm_phase phase);
|
||||
|
||||
+9
-19
@@ -44,7 +44,7 @@ class axi_monitor extends uvm_monitor; // #(axi_transaction);
|
||||
|
||||
// --------------------------------------------------
|
||||
// Run phase
|
||||
virtual function void run_phase(uvm_phase phase);
|
||||
virtual task run_phase(uvm_phase phase);
|
||||
// Open transaction log file
|
||||
trk_file = $fopen($sformatf("axi_transactions.%s.log", agent_type.name()), "w");
|
||||
if (trk_file == 0) begin
|
||||
@@ -55,7 +55,7 @@ class axi_monitor extends uvm_monitor; // #(axi_transaction);
|
||||
|
||||
// Start monitoring
|
||||
do_monitor();
|
||||
endfunction
|
||||
endtask
|
||||
|
||||
// --------------------------------------------------
|
||||
// Monitor logic to capture transactions
|
||||
@@ -93,6 +93,7 @@ class axi_monitor extends uvm_monitor; // #(axi_transaction);
|
||||
txn.txn_type = AXI_WRITE;
|
||||
txn.addr = mon_if.AWADDR;
|
||||
txn.length = mon_if.AWLEN;
|
||||
txn.size = mon_if.AWSIZE;
|
||||
end
|
||||
end
|
||||
|
||||
@@ -112,11 +113,12 @@ class axi_monitor extends uvm_monitor; // #(axi_transaction);
|
||||
if (txn_ph == 2) begin
|
||||
if (((mon_if.BREADY != prev_bready) || (mon_if.BVALID != prev_bvalid))
|
||||
&& ((mon_if.BREADY === 1'b1) && (mon_if.BVALID === 1'b1))) begin
|
||||
txn_ph = 2; // DATA
|
||||
txn_ph = 0; // IDLE
|
||||
|
||||
// Capture transaction details here
|
||||
txn.resp = mon_if.WSTRB;
|
||||
txn.resp = mon_if.BRESP;
|
||||
|
||||
txn.sample_coverage();
|
||||
ap.write(txn);
|
||||
write_transaction_to_file(txn);
|
||||
end
|
||||
@@ -155,6 +157,7 @@ class axi_monitor extends uvm_monitor; // #(axi_transaction);
|
||||
txn.txn_type = AXI_READ;
|
||||
txn.addr = mon_if.ARADDR;
|
||||
txn.length = mon_if.ARLEN;
|
||||
txn.size = mon_if.ARSIZE;
|
||||
end
|
||||
end
|
||||
|
||||
@@ -166,27 +169,14 @@ class axi_monitor extends uvm_monitor; // #(axi_transaction);
|
||||
|
||||
// Capture transaction details here
|
||||
txn.data = mon_if.RDATA;
|
||||
txn.resp = mon_if.RRESP;
|
||||
|
||||
txn.sample_coverage();
|
||||
ap.write(txn);
|
||||
write_transaction_to_file(txn);
|
||||
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
|
||||
prev_arready = mon_if.ARREADY;
|
||||
prev_arvalid = mon_if.ARVALID;
|
||||
|
||||
Reference in New Issue
Block a user