Article View: comp.arch
Article #617Re: vector length CSR?
From: EricP
Date: Mon, 09 Nov 2026 23:39
Date: Mon, 09 Nov 2026 23:39
68 lines
3726 bytes
3726 bytes
On 2026-Nov-09 02:29, Robert Finch wrote: > ; Pedantic (work in progress) > ; If the number of GPR registers per vector register is 3. > ; The core translates with micro-ops: > > vadd %r1,%r8,%r16 > > ; into > add %r1,%r8,%r16 ; records lane #1 in the instruction > add %r2,%r9,%r17 ; records lane #2 in the instruction > add %r3,%r10,%r18 > > ; which it can then distribute to three different pipelines > ; and execute in parallel. (no dependencies). > > ; Translating with micro-ops happens in the front-end after > ; the instruction is extracted from the cache line. > ; Therefore, there are no register values available yet, > ; therefore the vector length cannot be set dynamically > ; at high speed. It is possible to change the length but > ; it takes a lot of clock cycles. Suggested to use mask > ; register instead. > > vaddm %r1,%r8,%r16,%r4 ; r4 contains mask > > ; translates into (source arg #3 is always scalar) masked add > addm %r1,%r8,%r16,%r4 ; records lane #1 in the instruction > addm %r2,%r9,%r17,%r4 ; records lane #2 in the instruction > addm %r3,%r10,%r18,%r4 > > ; if the elements remaining is less than the number of elements > ; in a vector register > ; the follwoing generates a mask (alias for bitfield set insn) > > vmfill %r4,$0,$ele_remaining > > ; It is possible to use a simple instruction sequence to > ; generate the mask. > ; eg 12 elements in 3 regs > > minu %r5,$12,%r6 ; where r6 is counting down # ele > set %r4,$0,$0,%r5,$-1 ; vmfill %r4,$0,%r5 > sub %r6,%r6,%r5 ; count down # ele > bne %r5,$0,.loop_again 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. Like I said, very unbaked. But it makes all the dynamic length adjustments handled by alignment shifters in the register file read and write pathways.
Technical Details
Message-ID:
<YQsIS.6524$wY2.2685@fx24.iad>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer05.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx24.iad.POSTED!not-for-mailReferences:
<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>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer05.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx24.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> Content-Language: en-CA From: EricP <ThatWouldBeTelling@thevillage.com> In-Reply-To: <11crsp0$11gka$1@dont-email.me> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Lines: 68 Message-ID: <YQsIS.6524$wY2.2685@fx24.iad> X-Complaints-To: abuse@UsenetServer.com NNTP-Posting-Date: Mon, 09 Nov 2026 23:39:36 UTC Date: Mon, 9 Nov 2026 18:39:35 -0500 X-Received-Bytes: 3505