From: Mike Frysinger <vapier@gentoo.org>
To: Jiri Gaisler <jiri@gaisler.se>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v5 5/9] sim/erc32: Add support for LEON3 processor emulation.
Date: Sun, 19 Apr 2015 06:54:00 -0000 [thread overview]
Message-ID: <20150419065429.GE17952@vapier> (raw)
In-Reply-To: <1428093356-7296-6-git-send-email-jiri@gaisler.se>
[-- Attachment #1: Type: text/plain, Size: 3499 bytes --]
On 03 Apr 2015 22:35, Jiri Gaisler wrote:
> --- /dev/null
> +++ b/sim/erc32/README.leon3
>
> +The following registers are implemeted:
"implemented"
might want to run a spell checker over the whole file
+Cypress C601 and C602. The simulator is cycle true, i.e a simulator time is
"cycle accurate" ?
> --- a/sim/erc32/erc32.c
> +++ b/sim/erc32/erc32.c
>
> +memory_read_asi (int32 asi, uint32 addr, uint32 *data, int32 sz, int32 *ws)
> +{
> + return memory_read (addr, data, sz, ws);
correct indentation level is 2 spaces here
> +static int
> +memory_write_asi (int32 asi, uint32 addr, uint32 *data, int32 sz, int32 *ws)
> +{
> + return memory_write (addr, data, sz, ws);
2 spaces
> + if (length == 4) {
> + memory_read (addr, &w4, length, &ws);
> + memcpy(data, &w4, length);
can you scan your patches and make sure you're using space before the (
> + else if ( 17 == rd ) {
> + if (sparclite)
> + sregs->asr17 = (rs1 ^ operand2);
> + }
> + else if ( 19 == rd ) {
drop the spaces with these if statements:
else if (17 == rd) {
> +/* Vendors */
please scan all the new code to make sure the comment style is GNU
> --- a/sim/erc32/sis.h
> +++ b/sim/erc32/sis.h
> @@ -154,6 +154,29 @@ struct irqcell {
> int32 arg;
> };
>
> +struct memsys {
> + void (*init_sim) (void);
> + void (*reset) (void);
> + void (*error_mode) (uint32 pc);
> + void (*sim_halt) (void);
> + void (*exit_sim) (void);
> + void (*init_stdio) (void);
> + void (*restore_stdio) (void);
> + int (*memory_iread) (uint32 addr, uint32 *data, int32 *ws);
> + int (*memory_read) (uint32 addr, uint32 *data,
> + int32 sz, int32 *ws);
> + int (*memory_read_asi) (int32 asi, uint32 addr, uint32 *data,
> + int32 sz, int32 *ws);
> + int (*memory_write) (uint32 addr, uint32 *data,
> + int32 sz, int32 *ws);
> + int (*memory_write_asi) (int32 asi, uint32 addr, uint32 *data,
> + int32 sz, int32 *ws);
> + int (*sis_memory_write) (uint32 addr,
> + const unsigned char *data, uint32 length);
> + int (*sis_memory_read) (uint32 addr, char *data,
> + uint32 length);
> + void (*boot_init) (void);
> +};
>
> #define OK 0
> #define TIME_OUT 1
> @@ -235,23 +260,7 @@ extern void set_fsr (uint32 fsr);
> extern void usage (void);
> extern void gen_help (void);
>
> -struct memsys {
> - void (*init_sim) (void);
> - void (*reset) (void);
> - void (*error_mode) (uint32 pc);
> - void (*sim_halt) (void);
> - void (*exit_sim) (void);
> - void (*init_stdio) (void);
> - void (*restore_stdio) (void);
> - int (*memory_iread) (uint32 addr, uint32 *data, int32 *ws);
> - int (*memory_read) (int32 asi, uint32 addr, uint32 *data,
> - int32 sz, int32 *ws);
> - int (*memory_write) (int32 asi, uint32 addr, uint32 *data,
> - int32 sz, int32 *ws);
> - int (*sis_memory_write) (uint32 addr,
> - const unsigned char *data, uint32 length);
> - int (*sis_memory_read) (uint32 addr, char *data,
> - uint32 length);
> -};
you just added this struct in a previous patch. if it wasn't in the right
place, then please squash this move into that patch instead.
-mike
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-04-19 6:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-03 20:36 [PATCH v5 0/9] Update of the SPARC SIS simulator Jiri Gaisler
2015-04-03 20:36 ` [PATCH v5 7/9] sim/erc32: Updated documentation Jiri Gaisler
2015-04-03 20:36 ` [PATCH v5 1/9] sim/erc32: Switched emulated memory to host endian order Jiri Gaisler
2015-04-19 6:35 ` Mike Frysinger
2015-04-03 20:36 ` [PATCH v5 8/9] sim/erc32: Add data watchpoint support Jiri Gaisler
2015-04-19 7:04 ` Mike Frysinger
2015-04-03 20:36 ` [PATCH v5 9/9] Add watchpoint support to gdb simulator interface Jiri Gaisler
2015-04-03 20:36 ` [PATCH v5 5/9] sim/erc32: Add support for LEON3 processor emulation Jiri Gaisler
2015-04-19 6:54 ` Mike Frysinger [this message]
2015-04-03 20:36 ` [PATCH v5 4/9] sim/erc32: Move local extern declarations into sis.h Jiri Gaisler
2015-04-19 6:46 ` Mike Frysinger
2015-04-03 20:36 ` [PATCH v5 3/9] sim/erc32: Access memory subsystem through struct memsys Jiri Gaisler
2015-04-19 6:44 ` Mike Frysinger
2015-04-03 20:36 ` [PATCH v5 6/9] sim/erc32: Add support for LEON2 processor emulation Jiri Gaisler
2015-04-19 6:56 ` Mike Frysinger
2015-04-03 20:36 ` [PATCH v5 2/9] sim/erc32: Use gdb callback for UART I/O when linked with gdb Jiri Gaisler
2015-04-19 6:39 ` 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=20150419065429.GE17952@vapier \
--to=vapier@gentoo.org \
--cc=gdb-patches@sourceware.org \
--cc=jiri@gaisler.se \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).