Hi, FPGA noobie here. I need a latch which is set by an edge on one signal, and cleared by an edge on another. Here's my code:
Input Signal1, Signal2
always @ (posedge Signal1) Latch = 1
always @ (posedge Signal2) Latch = 0
That compiles OK, but as soon as I use Latch in another statement, eg:
Set LED = Latch
I get compile errors relating to "can't resolve multiple constant drivers".
There are no other obvious errors, eg. I can send Signal1 to the LED and it works fine.
Obviously I'm not implementing a simple edge triggered latch correctly, assistance would be much appreciated. TIA