From: Dimitar Dimitrov <dimitar@dinux.eu>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v5 1/2] PRU Simulator port
Date: Sat, 31 Aug 2019 08:13:00 -0000 [thread overview]
Message-ID: <23752374.gxGJgHr7so@tpdeb> (raw)
In-Reply-To: <20190828121134.GR6076@embecosm.com>
On Wed, 28 Aug 2019, 15:11:34 EEST Andrew Burgess wrote:
> * Dimitar Dimitrov <dimitar@dinux.eu> [2019-08-26 07:08:16 +0300]:
> > I'd like to contribute a sim port for the TI PRU I/O processor. This
> > is the fifth version of the patch series.
> >
> > The GCC and binutils ports have already been merged. I've sent
> > patches for newlib.
> >
> > Changes since patch series v4:
> > - Rebased to latest top-of-tree.
> > - Added XCHG instruction support.
> >
> > v1: https://sourceware.org/ml/gdb-patches/2016-12/msg00143.html
> > v2: https://sourceware.org/ml/gdb-patches/2017-02/msg00397.html
> > v3: https://sourceware.org/ml/gdb-patches/2017-02/msg00516.html
> > v4: https://sourceware.org/ml/gdb-patches/2018-06/msg00484.html
>
> Thanks for sticking with the patch over the years! I built and tested
> this, and all the tests passed. I have a few (hopefully) minor nits,
> but this is all looking pretty good.
Thank you for the review. I'll resubmit v6 to address all your comments.
>
...
>
> > * configure: Regenerate.
>
> This file appears to be missing from the patch.
Unfortunaly the autogenerated configure file is rather large. I'll send it as a separate patch.
>
...
> > + the performance of the simulator. Simulation speed is deemed more
> > + important. */
> > +
> > +/* Please keep the same order as the GP registers. */
>
> It isn't clear to me where the order in "... same order as the GP
> registers" comes from. Is this order defined in the ISA? Defined in
> some other file in GDB or the simulator? Could you expand on this
> comment maybe?
This enum order is purely easthetical and has no functional impact.
I hope the following C comment would sched some light. If it causes too
much confusion, I can altogether remove the comment. The relevant ISA
documentation can be found on page 31, section 5.2.3.2 in
https://elinux.org/images/d/da/Am335xPruReferenceGuide.pdf .
+/* For clarity, please keep the same relative order in this enum as in the
+ corresponding group of GP registers.
+
+ In PRU ISA, Multiplier-Accumulator-Unit's registers are like "shadows" of
+ the GP registers. MAC registers are implicitly addressed when executing
+ the XIN/XOUT instructions to access them. Transfer to/from a MAC register
+ can happen only from/to its corresponding GP peer register. */
+
+enum pru_macreg_id {
+ /* MAC register CPU GP register Description. */
+ PRU_MACREG_MODE, /* r25 */ /* Mode (MUL/MAC). */
+ PRU_MACREG_PROD_L, /* r26 */ /* Lower 32 bits of product. */
+ PRU_MACREG_PROD_H, /* r27 */ /* Higher 32 bits of product. */
+ PRU_MACREG_OP_0, /* r28 */ /* First operand. */
+ PRU_MACREG_OP_1, /* r29 */ /* Second operand. */
+ PRU_MACREG_ACC_L, /* N/A */ /* Accumulator (not exposed) */
+ PRU_MACREG_ACC_H, /* N/A */ /* Higher 32 bits of MAC
+ accumulator. */
+ PRU_MAC_NREGS
+};
>
> > +enum pru_macreg_id {
> > + PRU_MACREG_MODE, /* r25 */
> > + PRU_MACREG_PROD_L, /* r26 */
> > + PRU_MACREG_PROD_H, /* r27 */
> > + PRU_MACREG_OP_0, /* r28 */
> > + PRU_MACREG_OP_1, /* r29 */
> > + PRU_MACREG_ACC_L, /* N/A */
> > + PRU_MACREG_ACC_H, /* N/A */
> > + PRU_MAC_NREGS
> > +};
> > +
Regards,
Dimitar
next prev parent reply other threads:[~2019-08-31 8:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-26 4:08 Dimitar Dimitrov
2019-08-26 4:08 ` [PATCH v5 2/2] Add testsuite for the PRU simulator port Dimitar Dimitrov
2019-08-28 12:21 ` Andrew Burgess
2019-08-28 12:11 ` [PATCH v5 1/2] PRU Simulator port Andrew Burgess
2019-08-31 8:13 ` Dimitar Dimitrov [this message]
2019-08-28 12:17 ` Andrew Burgess
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=23752374.gxGJgHr7so@tpdeb \
--to=dimitar@dinux.eu \
--cc=andrew.burgess@embecosm.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