[raspi-internals] Re: Some more VPU instructions

  • From: David Barker <david@xxxxxxxxxxxxxxxxx>
  • To: raspi-internals@xxxxxxxxxxxxx
  • Date: Sun, 22 May 2016 07:59:01 +0100

Dear Herman,

Ah! Yeah, I went with "These look similar to the conditional arithmetic instructions, so they should probably be changed in the same way". I don't have an easy testing setup right now, so if you've done the testing I'll drop those instructions.

Regards,
David

On 22/05/16 00:15, Herman Hermitage wrote:

Hi David,

Looks great to me.

One question:

< # Conditional with 5 bit displacement
< 1010 0000 ww0 d:5 a:5 c:4 10 u:5 ld<w><cc> rd, u(ra) if (<cc>) rd = *(ra+u)
< 1010 0000 ww1 d:5 a:5 c:4 10 u:5 st<w><cc> rd, u(ra) if (<cc>) *(ra+u) = d

> # Conditional with 6 bit displacement
> 1010 0000 ww0 d:5 a:5 c:4 1 i:6 ld<w><cc> rd, i(ra) if (<cc>) rd = *(ra+i)
> 1010 0000 ww1 d:5 a:5 c:4 1 i:6 st<w><cc> rd, i(ra) if (<cc>) *(ra+i) = d

I actually had these instructions scheduled for removal. Whilst the encoding looks like it would fit and your version looks more 'correct' than the existing one, they were actually both marked as "test" in the videocoreiv.arch file.

I added them as a test case to an "undefined instructions" program I have, and they both seem to raise exception 0x03 (undefined instructions). Hard to fathom, given the following exist:

# Conditional with indexed
1010 0000 ww0 d:5 a:5 c:4 00 b:5 ld<w><cc> rd, (ra, rb) if (<cc>) rd = *(ra+rb*width)
1010 0000 ww1 d:5 a:5 c:4 00 b:5 st<w><cc> rd, (ra, rb) if (<cc>) *(ra+rb*width) = d

But there you have it.

Did you base the change from 10 u:5 to 1 i:6 based on testing an instruction, or what looks right on paper?

Its a strange one.

Cheers
Herman.

------------------------------------------------------------------------
Subject: [raspi-internals] Re: Some more VPU instructions
To: raspi-internals@xxxxxxxxxxxxx
From: david@xxxxxxxxxxxxxxxxx
Date: Sat, 21 May 2016 14:43:16 +0100

Hi Herman,

I've made a fork of your project and added my findings to that version. While I was at it, I found an opportunity to tidy up the presentation of the 32-bit scalar arithmetic section.

The current version with my changes is here: https://github.com/psi-squared/videocoreiv/wiki/VideoCore-IV-Programmers-Manual . I would appreciate feedback (even if it's just "looks good to me") before I make the changes 'officially'.

Regards,
David

On 19/05/16 01:33, Herman Hermitage wrote:

    Hi David,

    Terrific!  Just added you.

    With Justin doing great work on binutils/gcc and Kristina et al
    pushing on with open firmware, its a perfect time to consolidate
    knowledge of the VPU instruction set.

    I've begun digging out scraps of my notes/files from as far back
    as 2013 and reviewing them to add to the wiki/repo.  It would be
    nice to switch to a markup at some stage that supports nice pdf or
    man page generation.

    It's a great time to get this nailed and binutils/gcc to the same
    level.

    Cheers
    Herman

    > From: david@xxxxxxxxxxxxxxxxx <mailto:david@xxxxxxxxxxxxxxxxx>
    > Subject: [raspi-internals] Re: Some more VPU instructions
    > To: raspi-internals@xxxxxxxxxxxxx
    <mailto:raspi-internals@xxxxxxxxxxxxx>
    > Date: Wed, 18 May 2016 17:37:52 +0100
    >
    > Hi Herman,
    >
    > Note: I'm the same David Barker who started this thread, just
    with a new
    > email address.
    >
    > I'm currently back at university, so I don't have access to Argon
    > Design's GitHub account any more. However, I got in contact and
    they
    > said they're happy for me to add my findings to the videocoreiv
    wiki
    > using my personal GitHub account.
    >
    > So, if you also add my account (psi-squared) to the wiki, I can
    help out
    > with updating the instruction set listings. Apologies for the
    hassle!
    >
    > Regards,
    > David
    >
    > > From: Herman Hermitage <hermanhermitage@xxxxxxxxxxx>
    > > To: "raspi-internals@xxxxxxxxxxxxx"
    <raspi-internals@xxxxxxxxxxxxx>
    > > Subject: [raspi-internals] Re: Some more VPU instructions
    > > Date: Fri, 6 May 2016 13:56:10 +1200
    > >
    > > David,
    > > Better late than never. Just added you to the github for
    videocoreiv.I'm
    > > planning an update to the .arch and wiki page this weekend -
    weather
    > > permitting.
    > > On that note, anyone that needs access to the wiki to assist in
    > > corrections /
    > > clarifications, feel free to send a pull request and/or request
    > > explicit access.
    > > The docs could certainly do with some clarifications and
    corrections.
    > > Regards
    > >
    > >> From: david.barker@xxxxxxxxxxxxxxx
    > >> To: raspi-internals@xxxxxxxxxxxxx
    > >> Subject: [raspi-internals] Re: Some more VPU instructions
    > >> Date: Mon, 8 Sep 2014 16:11:34 +0000
    > >>
    > >> Hi Herman,
    > >>
    > >> I think it would make the most sense to make the changes from
    the
    > >> company
    > >> Github account. The username for that is ArgonDesign.
    > >>
    > >> I’ve also been planning to do some personal work with the
    VPUs, so I
    > >> might very
    > >> well write some of those sample programs. That would be
    independent
    > >> from Argon
    > >> Design, so it would be posted from my personal Github
    account. That’s
    > >> assuming
    > >> I get time, of course.
    > >>
    > >> In reply to David Given: Ah yes, you’re right that 0x005A is
    just an
    > >> alias for
    > >> ‘b lr’. However, I’ve seen that name used in the sample
    program on
    > >> Herman’s
    > >> wiki, and I still feel it makes sense to have a special “return”
    > >> mnemonic. And if I
    > >> get around to any further investigation, I’ll definitely try
    to fill
    > >> out the
    > >> gaps in the instruction tables. Though I’m not too confident
    of finding
    > >> anything – everyone else seems to have done a pretty good job
    already!
    > >>
    > >> Regards,
    > >> David Barker
    > >
    >



Other related posts: