kommu4946
Member level 4
- Joined
- Feb 21, 2014
- Messages
- 71
- Helped
- 13
- Reputation
- 26
- Reaction score
- 11
- Trophy points
- 1,288
- Location
- India
- Activity points
- 1,846
Hi all, conditional operator and if statement are equal for the fallowing piece of code..
Are they equal in functionality...? simulations working same..but they are not giving same results on FPGA board? what might be the reason...?
Code:
wire enable1 = (expression1 ==1 && expression2 ==1)?1:0;
always @ (posedge clock) begin
if (enable1)begin
statement1;
statement2;
end
end
Code:
always @ (posedge clock) begin
if ( (expression1 ==1 && expression2 ==1))begin
statement1;
statement2;
end
end