D
David Bridgham
Guest
I have a question about how FPGAs handle signals into combinational
logic. I have following setup:
always @(posedge interrupt_check) interrupt_detect <= interrupt_request;
assign interrupt_ack = interrupt_request & enable;
The interrupt_request signal may happen at any time relative to
interrupt_check so I know that interrupt_detect may be metastable for a
bit. However, enable is guaranteed to be asserted a minimum of 150ns
after interrupt_check so it ought to hold interrupt_ack low until
interrupt_detect is stable.
And there's my question. Will the AND gate implementation in an FPGA do
that? Or are LUTs odd enough that I can't depend on it? If the answer
is FPGA specific, I'm using an Artix 7 FPGA.
I've considered "fixing" this by changing the AND gate to a flop with:
always @(posedge enable) interrupt_ack <= interrupt_detect;
but that has the problem that I'm left looking for a signal to clear
that flop at the right time. I want to clear it when enable goes low
again but that's not allowed.
Thanks for any insight,
Dave
logic. I have following setup:
always @(posedge interrupt_check) interrupt_detect <= interrupt_request;
assign interrupt_ack = interrupt_request & enable;
The interrupt_request signal may happen at any time relative to
interrupt_check so I know that interrupt_detect may be metastable for a
bit. However, enable is guaranteed to be asserted a minimum of 150ns
after interrupt_check so it ought to hold interrupt_ack low until
interrupt_detect is stable.
And there's my question. Will the AND gate implementation in an FPGA do
that? Or are LUTs odd enough that I can't depend on it? If the answer
is FPGA specific, I'm using an Artix 7 FPGA.
I've considered "fixing" this by changing the AND gate to a flop with:
always @(posedge enable) interrupt_ack <= interrupt_detect;
but that has the problem that I'm left looking for a signal to clear
that flop at the right time. I want to clear it when enable goes low
again but that's not allowed.
Thanks for any insight,
Dave