Libre RISC-V Mailing list Archives (accessible via public-inbox)
 help / color / Atom feed
From: Paul Mackerras <paulus@ozlabs.org>
To: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
Cc: openpower-hdl-cores@mailinglist.openpowerfoundation.org,
	Libre-RISCV General Development
	<libre-riscv-dev@lists.libre-riscv.org>
Subject: Re: [libre-riscv-dev] [OpenPOWER-HDL-Cores] microwatt decoder tables: M-Form and X-Form switched RS and RB
Date: Tue, 2 Jun 2020 09:13:11 +1000
Message-ID: <20200601231311.GA428673@thinks.paulus.ozlabs.org> (raw)
In-Reply-To: <CAPweEDz9S=HXwnZqiQ9YtsiseGw6Do5qJnPE9kCjSjmozTWqVQ@mail.gmail.com>

Hi Luke,

On Mon, Jun 01, 2020 at 01:20:45PM +0100, Luke Kenneth Casson Leighton wrote:
> anton, paul, and team, hi,
> 
> we noticed that in microwatt decode1.vhdl tables, M-Form has:
> 
> * op1 is RA
> * op2 is a constant or RB, which is in the *3rd* field (M-Form) position
> * op3 is RS, which is in the *second* Form position
> 
> where in X-Form it is:
> 
> * op1 is RA
> * op2 is a constant or RB, where RB is from the *2nd* field
> * op3 is RS (or RC), which is in the 3rd position.

I'm not quite following, sorry.  When you talk about the second or
third position or field, are you talking about where they are in the
instruction word (and if so, are you counting left to right, or right
to left), or are you talking about the input_reg_a/b/c entries in
microwatt's decode tables?

If you're talking about positions in the instruction word, then either
I'm misunderstanding your paragraph about X-form above, or it is
incorrect, because instructions such as "and" and "or" take their
inputs from RS and RB, so op1 is not RA for them, though it is for the
arithmetic instructions.

(I asked some of the original Power architects why there was this
nonuniformity in the Power ISA where rotate and logical instructions
use RS and RB as their inputs, whereas arithmetic instructions use RA
and RB as inputs.  The answer was that in the Power1 implementation,
they were very short of gates, so they made the logic for rotating and
masking data for store instructions also serve as the logic for doing
the rotate and mask instructions.  Since stores take their data from
RS, that meant that the rotate and shift instructions also took the
data to be rotated or shifted from RS.)

Regards,
Paul.

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

  reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-01 12:20 [libre-riscv-dev] " Luke Kenneth Casson Leighton
2020-06-01 23:13 ` Paul Mackerras [this message]
2020-06-02  0:01   ` Luke Kenneth Casson Leighton
2020-06-02 12:10     ` Luke Kenneth Casson Leighton
2020-06-03  0:40       ` [libre-riscv-dev] [OpenPOWER-HDL-Cores] " Paul Mackerras
2020-06-03  1:28         ` Luke Kenneth Casson Leighton

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=20200601231311.GA428673@thinks.paulus.ozlabs.org \
    --to=paulus@ozlabs.org \
    --cc=libre-riscv-dev@lists.libre-riscv.org \
    --cc=lkcl@lkcl.net \
    --cc=openpower-hdl-cores@mailinglist.openpowerfoundation.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

Libre RISC-V Mailing list Archives (accessible via public-inbox)

Archives are clonable: git clone --mirror https://inbox.libre-soc.org/libre-riscv-dev

Example config snippet for mirrors


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git