Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

win-nt from the people who invented edlin. -- MaDsen Wikholm, mwikholm@at8.abo.fi


computers / comp.sys.raspberry-pi / Re: Pi Zero (2) VPU clock frequency and instruction set

SubjectAuthor
* Pi Zero (2) VPU clock frequency and instruction setComputer Nerd Kev
+* Re: Pi Zero (2) VPU clock frequency and instruction setA. Dumas
|`* Re: Pi Zero (2) VPU clock frequency and instruction setComputer Nerd Kev
| `* Re: Pi Zero (2) VPU clock frequency and instruction setA. Dumas
|  `- Re: Pi Zero (2) VPU clock frequency and instruction setComputer Nerd Kev
`* Re: Pi Zero (2) VPU clock frequency and instruction setTheo
 `- Re: Pi Zero (2) VPU clock frequency and instruction setComputer Nerd Kev

1
Pi Zero (2) VPU clock frequency and instruction set

<6369e840@news.ausics.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=6132&group=comp.sys.raspberry-pi#6132

  copy link   Newsgroups: comp.sys.raspberry-pi
Message-ID: <6369e840@news.ausics.net>
From: not...@telling.you.invalid (Computer Nerd Kev)
Subject: Pi Zero (2) VPU clock frequency and instruction set
Newsgroups: comp.sys.raspberry-pi
User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/2.4.31 (i686))
NNTP-Posting-Host: news.ausics.net
Date: 8 Nov 2022 15:25:20 +1000
Organization: Ausics - https://www.ausics.net
Lines: 23
X-Complaints: abuse@ausics.net
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!news.ausics.net!not-for-mail
 by: Computer Nerd Kev - Tue, 8 Nov 2022 05:25 UTC

The VPU is a processor core in the Pi's GPU. I've been messing
around with trying to execute code on it for precise timing (no
interrupts etc. from Linux).

After much research online, I've got two questions still
unanswered. I can probably get by without answers to them, but it's
annoying because they seem basic.

1) Is there a specification for the VPU clock frequency of the Pi
Zero and Zero 2 stated somewhere? All that I've found is 400MHz
on the Raspberry Pi Wikipedia page, but that's unreferenced so I
don't really trust it.

2) Is this really the only copy of the instruction set (the
public Broadcom documentation doesn't cover the VPU)?
https://github.com/hermanhermitage/videocoreiv/wiki/VideoCore-IV-Programmers-Manual
The formatting isn't very easy to read as a quick reference.
This instruction set should be common to all the Pi models
pre-Pi4.

--
__ __
#_ < |\| |< _#

Re: Pi Zero (2) VPU clock frequency and instruction set

<tkd3l0$3s7hh$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=6133&group=comp.sys.raspberry-pi#6133

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: alexan...@dumas.fr.invalid (A. Dumas)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Pi Zero (2) VPU clock frequency and instruction set
Date: Tue, 8 Nov 2022 09:22:56 +0100
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <tkd3l0$3s7hh$1@dont-email.me>
References: <6369e840@news.ausics.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 8 Nov 2022 08:22:56 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="b6f0e797b4eff759b19b698101d17c8e";
logging-data="4070961"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+wMMsNGgs3cclUdC0U5PqMAIZAh9J9zRo="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.4.1
Cancel-Lock: sha1:U8Duh2rrpTHMUVXmgXqDmit1QRk=
Content-Language: en-GB
In-Reply-To: <6369e840@news.ausics.net>
 by: A. Dumas - Tue, 8 Nov 2022 08:22 UTC

On 08-11-2022 06:25, Computer Nerd Kev wrote:
> 1) Is there a specification for the VPU clock frequency of the Pi
> Zero and Zero 2 stated somewhere? All that I've found is 400MHz
> on the Raspberry Pi Wikipedia page, but that's unreferenced so I
> don't really trust it.

It's variable. See e.g. here (first google hit so presumably you've seen
this? so then maybe I don't understand the scope of your question)
https://forums.raspberrypi.com/viewtopic.php?t=281840

As always, "jamesh" is not particularly helpful.

Re: Pi Zero (2) VPU clock frequency and instruction set

<C1q*VXO2y@news.chiark.greenend.org.uk>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=6134&group=comp.sys.raspberry-pi#6134

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!aioe.org!nntp.terraraq.uk!nntp-feed.chiark.greenend.org.uk!ewrotcd!.POSTED.chiark.greenend.org.uk!not-for-mail
From: theom+n...@chiark.greenend.org.uk (Theo)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Pi Zero (2) VPU clock frequency and instruction set
Date: 08 Nov 2022 10:38:52 +0000 (GMT)
Organization: University of Cambridge, England
Message-ID: <C1q*VXO2y@news.chiark.greenend.org.uk>
References: <6369e840@news.ausics.net>
Injection-Info: chiark.greenend.org.uk; posting-host="chiark.greenend.org.uk:212.13.197.229";
logging-data="10538"; mail-complaints-to="abuse@chiark.greenend.org.uk"
User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (Linux/5.10.0-15-amd64 (x86_64))
Originator: theom@chiark.greenend.org.uk ([212.13.197.229])
 by: Theo - Tue, 8 Nov 2022 10:38 UTC

Computer Nerd Kev <not@telling.you.invalid> wrote:
> 2) Is this really the only copy of the instruction set (the
> public Broadcom documentation doesn't cover the VPU)?
> https://github.com/hermanhermitage/videocoreiv/wiki/VideoCore-IV-Programmers-Manual
> The formatting isn't very easy to read as a quick reference.
> This instruction set should be common to all the Pi models
> pre-Pi4.

It's reverse engineered, and Herman is the one who did the reverse
engineering (~2014 or so). So I'm not surprised that it's the only
documentation.

I see there are some QPU assemblers but not sure if anyone has written any
toolchain for the VPU. If so, they might have the ISA better represented.

Theo

Re: Pi Zero (2) VPU clock frequency and instruction set

<636ac906@news.ausics.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=6135&group=comp.sys.raspberry-pi#6135

  copy link   Newsgroups: comp.sys.raspberry-pi
Message-ID: <636ac906@news.ausics.net>
From: not...@telling.you.invalid (Computer Nerd Kev)
Subject: Re: Pi Zero (2) VPU clock frequency and instruction set
Newsgroups: comp.sys.raspberry-pi
References: <6369e840@news.ausics.net> <tkd3l0$3s7hh$1@dont-email.me>
User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/2.4.31 (i586))
NNTP-Posting-Host: news.ausics.net
Date: 9 Nov 2022 07:24:22 +1000
Organization: Ausics - https://www.ausics.net
Lines: 27
X-Complaints: abuse@ausics.net
Path: i2pn2.org!rocksolid2!news.neodome.net!csiph.com!news.bbs.nz!news.ausics.net!not-for-mail
 by: Computer Nerd Kev - Tue, 8 Nov 2022 21:24 UTC

A. Dumas <alexandre@dumas.fr.invalid> wrote:
> On 08-11-2022 06:25, Computer Nerd Kev wrote:
>> 1) Is there a specification for the VPU clock frequency of the Pi
>> Zero and Zero 2 stated somewhere? All that I've found is 400MHz
>> on the Raspberry Pi Wikipedia page, but that's unreferenced so I
>> don't really trust it.
>
> It's variable. See e.g. here (first google hit so presumably you've seen
> this? so then maybe I don't understand the scope of your question)
> https://forums.raspberrypi.com/viewtopic.php?t=281840

If I saw it, I probably assumed it was a false result because I
didn't realise that the "core" frequency is also the VPU clock
frequency (I vagely associated it with the peripheral controllers,
which seems also to be correct).

Now I've found what I was looking for in the Overclocking section
of the config.txt docs, where it indeed lists the core_freq setting
as being 400Mhz by default on both Pi Zero models.

https://www.raspberrypi.com/documentation/computers/config_txt.html

Thanks!

--
__ __
#_ < |\| |< _#

Re: Pi Zero (2) VPU clock frequency and instruction set

<636acfc6@news.ausics.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=6136&group=comp.sys.raspberry-pi#6136

  copy link   Newsgroups: comp.sys.raspberry-pi
Message-ID: <636acfc6@news.ausics.net>
From: not...@telling.you.invalid (Computer Nerd Kev)
Subject: Re: Pi Zero (2) VPU clock frequency and instruction set
Newsgroups: comp.sys.raspberry-pi
References: <6369e840@news.ausics.net> <C1q*VXO2y@news.chiark.greenend.org.uk>
User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/2.4.31 (i586))
NNTP-Posting-Host: news.ausics.net
Date: 9 Nov 2022 07:53:11 +1000
Organization: Ausics - https://www.ausics.net
Lines: 51
X-Complaints: abuse@ausics.net
Path: i2pn2.org!rocksolid2!news.neodome.net!csiph.com!news.bbs.nz!news.ausics.net!not-for-mail
 by: Computer Nerd Kev - Tue, 8 Nov 2022 21:53 UTC

Theo <theom+news@chiark.greenend.org.uk> wrote:
> Computer Nerd Kev <not@telling.you.invalid> wrote:
>> 2) Is this really the only copy of the instruction set (the
>> public Broadcom documentation doesn't cover the VPU)?
>> https://github.com/hermanhermitage/videocoreiv/wiki/VideoCore-IV-Programmers-Manual
>> The formatting isn't very easy to read as a quick reference.
>> This instruction set should be common to all the Pi models
>> pre-Pi4.
>
> It's reverse engineered, and Herman is the one who did the reverse
> engineering (~2014 or so). So I'm not surprised that it's the only
> documentation.

I was hoping that someone had at least rearranged the info into
more of a table structure, like you'd get from a chip manufacturer
that doesn't insist on keeping most of their docs soopa secret.
There are a handful of example assembly routines out there that
people have written for the VPU. It seems like some would have been
very hard to write with only a reference like that, but maybe
everyone just makes their own version and keeps it to themselves,
or they're just vastly better at remembering instruction sets
than me.

On the other hand I read that it's based on ARM, so maybe there are
some rules by which you can easily tell which ARM instructions are
valid or equivalent for the VPU?

> I see there are some QPU assemblers but not sure if anyone has written any
> toolchain for the VPU. If so, they might have the ISA better represented.

Sure, I've found three so far, and I have gone looking though the
sources of some in the hope of finding useful comments, but so far
I've just seen lists of instruction names without descriptions of
what they do.

https://github.com/itszor/vc4-toolchain
https://github.com/christinaa/LLVM-VideoCore4
http://www.compilers.de/vbcc.html

Really everything I want to do is in the examples anyway, but a
convenient instruction set reference would make things easier and
probably save some guesswork.

Or I could use one of those toolchains and write the code in C,
but I suspect that might just introduce more uncertainties because
none of them claim to be near release-quality. Plus I'm starting
with something very simple anyway.

--
__ __
#_ < |\| |< _#

Re: Pi Zero (2) VPU clock frequency and instruction set

<tkfn6s$6217$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=6137&group=comp.sys.raspberry-pi#6137

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: alexan...@dumas.fr.invalid (A. Dumas)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Pi Zero (2) VPU clock frequency and instruction set
Date: Wed, 9 Nov 2022 09:09:00 +0100
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <tkfn6s$6217$1@dont-email.me>
References: <6369e840@news.ausics.net> <tkd3l0$3s7hh$1@dont-email.me>
<636ac906@news.ausics.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 9 Nov 2022 08:09:00 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="274d77e430489796a9a53fdf3796f219";
logging-data="198695"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Vg3XPqZ01M3nlq5WJ3gSEaZGbqYYIzKI="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.4.1
Cancel-Lock: sha1:iLsd4yK0DkAwCAjL3JhFYsKarl8=
In-Reply-To: <636ac906@news.ausics.net>
Content-Language: en-GB
 by: A. Dumas - Wed, 9 Nov 2022 08:09 UTC

On 08-11-2022 22:24, Computer Nerd Kev wrote:
> https://www.raspberrypi.com/documentation/computers/config_txt.html

Ah yes. But I'd be wary of its variability. At a minimum (heh), set the
core_freq_min to be the same, I suppose.

And will enabling the mini-uart override that and chug it in 250 MHz
anyway? Who knows.

Re: Pi Zero (2) VPU clock frequency and instruction set

<636c2207@news.ausics.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=6138&group=comp.sys.raspberry-pi#6138

  copy link   Newsgroups: comp.sys.raspberry-pi
Message-ID: <636c2207@news.ausics.net>
From: not...@telling.you.invalid (Computer Nerd Kev)
Subject: Re: Pi Zero (2) VPU clock frequency and instruction set
Newsgroups: comp.sys.raspberry-pi
References: <6369e840@news.ausics.net> <tkd3l0$3s7hh$1@dont-email.me> <636ac906@news.ausics.net> <tkfn6s$6217$1@dont-email.me>
User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/2.4.31 (i586))
NNTP-Posting-Host: news.ausics.net
Date: 10 Nov 2022 07:56:23 +1000
Organization: Ausics - https://www.ausics.net
Lines: 34
X-Complaints: abuse@ausics.net
Path: i2pn2.org!i2pn.org!news.niel.me!tncsrv06.tnetconsulting.net!news.bbs.nz!news.ausics.net!not-for-mail
 by: Computer Nerd Kev - Wed, 9 Nov 2022 21:56 UTC

A. Dumas <alexandre@dumas.fr.invalid> wrote:
> On 08-11-2022 22:24, Computer Nerd Kev wrote:
>> https://www.raspberrypi.com/documentation/computers/config_txt.html
>
> Ah yes. But I'd be wary of its variability. At a minimum (heh), set the
> core_freq_min to be the same, I suppose.

Good point, I'm not sure how the "dynamic frequency clocking" works
for the GPU, but I'll set that to 400 and hope that stops it. It
sounds like it's only enabled when the CPU is in frequency scaling
mode as well.

> And will enabling the mini-uart override that and chug it in 250 MHz
> anyway? Who knows.

Well for me the main thing is just to know that it will run at the
same speed on both the original Pi Zero and the Pi Zero 2 in the
same configuration, so it gives me more confidence with that.
Compared to the Wikipedia page where I worried that someone could
have just guessed that it was the same as the old model.

But now I've got a 1MHz square wave generator program running on
the VPU, so actually it's easy enough to measure any difference now
anyway.

I see now that the VPUs seem to be known as the "GPU Core" in
RPi the docs, whereas the GPU itself seems to refer to the QPUs.
It's especially confusing given that some VideoCore IV GPUs exist
without a VPU (the one that Broadcom released the docs for), so
those are a VideoCore without a core.

--
__ __
#_ < |\| |< _#

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor