Hi,
I have the following question from the post Stimulus/Interrupts | Verification Academy.
In the code below,
// Read from the GPO register to determine the cause of the interrupt
assert (req.randomize() with {addr == 32'h0100_0000; read_not_write == 1;});
start_item(req);
finish_item(req);
We randomize the req (which is a isr seq item in this case) with the address of ISR, read set.
Can anyone explain, how does this sequence, gets the read_data from the DUT registers. What happens under-the-hood?
Also, in the code below,
req.read_not_write = 0;
if(req.read_data[0] == 1) begin
`uvm_info("ISR:BODY", "IRQ0 detected", UVM_LOW)
req.write_data[0] = 0;
start_item(req);
finish_item(req);
`uvm_info("ISR:BODY", "IRQ0 cleared", UVM_LOW)
end
As the item is not randomized, I believe we are writing into address “32’h0100_0000” to clear the interrupt. Is this correct?
Thanks,
Madhu