C# and Verilog code for FPGA based PMT counter