rx_data should be a latch
fix timing error
fix type width error