diff options
author | Alvaro <alvieboy@alvie.com> | 2010-10-22 18:18:33 +0200 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-10-22 18:18:33 +0200 |
commit | c3a6c5f8c614919982ef31c9e8e324525ce105b1 (patch) | |
tree | b5a0f117286755fee23bd4483a05be5b807698cd | |
parent | 685ce53dfba47bf06a25f2566a157ed5cda8ba1d (diff) | |
download | zpu-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.vhd | 1 |
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';
|