core: fix bugs of sram_controller