Apparently RAM gets implemented in LUTs if the 'if'
clause of driving DOUT doesn't exactly match the
template. So the nested if for write first mode
caused the DUAL_PORT_RAM and ASYNC_FIFO to not be
implemented in block RAM. I corrected that now