summaryrefslogtreecommitdiffstats
path: root/hdl/decoder.vhd
diff options
context:
space:
mode:
authorVäinö Kauppila <vaino@vke.fi>2026-04-19 19:02:42 +0300
committerVäinö Kauppila <vaino@vke.fi>2026-04-19 19:02:42 +0300
commit46e1210381106707c2df7f07c56023eb6b760763 (patch)
tree6740a17199f76e2965a511dafcbc7ffb61ceafeb /hdl/decoder.vhd
parenteb8643ddbef43547eb7bfe58789a3908926c7258 (diff)
downloadvhdl_pic-46e1210381106707c2df7f07c56023eb6b760763.tar.gz
vhdl_pic-46e1210381106707c2df7f07c56023eb6b760763.zip
BSRAM progmem. fix Makefile memory command that does not work. add interrupts, bank 1, timer0. Timer0 not tested.
Diffstat (limited to 'hdl/decoder.vhd')
-rw-r--r--hdl/decoder.vhd7
1 files changed, 4 insertions, 3 deletions
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