detect rising edge and falling edge to assing signal to Enable
I don't see anything wrong in your code. Your requirement seems to be met when I simulated the code. Enable went high on the first rising edge and went down when it detected the first falling edge afterwards. I think you forced the inputs in a wrong way.