🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

4 total messages Started by John Savard Mon, 30 Nov 2026 22:32
Concertina IV: Another Crazy Idea
#994
Author: John Savard
Date: Mon, 30 Nov 2026 22:32
66 lines
4069 bytes
If something is impossible, any idea which claims to be for doing that
which is impossible is, by definition, crazy.
Ideas which don't meet this criterion can also be crazy, though, for a
number of other reasons.

I wished to design an ISA with the property that the processor can
quickly decode instructions without reference to preceding
instructions. This is possible, for example, in the case of an ISA
where every instruction is the same length, such as exactly 32 bits
long.

But I also wanted to include instructions with immediate values in
code, because I agreed with Mitch Alsup's claim that this adds
significantly to efficiency.

Concertina II harmonized these conflicting requirements by placing
instructions in 256-bit blocks. Once the block header, if any, is
processed, the processor knows all the places where decoding can begin
in the block. If there is no header, all the instructions are 32 bits
long exactly.

Concertina III, in its present form, begins any 32 bits not to be
decoded as the start of an instruction with a particular bit pattern.
This means that while immediates are allowed, they're not fully
contiguous, they have to be broken up to go around those bit patterns.

I can't have fully contiguous immediates of arbitrary length, and have
a short interval where the instruction stream is scanned for decoding,
if I refuse to allow a fraction of a picowatt to ever be wasted
mistakenly decoding data as an instruction.

But can I at least _approach_ contiguous immediated more closely?

So here's my crazy idea, which is intended to provide the "next best
thing" to fully contiguous immediates.

A 32-bit operate instruction may have an immediate value as an
argument. If so, that immediate will be broken up into 16-bit pieces,
each of which is placed in the rightmost and least significant portion
of one of the subsequent 32-bit words in the instruction stream.

The leftmost and most significant portion of those 32-bit words...
will contain instructions. With special bit patterns starting them,
indicating if they begin or merely continue an instruction, and that
they only fill the first 16 bits of the current 32-bit instruction
word.

This has some wrinkles.

The instructions in the upper 16 bits will be 32 bits long. So I'll
have an odd 16 bits left over if I allow 48-bit immediates to use this
scheme. But I have instructions with 16-bit immediates entirely in the
first 32 bits, so I could use that same scheme to begin a 48-bit
immediate. Except there isn't enough opcode space to use that pattern
a second time...

Also, if I want to use an immediate to load a base register, then I
would have to use a memory-reference instruction immediately
following. This is a problem, because the method of putting
instructions into the first 16 bits only has room for a subset of the
instructions - excluding memory-reference instructions.
One way around that would be to allow an instruction or two to be
inserted between an instruction with an immediate and its immediate
value.

John Savard
Re: Concertina IV: Another Crazy Idea
#997
Author: John Savard
Date: Tue, 01 Dec 2026 00:13
19 lines
1902 bytes
On Mon, 30 Nov 2026 22:32:51 GMT, quadibloc@invalid.com (John Savard)
wrote:

>The instructions in the upper 16 bits will be 32 bits long. So I'll
>have an odd 16 bits left over if I allow 48-bit immediates to use this
>scheme. But I have instructions with 16-bit immediates entirely in the
>first 32 bits, so I could use that same scheme to begin a 48-bit
>immediate. Except there isn't enough opcode space to use that pattern
>a second time...

I was able to find the opcode space with which to deal with this.

So now my only remaining concern is how I squeeze in instructions
longer than 32 bits. But while I need some opcode space for the upper
16 bit encodings, I think I can split that half and half between them
and longer instructions. Since I won't need to include immediates in
the longer instructions, they will require less.

John Savard
Re: Concertina IV: Another Crazy Idea
#999
Author: John Savard
Date: Tue, 01 Dec 2026 06:44
7 lines
1361 bytes
This scheme is obviously weird. And weirdness is an obstacle to
adoption.
So if this is the best I can do, it suggests that the way to go is to
drop the requirement to be able to decode in parallel, and just go to
an ordinary set of variable-length instructions.

John Savard
Re: Concertina IV: Another Crazy Idea
#1014
Author: MitchAlsup
Date: Wed, 02 Dec 2026 00:46
11 lines
1270 bytes
quadibloc@invalid.com (John Savard) posted:

> This scheme is obviously weird. And weirdness is an obstacle to
> adoption.
> So if this is the best I can do, it suggests that the way to go is to
> drop the requirement to be able to decode in parallel, and just go to
> an ordinary set of variable-length instructions.

VLE does not have to harm parallel decode and issue. I have evidence.
 
> John Savard
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads