cpu: ext_reg switch bug FIX by markus
[calu.git] / cpu / src / writeback_stage_b.vhd
index 569f2c68ed2e280c0367745ce07ab06ee2aa8d38..6d03873d9dff12c22bf05af03b823dedc84409da 100755 (executable)
@@ -276,7 +276,7 @@ begin
        if (wb_reg.address(DATA_ADDR_WIDTH+3) /= '1') then
                data_out := data_ram_read;
        else
-               reg_we_v := reg_we_v and ext_anysel;
+               reg_we_v := reg_we_v and (ext_anysel or not(wb_reg.dmem_en));
                data_out := data_ram_read_ext;
        end if;