UFK
Member level 3
Hello all
Can someone please help me write the piece of code for the following lines in Verilog.
if either 'a' or 'b' or 'c' is greater than X
Y=X;
else
Y=P;
See if i try writing my way it ends up like this
if a^b^c > X
begin
Y=X
else
Y=P
This however would perform the 'OR' operation on a, b, c not the "either this or this or this" statement.
Please help me with it. I hope iv managed to convey my question. Thanks in advance
Can someone please help me write the piece of code for the following lines in Verilog.
if either 'a' or 'b' or 'c' is greater than X
Y=X;
else
Y=P;
See if i try writing my way it ends up like this
if a^b^c > X
begin
Y=X
else
Y=P
This however would perform the 'OR' operation on a, b, c not the "either this or this or this" statement.
Please help me with it. I hope iv managed to convey my question. Thanks in advance