summaryrefslogtreecommitdiffstats
path: root/hdl
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
parent46e1210381106707c2df7f07c56023eb6b760763 (diff)
downloadvhdl_pic-29c81849a0993dcf7f9927ae2aa97839ec2f8337.tar.gz
vhdl_pic-29c81849a0993dcf7f9927ae2aa97839ec2f8337.zip
interrupts working now with timer
Diffstat (limited to 'hdl')
-rw-r--r--hdl/dpram.vhd4
-rw-r--r--hdl/state_machine.vhd2
2 files changed, 3 insertions, 3 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;
diff --git a/hdl/state_machine.vhd b/hdl/state_machine.vhd
index 1fb5291..33d2f33 100644
--- a/hdl/state_machine.vhd
+++ b/hdl/state_machine.vhd
@@ -216,7 +216,7 @@ begin
we_mem <= '1';
end if;
when LITERAL_OP =>
- if instr.op /= NOP and instr.op /= RETUR then
+ if instr.op /= NOP and instr.op /= RETUR and instr.op /= RETFIE then
we_w <= '1';
end if;
when others => null;