Not a bug but your enable signals are mistakenly named write_enb and read_enb Usually signal names ending with letter 'b' or 'n' means the signal is active with a low logic level. You should rename your enables 'write_en' and 'read_en' instead.