Hello,
I do not know why this construction returns me a BAD-HANDLE or REFERENCE error in questa 2019.4 for a line within fork-join - that is waiting for an event @(dut_filter_tau_trg).
Below is just dummy code - but I want to use this approach within filter model prediction implementation. Why during the run-time questa
@(dut_filter_tau_trg); returns a BAD-REFERENCE?
Because if I write @(dut_filter_tau_trg); out of FORK-JOIN within that Task everything works fine - just that I cannot spawn threads within that Task and wait within spawned thread for event trigger passed to Task as handle.
Can you please tell me what am I missing here?
...
...
//*************************************************************************
// Task: filter
// Calculates filtered values according to parameters
//*************************************************************************
task filter(ref process proc,
ref event dut_filter_tau_trg,
// ... additional arguments
);
// Internal Filter event trigger
event recalc_filter_trg;
// -----------------------------------------------------------
// Assign Process Variable
// -----------------------------------------------------------
proc = process::self();
fork
forever begin
@(dut_filter_tau_trg);
// DO-SOMETHING_1
// Fire-trigger
-> recalc_filter_trg;
end
forever begin
@(recalc_filter_trg);
// DO-SOMETHING_2
end
join
endtask : filter
...
...
task run_phase(uvm_phase phase);
forever begin
@(reset_trg);
// -----------------------------------------------------
fork
....
// BG Servo Pressure 2 Filter
filter(bg_servo_press2_filter_prc, // proc_filter_output
m_tb_internal_signals.dut_bg_servo_press2_filter_tau_trg, // dut_filter_tau_trg
// ... additional arguments // ... additional arguments
)
....
join_none // CONTINUE-IMMEDIATELY
// -----------------------------------------------------
end // END-FOREVER-LOOP
endtask : run_phase