In reply to chr_sue:
Thanks, I have gone through the code and also ran it. My query is about taking decesion based on received response.
Please find below lines of code from given example:
From Driver Code
…
if(rsp.read_not_write == 1) begin
rsp.read_data = BUS.read_data; // If read - copy returned read data
end
rsp.error = BUS.error; // Copy bus error status
BUS.valid <= 0; // End the pin level bus transaction
seq_item_port.put(rsp); // put returns the response
From Sequence code:
…
start_item(req);
// The address is constrained to be within the address of the GPIO function
// within the DUT, The result will be a request item for a read or a write
assert(req.randomize() with {addr inside {[32’h0100_0000:32’h0100_001C]};});
finish_item(req);
get_response(rsp);
Simulation Messages:
UVM_INFO top.sv(209) @ 2870: uvm_test_top.m_sequencer@@test_seq [seq_body]
addr: 1000014
write_data: 5fe70b99
read_not_write: 1
delay: 8
**error: 0
read_data: 0**
UVM_INFO top.sv(209) @ 2990: uvm_test_top.m_sequencer@@test_seq [seq_body]
addr: 1000018
write_data: a7ecbab6
read_not_write: 1
delay: 1
**error: 0
read_data: 38f93ae6**
Here we have received read_data & error as a response from Driver in to a sequence. My point of query is about taking decision based on received response for driving next transaction.
Can sequence can be coded to wait for few clock cycle if rsp in error field is ‘1’ ?
start_item(req);
assert(req.randomize() with {addr inside {[32'h0100_0000:32'h0100_001C]};});
finish_item(req);
get_response(rsp);
if(rsp.error==1)
wait for few clock cycle()
...