Have a piece of code which has many functions implemented in the other parts …
Actually i want to check whenever my command line value is x then mu_value irrespective of what value it generates it should give don’t care 'x only. But my output is [0,0,0,0]
if($value$plusargs("Value=%s",value)) begin
$display("After $value$plusargs(): value = %s", value);
parse(mu_value,no_values,",",value);
$display("After $value$plusargs(): value = %p no_values %d value %s", mu_value,no_values,value);
if(value=="x") begin
if(mu_value.size()!=no_probes*mu_count);
$display("Entered Loop for don't care");
for(int i=0;i<no_probes;i++) begin
for(int j=1; j<mu_count;j++)begin
mu_value=new[mu_value.size()+1](mu_value);
mu_value[(i*mu_count)+j]='x;
no_values++;
$display("value = %p",mu_value);
for (int i = 0; i < mu_value.size(); i++) begin
if (mu_value[i] !== 'x) begin
mu_value[i] = 'x;
end
end
Output :
# After $value$plusargs(): value = x
# out=xxxxxxxx
# After $value$plusargs(): value = '{0} no_values 1 value x
# Entered Loop for don't care
# value = '{0, 0}
# After setting don't care values: value = '{0, 0}
# value = '{0, 0, 0}
# After setting don't care values: value = '{0, 0, 0}
# value = '{0, 0, 0, 0}
# After setting don't care values: value = '{0, 0, 0, 0}
# value = '{0, 0, 0, 0, 0}
# After setting don't care values: value = '{0, 0, 0, 0, 0}
# value = '{0, 0, 0, 0, 0, 0}
# After setting don't care values: value = '{0, 0, 0, 0, 0, 0}
# 00000000 no_values 6
# 00000000 no_values 6
# 00000001 no_values 6
# 00000001 no_values 6
# 00000002 no_values 6
# 00000002 no_values 6
# 00000000 no_values 6
# 00000000 no_values 6