Do not plute ram_wb with functions in synthesis

Move the helper functions for Verilator inside the ifdef.
This will make Xilinx Vivado infer block RAMs for the module.