Injecting error

1.how to inject error continuously in [3:0] fields of 32 bit [31:0] register?please explain with code.and different ways.

In reply to manikanta710214:
Please elaborate on what you mean by an “error”

In reply to dave_59:

hi Dave any type of possible error to corrupt the fields.

Thanks
Manikanta

In reply to manikanta710214:
How is anyone supposed to know the difference between a valid field and a corrupted field? And how is the register supposed to be accessed? You need to provide a lot more information for anyone to help you.

In reply to dave_59:

hi Dave i done This way always injecting x’s in [3:0] fields after randomization.

program main;
logic [31:0] y;
initial begin
repeat(10) begin
y = {$urandom(),(4’bx >> $urandom_range(3,0) )};
$display(“printing y %0h”,y);
$display(" ");
end
end
endprogram