Basic event detection in FPGA