Frequency Measurement using FPGA and VHDL
Here you have someone who did that, in this case it uses 2 asynchronous gated counters, one from the reference, one from the signal, they are gated by a third counter fed form the ref, the precision of the measurement can be set by adjusting the gate comparator threshold.
all implemented with an fpga and a micro controller (plus some auxiliary circuitry which you may or not use)

https://andybrown.me.uk/2016/02/21/nanocounter/