Uvm_reg protocol level error/pio hole err injection

I’ve some questions on how exactly to inject error scenario cases using uvm_reg infrastructure, specifically (1. protocol level and 2. pio holes accesses).

  1. for protocol level let’s say the underlying pio intf is an axi intf. Currently in the adapter for example I calculated the proper len (burst) I should send on the bus by querying the register size and divide that by the axi bus interface word size (which can be different for different clients inside the chip). Currently I “inject” len error inside the reg2bus function by using a probability knob inside the adapter and modifying the len, but I don’t have a good way to send this information back as the reg2bus fn has the uvm_reg_bus_op as a const ref. Also I’m not sure if this is the right place or whether the notion of “injecting” error need to be visible at a higher function call level. (for example whether I should use the uvm_object extension of the write/read function as an indicator of error injection).

  2. how exactly do you inject erroneous pio addr that are say suppose to be pio holes within your block through uvm_reg mechanism or we have to somehow use a direct sequence to access the pio agent directly for the pio “hole” case? Since the uvm_reg implicitly has a register path I’m not sure what’s the proper way of injecting a bad pio addr.

Thanks.