summaryrefslogtreecommitdiffstats
path: root/hdl/dpram.vhd
diff options
context:
space:
mode:
authorVäinö Kauppila <vaino@vke.fi>2026-04-19 20:16:18 +0300
committerVäinö Kauppila <vaino@vke.fi>2026-04-19 20:16:18 +0300
commit29c81849a0993dcf7f9927ae2aa97839ec2f8337 (patch)
tree97da63dd9465ca67c964dee1aaa742f0ac9f7fcc /hdl/dpram.vhd
parent46e1210381106707c2df7f07c56023eb6b760763 (diff)
downloadvhdl_pic-29c81849a0993dcf7f9927ae2aa97839ec2f8337.tar.gz
vhdl_pic-29c81849a0993dcf7f9927ae2aa97839ec2f8337.zip
interrupts working now with timer
Diffstat (limited to 'hdl/dpram.vhd')
-rw-r--r--hdl/dpram.vhd4
1 files changed, 2 insertions, 2 deletions
diff --git a/hdl/dpram.vhd b/hdl/dpram.vhd
index 92b57f2..6cbc338 100644
--- a/hdl/dpram.vhd
+++ b/hdl/dpram.vhd
@@ -164,7 +164,7 @@ begin
if we = '1' then
if addr = "00000000" or
addr = "10000000" then -- 0x00/0x80 INDF: indirect via FSR
- mem(16#03#) <= d_status;
+ mem(16#03#) <= mem(16#03#)(7 downto 3) & d_status(2 downto 0);
mem(to_integer(unsigned(mem(16#04#)))) <= d;
elsif addr = "00000001" then -- 0x01 TMR0: routed to timer0, not RAM
mem(16#03#) <= mem(16#03#)(7 downto 3) & d_status(2 downto 0);
@@ -183,7 +183,7 @@ begin
-- peripheral-mapped addresses: don't write to RAM
mem(16#03#) <= mem(16#03#)(7 downto 3) & d_status(2 downto 0);
else
- mem(16#03#) <= d_status;
+ mem(16#03#) <= mem(16#03#)(7 downto 3) & d_status(2 downto 0);
mem(to_integer(unsigned(addr))) <= d;
end if;
end if;