summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlvaro <alvieboy@alvie.com>2010-10-22 18:18:33 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-10-22 18:18:33 +0200
commitc3a6c5f8c614919982ef31c9e8e324525ce105b1 (patch)
treeb5a0f117286755fee23bd4483a05be5b807698cd
parent685ce53dfba47bf06a25f2566a157ed5cda8ba1d (diff)
downloadzpu-c3a6c5f8c614919982ef31c9e8e324525ce105b1.zip
zpu-c3a6c5f8c614919982ef31c9e8e324525ce105b1.tar.gz
zpu_core_small: load
memAAddr is not being initialized during IO read operations (LOAD). This might cause spurious writes to invalid addresses, and invalid values to be loaded onto the stack. This patch explicitly sets memAAddr to correct value (sp).
-rw-r--r--zpu/hdl/zpu4/core/zpu_core_small.vhd1
1 files changed, 1 insertions, 0 deletions
diff --git a/zpu/hdl/zpu4/core/zpu_core_small.vhd b/zpu/hdl/zpu4/core/zpu_core_small.vhd
index f9484bb..681fb09 100644
--- a/zpu/hdl/zpu4/core/zpu_core_small.vhd
+++ b/zpu/hdl/zpu4/core/zpu_core_small.vhd
@@ -494,6 +494,7 @@ begin
null;
end case;
when State_ReadIO =>
+ memAAddr <= sp;
if (in_mem_busy = '0') then
state <= State_Fetch;
memAWriteEnable <= '1';
OpenPOWER on IntegriCloud