-
program tb_top();
int a,b;
initial begin
a = 10;
b = 15;
unique if((a == 1) && (b == 7)) $display(“ONE”);
else if((a == 1) && (b == 7)) $display(“TWO”);
end
endprogram: tb_top -
program tb_top();
int a,b;
initial begin
a = 10;
b = 15;
unique if((a == 1) && (a == 7)) $display(“ONE”);
else if((a == 1) && (a == 7)) $display(“TWO”);
end
endprogram: tb_top
Both conditions are the same in 1 and 2. But I am not getting any compilation warnings that both are not unique. Can any one explain?
- program tb_top();
int a,b;
initial begin
a = 10;
b = 15;
unique if((a == 1) || (a == 7)) $display(“ONE”);
else if((a == 1) || (a == 7)) $display(“TWO”);
end
endprogram: tb_top
In 3rd one It throws a compilation warning that both are not unique.
I am confused