🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #688

Re: vector length CSR?

#688
From: EricP
Date: Fri, 13 Nov 2026 15:28
99 lines
6718 bytes
On 2026-Nov-12 15:43, Robert Finch wrote:
> On 2026-11-12 3:06 p.m., EricP wrote:
>> On 2026-Nov-10 04:03, Anton Ertl wrote:
>>> EricP <ThatWouldBeTelling@thevillage.com> writes:
>>>> I'm not sure what I'm thinking as this idea is very un-baked
>>>> but maybe the Mill's belt concept could be useful.
>>>>
>>>> Instead of treating the register file as 32 32-byte SIMD registers,
>>>> what if it was a 1024 byte belt. A variable byte length LDV Load Vector
>>>> copies a memory vector onto the belt such that element[0] lands in belt[0].
>>>> Source operands use a 10 bit belt byte offset,
>>>> and dynamic vector length of up to 32 bytes.
>>>>
>>>> Internally its implemented as a circular buffer,
>>>> with byte alignment shifters to right-align (little endian)
>>>> the source operands as they are read for each operation.
>>>>
>>>> There is no renaming because the belt output inherently
>>>> rotates the the whole belt. Internally that would just be
>>>> an byte vector alignment shifter applied to the destination.
>>>
>>> The disadvantage of a belt is that stuff vanishes from the belt (or
>>> you have to preserve it by regularly copying from the end of the belt
>>> to the beginning, so you do not get the advantage of a vector
>>> register, that you can reuse its content as often as you like without
>>> additional costs (useful, e.g., in matrix multiplication).
>>>
>>> IIRC there are vector instruction sets (maybe even RVV?) that
>>> can have more shorter or fewer longer vector registers.
>>>
>>> - anton
>>
>> Just playing around with this belt idea a bit more...
>>
>> Yes it needs other registers. So say it has
>> 32 scalar 64-bit registers that can hold integer or float values,
>> plus a 32 slot belt with 64-bit values,
>> plus 32 vector registers of 8kB each, each with a byte count,
>> and the vectors can be interpreted as 1, 2, 4 or 8 byte elements.
>>
>> Each vector instruction can source its operands from scalar, belt,
>> or vector registers. If it is a vector register then it is implied
>> that the current vector loop counter is the index to the element.
>> The result output goes to belt[0] or belt[1:0] if 128 bit result.
>> To save a belt value it must be copied to scalar, or vector register
>> at the current index, or recycled to belt[0], or to memory.
>>
>> So the belt becomes the equivalent of a forwarding network for
>> vector calculation temporaries that don't need to be saved.
>>
>> Not sure where I'm headed with this... just thinking out loud.
>>
>>
> IDK how the belt works. Sounds like a familiar architecture with a conveyor belt of operands bolted on? When does the belt advance? At one point I was trying to re-organize the re-order buffer like a belt. Queueing at one end and committing at the other. The idea was to use a shift register for the re-order buffer.

Its like an accumulator register in that it is the default result output register
but it has multiple slots that logically act like a shift register array.
As each new result is output the one at the far end falls off the belt.
Like a regular register file it is logically committed when a result is written out.

Internally it can be implemented as a shift register, or as a circular buffer,
or as a fixed physical register file with a circular renamer.

The difference is in the programming model.
A regular scalar RF (SRF) uses absolute register number addressing
while a belt register file (BRF) uses relative addressing.

With SRF when you write to R1 and that's where the result stays.
If you want to retain R1 for a later loop iteration then you have to copy it
to R2 or unroll a loop and assign a different register to each iteration.

With BRF each result is saved to belt[0] and older ones shift up.
If the belt is 32 slots then belt[31] falls off and is lost unless saved first.
One way to save a belt result is by copying back to the start belt[0].
A reference a source slot is the Nth result ago.

A belt's behaviour is inherently circular. I've not programmed a belt,
or written any vector code, but it struck me that this circular result
naming model might be more in line with how vector loops work.

In a sense this is what Mitch's VVM is doing, taking absolute SRF register id's
and renaming them into a circle as the Nth result ago, then assigning those
slots to specific reservation stations.

> Thinking about the dichotomy of vector registers versus integer and float-point ones. Why do vector registers accept either float or integer values while the integer and floating-point register files are kept separate?

In OoO either way works - an ISA can have a single unified scalar architectural
register file but internally have separate physical RF for integer and float,
with a single unified rename table. Or an ISA can have separate int and float
architectural registers but a unified physical RF with separate rename tables.

For in-order designs, having separate architecture RF gives programs a larger
register address space to work with and avoid spills. With 32 registers that
is not as necessary but with 16 or 8 registers it is very important.

> I bin planning on just using a single massive physical register file for everything. Just changing the logical register tags to fake separate register files. But there is going to be separate register files viewable in the ISA. IDK if to have separate register files for vector integers and vector floats though. Why not add even more separate register files for decimal-floats and posits too?
> 

Technical Details
Message-ID: <_0GJS.4474$3J2.869@fx02.iad>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer04.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx02.iad.POSTED!not-for-mail
References: <11cpqih$acf5$1@dont-email.me> <11cr2g5$q796$2@dont-email.me> <11crh64$ug0s$1@dont-email.me> <11crili$ur2d$1@dont-email.me> <11crrs5$118ll$1@dont-email.me> <11crsp0$11gka$1@dont-email.me> <YQsIS.6524$wY2.2685@fx24.iad> <2026Nov10.100317@mips.complang.tuwien.ac.at> <V_oJS.3483$453.1577@fx23.iad> <11d58dp$9i0o$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer04.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx02.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: vector length CSR?
Newsgroups: comp.arch
References: <11cpqih$acf5$1@dont-email.me> <11cr2g5$q796$2@dont-email.me>
 <11crh64$ug0s$1@dont-email.me> <11crili$ur2d$1@dont-email.me>
 <11crrs5$118ll$1@dont-email.me> <11crsp0$11gka$1@dont-email.me>
 <YQsIS.6524$wY2.2685@fx24.iad> <2026Nov10.100317@mips.complang.tuwien.ac.at>
 <V_oJS.3483$453.1577@fx23.iad> <11d58dp$9i0o$1@dont-email.me>
Content-Language: en-CA
From: EricP <ThatWouldBeTelling@thevillage.com>
In-Reply-To: <11d58dp$9i0o$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 99
Message-ID: <_0GJS.4474$3J2.869@fx02.iad>
X-Complaints-To: abuse@UsenetServer.com
NNTP-Posting-Date: Fri, 13 Nov 2026 15:28:58 UTC
Date: Fri, 13 Nov 2026 10:28:56 -0500
X-Received-Bytes: 6497