Hi
I have created a sequence & a scenario which consists of ovm_do_with &
apply_send_with calls along with set_config_int like:
Sequence:
repeat(k)
begin
set_config_int(“*”,“ENABLE”,1);
ovm_do_with(trans1,addr ==laddr); set_config_int("*","ENABLE",0);
ovm_do_with(trans2,addr ==laddr);
end
Scenario:
repeat(k)
begin
set_config_int(“*”,“ENABLE”,1);
apply_send_with(trans1,trans1.addr ==laddr); set_config_int("*","ENABLE",0);
apply_send_with(trans2,trans2.addr ==laddr);
end
My intention here is to use the Inline Constraint capability to constraint the “addr” field of each transaction with a local “laddr” value only when ENABLE is set to “1”.
When ENABLE is set to “0”, the addr value is dafault value.
This is checked by Driver (using the get_config_int for ENABLE in the run phase) on whether to use the constrained addr value or use the default addr value before driving the transaction onto the bus.
Here my issue is “SEQUENCE” is working as per my expectation (ENABLE–>1 ==> use the laddr vaue for trans1;ENABLE–>0==>use the default value for trans2) but “SCENARIO” is NOT working as expected.
In case of scenario, my first set_config_int for ENABLE with value “1” is always overrided by the following set_config_int for ENABLE with value “0”.
Hence always ENABLE is "0’ for both trans1 & trans2 ==> using default value for addr.
Can anyone explain why this is happening?
Interesting part is, If I add a delay between the set_config_int call & `apply_send_with call, it works FINE as expected.:o
Scenario:
repeat(k)
begin
set_config_int(“*”,“ENABLE”,1);
apply_send_with(trans1,trans1.addr ==laddr); #1; set_config_int("*","ENABLE",0);
apply_send_with(trans2,trans2.addr ==laddr);
#1;
end
Thanks in advance.:D
TVAR