Hi Forum,
In my IP’s env I wait for an interrupt to occur ::
virtual task pre_main_phase( uvm_phase phase );
phase.raise_objection( this );
fork
begin
forever @(posedge tc_vif_intf.tc_intr )
begin
// ISR Sequence to clear TC interrupt
end
end
begin
forever @(posedge tc_vif_intf.map_intr )
begin
// ISR Sequence to clear Map interrupt
end
end
join_none
phase.drop_objection( this );
endtask
- Is the objection raise and drop of any significance here ? ( due to join_none ) .
The actual interrupt occurs due to a sequence started in main_phase() of the test.
In the waveform I notice that the interrupt does occur later on ( when sequence has started sending txns. via main_phase() of the test ).
However @(posedge tc_vif_intf.tc_intr ) / @(posedge tc_vif_intf.map_intr ) doesn’t unblock.
When I move the above code to main_phase() of env the event is triggered and ISR sequence executes.
-
I was wondering why the ISR sequence doesn’t execute in pre_main_phase ?
My initial thought is when phasing moves to test’s main_phase() , the env’s ( and all other component’s ) pre_main_phase() is killed essentially meaning that there is no event waiting for the interrupt signal -
Where should I ideally write this piece of code ? I can’t write in base_test as the test isn’t being reused at Sub-system level ( hence I chose in IP’s env which would be reused ). Should I write it in run_phase() of env ? So that if the sequence from test generates interrupt in pre_main_phase / main_phase / post_main_phase my ISR sequence would always execute
Thanks