fixed encoder to not immediately start encoding or writing to the FIFO before getting valid insns
created testbench up to encoder programming