KingMoshe
Member level 2
Hello,
I have an input signal that can be initiate at "0" or "1".
I want to detect if the signal changed from "0" to "1" or from "1" to "0" @ posedge clock
How can I do it?
I tried:
Always @ (posedge clk) begin
if (~input_signal)
xxx = 1'b0;
end
I have an input signal that can be initiate at "0" or "1".
I want to detect if the signal changed from "0" to "1" or from "1" to "0" @ posedge clock
How can I do it?
I tried:
Always @ (posedge clk) begin
if (~input_signal)
xxx = 1'b0;
end