For implementing ISR, our team has proposed two ways of doing this:
- Trigger a uvm_event when interrupt is asserted, wait for the trigger in a sequence that runs throughout the simulation. When an interrupt is triggered the sequence does the usual ISR steps of reading status, enable and resetting the status.
Here the argument is uvm_event is unmanageable and not re-usable. - Monitor the interrupt assertion and send it to a uvm_component via uvm_analysis_port. In the component run task, implement the ISR. Question here is, is it okay to do register write/read from a component and if so how will the priority be handled.
Please discuss the pro and cons of either method. which is mostly used across industry?
Thanks