From c231e6fbb4876ff512be460e60451c77c7caab69 Mon Sep 17 00:00:00 2001 From: Joshua Wise Date: Sun, 11 May 2008 08:41:52 -0400 Subject: [PATCH] DAA compile fixes, and PROGFLASH addr increment fix --- System.v | 4 ++++ core/insn_alu_a.v | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/System.v b/System.v index e0baebe..f89b2a6 100644 --- a/System.v +++ b/System.v @@ -137,6 +137,10 @@ module CellularRAM( progaddr <= {progaddrh[6:0], progaddrm[7:0], progaddrl[7:0]}; {progaddrh[6:0], progaddrm[7:0], progaddrl[7:0]} <= {progaddrh[6:0], progaddrm[7:0], progaddrl[7:0]} + 23'b1; end + ADDR_PROGFLASH: if (rd || wr) begin + progaddr <= {progaddrh[6:0], progaddrm[7:0], progaddrl[7:0]}; + {progaddrh[6:0], progaddrm[7:0], progaddrl[7:0]} <= {progaddrh[6:0], progaddrm[7:0], progaddrl[7:0]} + 23'b1; + end ADDR_MBC: begin mbc_emul <= data; rambank <= 0; diff --git a/core/insn_alu_a.v b/core/insn_alu_a.v index 80d317d..3d7e917 100644 --- a/core/insn_alu_a.v +++ b/core/insn_alu_a.v @@ -38,7 +38,7 @@ `INSN_alu_DAA: begin if (`_F[6]) begin if (`_F[4]) begin - if(`_A[3:0] >= 4'h6 && `_A[7:4] >= 4'h6 && `F[5]) begin + if(`_A[3:0] >= 4'h6 && `_A[7:4] >= 4'h6 && `_F[5]) begin `_A <= `_A + 8'h9A; `_F <= {((`_A + 8'h9A) == 8'b0), `_F[6:0]}; end @@ -63,7 +63,7 @@ `_A <= `_A + 8'h66; `_F <= {((`_A + 8'h66) == 8'b0), `_F[6:0]}; end - else if (`_A[3:0] > 4'b9) begin + else if (`_A[3:0] > 4'h9) begin `_A <= `_A + 8'h66; `_F <= {((`_A + 8'h66) == 8'b0), `_F[6:0]}; end -- 2.43.0