From: James Bowman <james.bowman@ftdichip.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: [PATCH, FT32] sim: correctly simulate PM write port
Date: Mon, 28 Sep 2015 23:50:00 -0000 [thread overview]
Message-ID: <CA9BBF0458F83C4F9051448B941B57D11961FBDD@glaexch3> (raw)
The FT32 simulator was not correctly simulating the behavior of the
program memory (PM) write port. This patch fixes it.
OK to apply?
[sim/ft32]
2015-09-28 James Bowman <james.bowman@ftdichip.com>
* interp.c (cpu_mem_write): fix PM write port
behavior
diff --git a/sim/ft32/interp.c b/sim/ft32/interp.c
index a20907c..83328c8 100644
--- a/sim/ft32/interp.c
+++ b/sim/ft32/interp.c
@@ -205,8 +205,12 @@ static void cpu_mem_write (SIM_DESC sd, uint32_t dw, uint32_t ea, uint32_t d)
cpu->state.pm_addr = d;
break;
case 0x1fc88:
- /* Write to PM */
- ft32_write_item (sd, dw, cpu->state.pm_addr, d);
+ if (cpu->state.pm_unlock)
+ {
+ /* Write to PM */
+ ft32_write_item (sd, dw, cpu->state.pm_addr, d);
+ cpu->state.pm_addr += 4;
+ }
break;
case 0x1fffc:
/* Normal exit. */
next reply other threads:[~2015-09-28 23:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-28 23:50 James Bowman [this message]
2015-09-29 4:02 ` Mike Frysinger
2015-09-29 5:05 ` James Bowman
2015-09-30 3:37 ` Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA9BBF0458F83C4F9051448B941B57D11961FBDD@glaexch3 \
--to=james.bowman@ftdichip.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox