superhet
Junior Member level 3
find positive edge of signal
how can i detect the positive edge of a signal using an if statement in verilog. if i had to detect the level of a signal i would use
but what if i want to detect only the positive edge of a signal???
my limited knowledge of verilog tells me that i could use
but as i said im using an if statement which means im already in an always block and always blocks cannot be nested.
so what is the solution
how can i detect the positive edge of a signal using an if statement in verilog. if i had to detect the level of a signal i would use
Code:
if(signal)
begin
........
........
end
but what if i want to detect only the positive edge of a signal???
my limited knowledge of verilog tells me that i could use
Code:
always @(posedge signal)
begin
..........
..........
end
but as i said im using an if statement which means im already in an always block and always blocks cannot be nested.
so what is the solution