From 46e1210381106707c2df7f07c56023eb6b760763 Mon Sep 17 00:00:00 2001 From: Väinö Kauppila Date: Sun, 19 Apr 2026 19:02:42 +0300 Subject: BSRAM progmem. fix Makefile memory command that does not work. add interrupts, bank 1, timer0. Timer0 not tested. --- hdl/decoder.vhd | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'hdl/decoder.vhd') diff --git a/hdl/decoder.vhd b/hdl/decoder.vhd index 5a1eb2c..07e785d 100644 --- a/hdl/decoder.vhd +++ b/hdl/decoder.vhd @@ -63,8 +63,9 @@ package body decoder is pure function instruction_get_class(opc : std_logic_vector(13 downto 0)) return instruction_class_t is begin - -- RETURN (0x0008) has bits[13:12]="00" but must be treated as LITERAL_OP + -- RETURN (0x0008) and RETFIE (0x0009) have bits[13:12]="00" if opc = "00000000001000" then return LITERAL_OP; end if; + if opc = "00000000001001" then return LITERAL_OP; end if; case opc(13 downto 12) is -- byte-oriented file-register operations when "00" => @@ -130,8 +131,8 @@ package body decoder is when LITERAL_OP => -- fixed full-word patterns first (fall inside 00xx space) - -- if opc(11 downto 0) = "000000000001" then return RETFIE; - if opc(11 downto 0) = "000000001000" then return RETUR; + if opc(11 downto 0) = "000000001001" then return RETFIE; + elsif opc(11 downto 0) = "000000001000" then return RETUR; -- elsif opc(11 downto 0) = "000000000011" then return SLEEP; -- elsif opc(11 downto 0) = "000000000100" then return CLRWDT; else -- cgit v1.3