I'm working on creating a logic circuit that can detect which of the signals B and C have the first rising edge after a falling edge of signal A. The output should be low if B is first and high if C is first. Only the first edge matters. After the first edge, the output should be hold at least until the next falling edge of A. I have to read the output while signal A is high to control my stuff. The pulse widths are 50 to 300 nanoseconds for B and C, and about 5 µs for signal A. Here's what the pulses look like:
A:
______ ______________________________
|______________________________________| |__________
B:
__ _ _ __ _
__________________| |_______| |_________________| |__________| |_____________| |______
↓
C: ↓
__ __ __ _ ↓ _
_________| |___________| |___________________| |__________| |_______________↓____| |_
↓ ↓
Output: ↓ ↓
↓ ↓
↓_____________________________________________________________________↓
_________| |________
Do you have any idea how to do this with flipflops? I've tried some combinations with D-flipflops but it didn't work.








