• vector length CSR?

    From Robert Finch@robfi680@gmail.com to comp.arch on Sun Nov 8 07:39:44 2026
    From Newsgroup: comp.arch

    I tried asking the web-browser this and it returned a bunch of links to introduction to vectors.

    Am I right in thinking that the vector length and element size are
    basically stable throughout an application? If so, they can be stored in
    a config register. Otherwise, if they need to be changeable on a dynamic
    basis they would have to be processed like a GPR with renaming etc.
    Updating a CSR is rather slow as updates do not take place until commit
    time.

    ATM the config is just wired directly into the micro-op translate stage
    which would have really poor performance if things need to be modified
    on the fly.

    I looked at the RISCV vector extension model and they have it just as a
    CSR. Makes me think that is an acceptable solution.


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From George Neuner@gneuner2@comcast.net to comp.arch on Sun Nov 8 09:02:18 2026
    From Newsgroup: comp.arch

    On Sun, 8 Nov 2026 07:39:44 -0500, Robert Finch <robfi680@gmail.com>
    wrote:

    I tried asking the web-browser this and it returned a bunch of links to >introduction to vectors.

    Am I right in thinking that the vector length and element size are
    basically stable throughout an application?

    Certainly not.

    Element width may remain stable across many operations, but you can
    expect that different widths may be needed at different times.

    Vector lengths, however, often change frequently.


    If so, they can be stored in a config register.

    If you are referring to a separate (Cray style) vector processor, or
    to a streaming unit, the width and length would be in setup registers
    in any case.


    Otherwise, if they need to be changeable on a dynamic
    basis they would have to be processed like a GPR with renaming etc.
    Updating a CSR is rather slow as updates do not take place until commit >time.

    You can't change the setup while the vector unit is operating anyway.
    However, there is no reason changes can't be queued to happen as soon
    as the unit is finished.


    ATM the config is just wired directly into the micro-op translate stage >which would have really poor performance if things need to be modified
    on the fly.

    "On the fly" meaning what? You can't change the setup /while/ the
    vector unit is in operation.

    Needing to frequently change element widths and/or vector lengths is
    the domain of the short-vector SIMD many chips now have.


    I looked at the RISCV vector extension model and they have it just as a
    CSR. Makes me think that is an acceptable solution.

    It is for the case where the vector unit is separate and asynchronous.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Robert Finch@robfi680@gmail.com to comp.arch on Sun Nov 8 10:03:01 2026
    From Newsgroup: comp.arch

    On 2026-11-08 9:02 a.m., George Neuner wrote:
    On Sun, 8 Nov 2026 07:39:44 -0500, Robert Finch <robfi680@gmail.com>
    wrote:

    I tried asking the web-browser this and it returned a bunch of links to
    introduction to vectors.

    Am I right in thinking that the vector length and element size are
    basically stable throughout an application?

    Certainly not.

    Ugh.

    Element width may remain stable across many operations, but you can
    expect that different widths may be needed at different times.

    Vector lengths, however, often change frequently.


    If so, they can be stored in a config register.

    If you are referring to a separate (Cray style) vector processor, or
    to a streaming unit, the width and length would be in setup registers
    in any case.


    Otherwise, if they need to be changeable on a dynamic
    basis they would have to be processed like a GPR with renaming etc.
    Updating a CSR is rather slow as updates do not take place until commit
    time.

    You can't change the setup while the vector unit is operating anyway. However, there is no reason changes can't be queued to happen as soon
    as the unit is finished.


    ATM the config is just wired directly into the micro-op translate stage
    which would have really poor performance if things need to be modified
    on the fly.

    "On the fly" meaning what? You can't change the setup /while/ the
    vector unit is in operation.



    Needing to frequently change element widths and/or vector lengths is
    the domain of the short-vector SIMD many chips now have.


    I looked at the RISCV vector extension model and they have it just as a
    CSR. Makes me think that is an acceptable solution.

    It is for the case where the vector unit is separate and asynchronous.

    I did not realize that was the use case for RISCV.


    Brain dump design issues. Qupls is not going to have a separate
    asynchronous vector unit. Vectors are supported using the GPR register
    file by hiding the issuing of multiple instructions behind the scenes
    and relying on parallelism in the OoO design.

    How vectors are supported in Qupls may need re-thinking. The vector
    length is being used to set the number of 64-bit registers needed to
    represent a vector at the micro-op encoding stage, before the register
    file is read. That cannot be done ff the length has to change
    frequently. Using a fixed number of registers might be better. For
    frequent changes the config would end up being passed around as another operand to vector instructions. Making the core larger = slower.

    It is a toss-up I think. Using a fixed number of registers will occupy
    more execution units, mean more micro-ops will be fetched and dispatched
    and slow things down. On the other hand waiting 20 cycles or so for the
    length changes to percolate through the pipeline is not fast either.

    May have both static length settings and dynamic length settings then.
    Using the static setting to set a maximum before the app is running and
    using dynamic lengths while executing code. Static length would set the
    number of micro-ops needed per vector instruction. Dynamic length would
    set the vector masking.

    Maybe too complex to understand, having two different length settings.

    Vector masking could be used to control the vector length dynamically.
    Rather than change the vector length, change the masking.


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From MitchAlsup@user5857@newsgrouper.org.invalid to comp.arch on Sun Nov 8 18:20:04 2026
    From Newsgroup: comp.arch

    Robert Finch <robfi680@gmail.com> posted:

    I tried asking the web-browser this and it returned a bunch of links to introduction to vectors.

    Am I right in thinking that the vector length and element size are
    basically stable throughout an application?

    Consider Gaussian Elimination, the length of the loop goes down
    by 1 every loop.

    If so, they can be stored in
    a config register. Otherwise, if they need to be changeable on a dynamic basis they would have to be processed like a GPR with renaming etc.

    Get ready to change them every entry to top-of-loop.
    Most CRAY-like vector units have a length-this-time register that
    is decremented by vector-register-length every vector-iteration.
    On the last iteration, it is used to create a mask of elements
    that are not going to be calculated.

    Updating a CSR is rather slow as updates do not take place until commit time.

    ATM the config is just wired directly into the micro-op translate stage which would have really poor performance if things need to be modified
    on the fly.

    I looked at the RISCV vector extension model and they have it just as a
    CSR. Makes me think that is an acceptable solution.

    It can be, so long as it performs decrement-by-vector-length all
    by itself ...
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Robert Finch@robfi680@gmail.com to comp.arch on Sun Nov 8 13:59:43 2026
    From Newsgroup: comp.arch

    On 2026-11-08 1:20 p.m., MitchAlsup wrote:
    Robert Finch <robfi680@gmail.com> posted:

    I tried asking the web-browser this and it returned a bunch of links to
    introduction to vectors.

    Am I right in thinking that the vector length and element size are
    basically stable throughout an application?

    Consider Gaussian Elimination, the length of the loop goes down
    by 1 every loop.

    okay

    If so, they can be stored in
    a config register. Otherwise, if they need to be changeable on a dynamic
    basis they would have to be processed like a GPR with renaming etc.

    Get ready to change them every entry to top-of-loop.
    Most CRAY-like vector units have a length-this-time register that
    is decremented by vector-register-length every vector-iteration.
    On the last iteration, it is used to create a mask of elements
    that are not going to be calculated.

    I think this may be okay handled with a mask. The Q+ vector registers
    are not super wide. The max is 512 bits. The length could be
    decremented, then a mask shifted right if the length is less than the
    number of registers in use. There would be basically NOP operations on
    the last iteration. -> could add an instruction to conditionally shift
    right if a < b.

    Updating a CSR is rather slow as updates do not take place until commit
    time.

    ATM the config is just wired directly into the micro-op translate stage
    which would have really poor performance if things need to be modified
    on the fly.

    I looked at the RISCV vector extension model and they have it just as a
    CSR. Makes me think that is an acceptable solution.

    It can be, so long as it performs decrement-by-vector-length all
    by itself ...

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From EricP@ThatWouldBeTelling@thevillage.com to comp.arch on Sun Nov 8 15:40:34 2026
    From Newsgroup: comp.arch

    On 2026-Nov-08 10:03, Robert Finch wrote:
    On 2026-11-08 9:02 a.m., George Neuner wrote:
    On Sun, 8 Nov 2026 07:39:44 -0500, Robert Finch <robfi680@gmail.com>
    wrote:

    I tried asking the web-browser this and it returned a bunch of links to
    introduction to vectors.

    Am I right in thinking that the vector length and element size are
    basically stable throughout an application?

    Certainly not.

    Ugh.

    Element width may remain stable across many operations, but you can
    expect that different widths may be needed at different times.

    Vector lengths, however, often change frequently.


    If so, they can be stored in a config register.

    If you are referring to a separate (Cray style) vector processor, or
    to a streaming unit, the width and length would be in setup registers
    in any case.


    Otherwise, if they need to be changeable on a dynamic
    basis they would have to be processed like a GPR with renaming etc.
    Updating a CSR is rather slow as updates do not take place until commit
    time.

    You can't change the setup while the vector unit is operating anyway.
    However, there is no reason changes can't be queued to happen as soon
    as the unit is finished.


    ATM the config is just wired directly into the micro-op translate stage
    which would have really poor performance if things need to be modified
    on the fly.

    "On the fly" meaning what?-a You can't change the setup /while/ the
    vector unit is in operation.



    Needing to frequently change element widths and/or vector lengths is
    the domain of the short-vector SIMD many chips now have.


    I looked at the RISCV vector extension model and they have it just as a
    CSR. Makes me think that is an acceptable solution.

    It is for the case where the vector unit is separate and asynchronous.

    I did not realize that was the use case for RISCV.


    Brain dump design issues. Qupls is not going to have a separate asynchronous vector unit. Vectors are supported using the GPR register file by hiding the issuing of multiple instructions behind the scenes and relying on parallelism in the OoO design.

    How vectors are supported in Qupls may need re-thinking. The vector length is being used to set the number of 64-bit registers needed to represent a vector at the micro-op encoding stage, before the register file is read. That cannot be done ff the length has to change frequently.-a Using a fixed number of registers might be better. For frequent changes the config would end up being passed around as another operand to vector instructions. Making the core larger = slower.

    It is a toss-up I think. Using a fixed number of registers will occupy more execution units, mean more micro-ops will be fetched and dispatched and slow things down. On the other hand waiting 20 cycles or so for the length changes to percolate through the pipeline is not fast either.

    May have both static length settings and dynamic length settings then. Using the static setting to set a maximum before the app is running and using dynamic lengths while executing code. Static length would set the number of micro-ops needed per vector instruction. Dynamic length would set the vector masking.

    Maybe too complex to understand, having two different length settings.

    Vector masking could be used to control the vector length dynamically. Rather than change the vector length, change the masking.


    I've been looking at some docs on a RV-Vector unit called Saturn
    that sounds similar to what you describe - mapping dynamic
    vector length and width onto available hardware.

    While browsing arxiv the paper on the scheduler that caught my eye as it sounded similar to Mitch's VVM and I have been backtracking on the topic.
    But I haven't read them closely yet so I could be way off.

    Anyway here are some PDF links:

    The Saturn Microarchitecture Manual, 2024 https://www2.eecs.berkeley.edu/Pubs/TechRpts/2024/EECS-2024-215.html

    Design Techniques for Specialized Short-Vector Machines, 2025 https://escholarship.org/uc/item/1tv3m0vb

    Instruction Scheduling in the Saturn Vector Unit, 2024 https://arxiv.org/abs/2412.00997



    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From George Neuner@gneuner2@comcast.net to comp.arch on Sun Nov 8 18:17:42 2026
    From Newsgroup: comp.arch

    On Sun, 8 Nov 2026 10:03:01 -0500, Robert Finch <robfi680@gmail.com>
    wrote:

    On 2026-11-08 9:02 a.m., George Neuner wrote:
    On Sun, 8 Nov 2026 07:39:44 -0500, Robert Finch <robfi680@gmail.com>
    wrote:

    I tried asking the web-browser this and it returned a bunch of links to
    introduction to vectors.

    Am I right in thinking that the vector length and element size are
    basically stable throughout an application?

    Certainly not.

    Ugh.

    Element width may remain stable across many operations, but you can
    expect that different widths may be needed at different times.

    Vector lengths, however, often change frequently.


    If so, they can be stored in a config register.

    If you are referring to a separate (Cray style) vector processor, or
    to a streaming unit, the width and length would be in setup registers
    in any case.


    Otherwise, if they need to be changeable on a dynamic
    basis they would have to be processed like a GPR with renaming etc.
    Updating a CSR is rather slow as updates do not take place until commit
    time.

    You can't change the setup while the vector unit is operating anyway.
    However, there is no reason changes can't be queued to happen as soon
    as the unit is finished.


    ATM the config is just wired directly into the micro-op translate stage
    which would have really poor performance if things need to be modified
    on the fly.

    "On the fly" meaning what? You can't change the setup /while/ the
    vector unit is in operation.



    Needing to frequently change element widths and/or vector lengths is
    the domain of the short-vector SIMD many chips now have.


    I looked at the RISCV vector extension model and they have it just as a
    CSR. Makes me think that is an acceptable solution.

    It is for the case where the vector unit is separate and asynchronous.

    I did not realize that was the use case for RISCV.

    I don't know anything about RISCV ... I was speaking generally.

    Any unit might have (hidden) control registers that need to be set for
    a particular operation to be performed. In fact, most do.

    The reason to have /visible/ setup registers is to allow for
    operations that run asynchronously and automatically. Generally you
    need at least to describe the input and what to do if there is an
    error ... typically much more information than can be packed into a
    CPU instruction.


    E.g., consider a DMA transfer: source address, target address,
    transfer width, transfer count.

    Ok, /maybe/ that's a 4 source instruction, but more likely it is 4
    mmap registers on your DMA unit that have to be set.

    Or if your DMA unit allows chaining, you construct a linked list or
    vector of parameter blocks in RAM, then set registers to point the
    unit to the head of the chain and (if a vector) to tell it how many
    blocks.


    Brain dump design issues. Qupls is not going to have a separate
    asynchronous vector unit. Vectors are supported using the GPR register
    file by hiding the issuing of multiple instructions behind the scenes
    and relying on parallelism in the OoO design.

    How vectors are supported in Qupls may need re-thinking. The vector
    length is being used to set the number of 64-bit registers needed to >represent a vector at the micro-op encoding stage, before the register
    file is read. That cannot be done ff the length has to change
    frequently. Using a fixed number of registers might be better. For
    frequent changes the config would end up being passed around as another >operand to vector instructions. Making the core larger = slower.

    It is a toss-up I think. Using a fixed number of registers will occupy
    more execution units, mean more micro-ops will be fetched and dispatched
    and slow things down. On the other hand waiting 20 cycles or so for the >length changes to percolate through the pipeline is not fast either.

    May have both static length settings and dynamic length settings then.
    Using the static setting to set a maximum before the app is running and >using dynamic lengths while executing code. Static length would set the >number of micro-ops needed per vector instruction. Dynamic length would
    set the vector masking.

    Maybe too complex to understand, having two different length settings.

    Vector masking could be used to control the vector length dynamically. >Rather than change the vector length, change the masking.

    Note that I'm primarily a software person. And I don't know anything
    about your particular design. My own musings follow. Feel free to
    ignore them as I only can consider the problem from the POV of using
    the CPU.


    I understand that you want to stream vectors through your CPU, using
    your general registers to do the processing. Sounds similar to what
    Mitch is trying to achieve with his "My 66000".

    Depending on how many sources (args) per instruction, and whether you
    have only reg->reg or memory loadops, and whether you have full length instruction constants, it seems that vector operations are going to
    require 1 to 3 registers per element.
    [If you can fix the number of registers per element, that will help.]

    Regardless of how many registers (or names) you have, undoubtedly
    there will be vectors that are too long to handle without looping, and
    there will be vectors whose lengths are not integer multiples of
    however many elements an iteration can do in parallel.
    [You always can fall back on 1 element per iteration.]

    The question is how smart you want your CPU to be.


    With vector lengths known at compile time, the compiler can unroll the
    loop to figure out how many iterations of N elements, and handle
    remaining (< N) elements separately. This requires no vector specific
    smarts in your CPU.


    If you want to do the moral equivalent of unrolling at runtime ...
    well that's another thing altogether. I confess that I don't fully
    understand what Mitch is doing, and from your comments above I get the
    idea that you really don't yet know how you want to handle it.

    Obviously, you will need to know how many registers are needed for one
    element - so unless you have some super loop instruction that
    specifies that, you may have to parse the loop body. And you'll need
    to know how many registers are available to use. You probably don't
    want to have to spill things to make room, and you may find you need a
    few registers for loop control: e.g., elements per/this iteration,
    count of remaining elements, perhaps even a separate iteration count.

    I don't really see how you'd use a vector mask. It would work for a
    contiguous vector register file, but since each element is represented
    by a /group/ of GPRs that possibly are subject to discontiguous
    renames, it seems better to predicate the loop body operations based
    on whether they have something to do this iteration. That argues for
    your dispatcher/sequencer to handle each element separately.


    BTW: you didn't mention whether you are register renaming. I hope so,
    because I can't see how you realistically could do runtime unrolling
    without it.


    That's all for now. I have to think about it some more.
    George
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.arch on Mon Nov 9 00:01:09 2026
    From Newsgroup: comp.arch

    On Sun, 8 Nov 2026 07:39:44 -0500, Robert Finch wrote:

    I looked at the RISCV vector extension model and they have it just
    as a CSR. Makes me think that is an acceptable solution.

    RISC-V is going against the prevailing fashion on this. Most other CPU architectures in common use implement loads of SIMD instructions with
    fixed vector lengths that are typically quite short: e.g. 4 or 8
    elements. The reason why you need loads of different instructions is
    because you want to cover all the possible combinations of operand
    types that a programmer might find useful.

    The RISC-V designers quite rightly criticize this combinatorial
    explosion of instruction variants as going completely against the
    whole idea of a *reduced* instruction set computer (which is what
    rCLRISCrCY is supposed to stand for).
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From BGB@cr88192@gmail.com to comp.arch on Sun Nov 8 19:24:38 2026
    From Newsgroup: comp.arch

    On 11/8/2026 6:01 PM, Lawrence DrCOOliveiro wrote:
    On Sun, 8 Nov 2026 07:39:44 -0500, Robert Finch wrote:

    I looked at the RISCV vector extension model and they have it just
    as a CSR. Makes me think that is an acceptable solution.

    RISC-V is going against the prevailing fashion on this. Most other CPU architectures in common use implement loads of SIMD instructions with
    fixed vector lengths that are typically quite short: e.g. 4 or 8
    elements. The reason why you need loads of different instructions is
    because you want to cover all the possible combinations of operand
    types that a programmer might find useful.

    The RISC-V designers quite rightly criticize this combinatorial
    explosion of instruction variants as going completely against the
    whole idea of a *reduced* instruction set computer (which is what
    rCLRISCrCY is supposed to stand for).


    I am in the camp though of thinking that, in the use case where you need
    4 or 8 element vectors, needing to update the state whenever changing to
    a new vector format (more so if pipeline latency is involved) is
    basically shooting oneself in the foot.

    My own leaning is, admittedly, to go the direction of saying that only
    64 and 128 bit SIMD vectors exist with only 2 or 4 elements. Otherwise,
    the SIMD ISA is treated basically the same as the integer ISA.

    But, this is possibly also unpopular...


    The design of RV-V could make more sense though where one has a low
    density of operations, and operations that can effectively utilize
    longer vectors.

    Just, this doesn't tend to match most of my use-cases.

    There are a lot of use cases where one needs a 3 element vector, but
    tradition here is to use a 4 element vector and ignore the last element.

    ...



    Meanwhile... Ironically me writing an AU sci-fi story (imagining a world
    where the IBM PC clone market never happened) had led to me
    experimenting with implementing a Cinepak inspired image/video
    compressor (in the story, the idea is that they mostly use video
    compression technology that evolved out of Cinepak rather than MPEG).

    Well, along with a lot of technological divergence; mostly things still
    using a lot more analog and optical media. No Windows exists (was mostly subsumed into OS/2); with home users mostly running a descendant of the
    Amiga Workbench OS (on top of PowerPC based computers); with no WWW
    stuff (instead a primarily FTP based internet experience), etc.


    Though, to admit, a lot of it is mostly writing down stuff based on
    imagery that is floating around in my head (well, some amount of it
    depicting a world of mostly PowerPC based computers running Workbench
    and people still watching movies and shows off of LaserDisc and similar;
    so I decided to write a story based on this setting...).

    ( Me, trying to avoid just following a short response with an overly
    long detour... )

    ...


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Robert Finch@robfi680@gmail.com to comp.arch on Sun Nov 8 23:00:26 2026
    From Newsgroup: comp.arch

    On 2026-11-08 6:17 p.m., George Neuner wrote:
    On Sun, 8 Nov 2026 10:03:01 -0500, Robert Finch <robfi680@gmail.com>
    wrote:

    On 2026-11-08 9:02 a.m., George Neuner wrote:
    On Sun, 8 Nov 2026 07:39:44 -0500, Robert Finch <robfi680@gmail.com>
    wrote:

    I tried asking the web-browser this and it returned a bunch of links to >>>> introduction to vectors.

    Am I right in thinking that the vector length and element size are
    basically stable throughout an application?

    Certainly not.

    Ugh.

    Element width may remain stable across many operations, but you can
    expect that different widths may be needed at different times.

    Vector lengths, however, often change frequently.


    If so, they can be stored in a config register.

    If you are referring to a separate (Cray style) vector processor, or
    to a streaming unit, the width and length would be in setup registers
    in any case.


    Otherwise, if they need to be changeable on a dynamic
    basis they would have to be processed like a GPR with renaming etc.
    Updating a CSR is rather slow as updates do not take place until commit >>>> time.

    You can't change the setup while the vector unit is operating anyway.
    However, there is no reason changes can't be queued to happen as soon
    as the unit is finished.


    ATM the config is just wired directly into the micro-op translate stage >>>> which would have really poor performance if things need to be modified >>>> on the fly.

    "On the fly" meaning what? You can't change the setup /while/ the
    vector unit is in operation.



    Needing to frequently change element widths and/or vector lengths is
    the domain of the short-vector SIMD many chips now have.


    I looked at the RISCV vector extension model and they have it just as a >>>> CSR. Makes me think that is an acceptable solution.

    It is for the case where the vector unit is separate and asynchronous.

    I did not realize that was the use case for RISCV.

    I don't know anything about RISCV ... I was speaking generally.

    Any unit might have (hidden) control registers that need to be set for
    a particular operation to be performed. In fact, most do.

    The reason to have /visible/ setup registers is to allow for
    operations that run asynchronously and automatically. Generally you
    need at least to describe the input and what to do if there is an
    error ... typically much more information than can be packed into a
    CPU instruction.


    E.g., consider a DMA transfer: source address, target address,
    transfer width, transfer count.

    Ok, /maybe/ that's a 4 source instruction, but more likely it is 4
    mmap registers on your DMA unit that have to be set.

    Or if your DMA unit allows chaining, you construct a linked list or
    vector of parameter blocks in RAM, then set registers to point the
    unit to the head of the chain and (if a vector) to tell it how many
    blocks.


    Brain dump design issues. Qupls is not going to have a separate
    asynchronous vector unit. Vectors are supported using the GPR register
    file by hiding the issuing of multiple instructions behind the scenes
    and relying on parallelism in the OoO design.

    How vectors are supported in Qupls may need re-thinking. The vector
    length is being used to set the number of 64-bit registers needed to
    represent a vector at the micro-op encoding stage, before the register
    file is read. That cannot be done ff the length has to change
    frequently. Using a fixed number of registers might be better. For
    frequent changes the config would end up being passed around as another
    operand to vector instructions. Making the core larger = slower.

    It is a toss-up I think. Using a fixed number of registers will occupy
    more execution units, mean more micro-ops will be fetched and dispatched
    and slow things down. On the other hand waiting 20 cycles or so for the
    length changes to percolate through the pipeline is not fast either.

    May have both static length settings and dynamic length settings then.
    Using the static setting to set a maximum before the app is running and
    using dynamic lengths while executing code. Static length would set the
    number of micro-ops needed per vector instruction. Dynamic length would
    set the vector masking.

    Maybe too complex to understand, having two different length settings.

    Vector masking could be used to control the vector length dynamically.
    Rather than change the vector length, change the masking.

    Note that I'm primarily a software person. And I don't know anything
    about your particular design. My own musings follow. Feel free to
    ignore them as I only can consider the problem from the POV of using
    the CPU.


    I understand that you want to stream vectors through your CPU, using
    your general registers to do the processing. Sounds similar to what
    Mitch is trying to achieve with his "My 66000".

    Depending on how many sources (args) per instruction, and whether you
    have only reg->reg or memory loadops, and whether you have full length instruction constants, it seems that vector operations are going to
    require 1 to 3 registers per element.
    [If you can fix the number of registers per element, that will help.]

    Maybe a semantic difference here. I call components of a vector elements
    that might also be called lanes. Multiple elements (lanes) fit into a
    single register (between 1 and 8 elements) depending on if the element
    is a byte, wyde, tetra or octa in size. Elements are not allowed to span registers.

    The CPU is sitting at 6 args to an instructions. 3 read ports 1 write
    port (also read) a hidden arg for dynamic round mode, and I've forgotten
    what the other arg is ATM.

    Regardless of how many registers (or names) you have, undoubtedly
    there will be vectors that are too long to handle without looping, and
    there will be vectors whose lengths are not integer multiples of
    however many elements an iteration can do in parallel.
    [You always can fall back on 1 element per iteration.]

    The question is how smart you want your CPU to be.


    With vector lengths known at compile time, the compiler can unroll the
    loop to figure out how many iterations of N elements, and handle
    remaining (< N) elements separately. This requires no vector specific
    smarts in your CPU.


    If you want to do the moral equivalent of unrolling at runtime ...
    well that's another thing altogether. I confess that I don't fully understand what Mitch is doing, and from your comments above I get the
    idea that you really don't yet know how you want to handle it.

    Obviously, you will need to know how many registers are needed for one element - so unless you have some super loop instruction that
    specifies that, you may have to parse the loop body. And you'll need
    to know how many registers are available to use. You probably don't
    want to have to spill things to make room, and you may find you need a
    few registers for loop control: e.g., elements per/this iteration,
    count of remaining elements, perhaps even a separate iteration count.

    I don't really see how you'd use a vector mask. It would work for a contiguous vector register file, but since each element is represented
    by a /group/ of GPRs that possibly are subject to discontiguous
    renames, it seems better to predicate the loop body operations based
    on whether they have something to do this iteration. That argues for
    your dispatcher/sequencer to handle each element separately.

    Ah, that may have been the other arg. I think this is handled okay. The
    start lane number is recorded for each instruction. The execute unit
    knows how much to shift the mask value. It just looks like another arg.


    BTW: you didn't mention whether you are register renaming. I hope so,
    because I can't see how you realistically could do runtime unrolling
    without it.

    Yup, it does (limited) register renaming.

    One cannot do this without stalling the machine:

    add %t3,%t3,$1
    add %t3,%t3,$1
    add %t3,%t3,$1
    add %t3,%t3,$1
    add %t1,%t1,$1
    add %t3,%t3,$1
    add %t3,%t3,$1
    add %t3,%t3,$1
    add %t3,%t3,$1
    add %t1,%t1,$1
    add %t3,%t3,$1
    add %t3,%t3,$1
    add %t3,%t3,$1
    add %t3,%t3,$1
    add %t1,%t1,$1
    add %t3,%t3,$1
    add %t3,%t3,$1
    add %t3,%t3,$1
    add %t3,%t3,$1
    add %t1,%t1,$1
    add %t3,%t3,$1
    add %t3,%t3,$1
    add %t3,%t3,$1
    add %t3,%t3,$1
    add %t1,%t1,$1
    add %t3,%t3,$1
    add %t3,%t3,$1
    add %t3,%t3,$1
    add %t3,%t3,$1
    add %t1,%t1,$1

    There would be too many renames on %t3


    That's all for now. I have to think about it some more.
    George

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Robert Finch@robfi680@gmail.com to comp.arch on Sun Nov 8 23:11:46 2026
    From Newsgroup: comp.arch

    On 2026-11-08 7:01 p.m., Lawrence DrCOOliveiro wrote:
    On Sun, 8 Nov 2026 07:39:44 -0500, Robert Finch wrote:

    I looked at the RISCV vector extension model and they have it just
    as a CSR. Makes me think that is an acceptable solution.

    RISC-V is going against the prevailing fashion on this. Most other CPU architectures in common use implement loads of SIMD instructions with
    fixed vector lengths that are typically quite short: e.g. 4 or 8
    elements. The reason why you need loads of different instructions is
    because you want to cover all the possible combinations of operand
    types that a programmer might find useful.


    The RISC-V designers quite rightly criticize this combinatorial
    explosion of instruction variants as going completely against the
    whole idea of a *reduced* instruction set computer (which is what
    rCLRISCrCY is supposed to stand for).

    It is partly a representation issue. IDK how it would be avoided,
    scratched my head over this one. There is a ton of instructions in Q+.
    One thing that may help is using longer instruction mnemonics.

    I seem to recall reading somewhere that once one gets beyond about 400 mnemonics one cannot remember what they all mean.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.arch on Mon Nov 9 04:37:06 2026
    From Newsgroup: comp.arch

    On Sun, 8 Nov 2026 23:11:46 -0500, Robert Finch wrote:

    On 2026-11-08 7:01 p.m., Lawrence DrCOOliveiro wrote:

    The RISC-V designers quite rightly criticize this combinatorial
    explosion of instruction variants as going completely against the
    whole idea of a *reduced* instruction set computer (which is what
    rCLRISCrCY is supposed to stand for).

    It is partly a representation issue. IDK how it would be avoided,
    scratched my head over this one.

    I think they do it by specifying the data type of the operands in
    another control register.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Robert Finch@robfi680@gmail.com to comp.arch on Mon Nov 9 02:14:10 2026
    From Newsgroup: comp.arch

    On 2026-11-08 11:37 p.m., Lawrence DrCOOliveiro wrote:
    On Sun, 8 Nov 2026 23:11:46 -0500, Robert Finch wrote:

    On 2026-11-08 7:01 p.m., Lawrence DrCOOliveiro wrote:

    The RISC-V designers quite rightly criticize this combinatorial
    explosion of instruction variants as going completely against the
    whole idea of a *reduced* instruction set computer (which is what
    rCLRISCrCY is supposed to stand for).

    It is partly a representation issue. IDK how it would be avoided,
    scratched my head over this one.

    I think they do it by specifying the data type of the operands in
    another control register.

    I went with the hoards of instructions approach. But the size of the
    operand is specified in a config register. At least I do not have a
    different instruction for each size. Data type is usually determined by
    the instruction. vadd for vector integer add, vfadd for float add, etc.






    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Robert Finch@robfi680@gmail.com to comp.arch on Mon Nov 9 02:29:33 2026
    From Newsgroup: comp.arch

    ; 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
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Mon Nov 9 06:13:02 2026
    From Newsgroup: comp.arch

    Lawrence =?iso-8859-13?q?D=FFOliveiro?= <ldo@nz.invalid> writes:
    RISC-V is going against the prevailing fashion on this. Most other CPU >architectures in common use implement loads of SIMD instructions with
    fixed vector lengths that are typically quite short: e.g. 4 or 8
    elements. The reason why you need loads of different instructions is
    because you want to cover all the possible combinations of operand
    types that a programmer might find useful.

    The RISC-V designers quite rightly criticize this combinatorial
    explosion of instruction variants as going completely against the
    whole idea of a *reduced* instruction set computer (which is what
    "RISC" is supposed to stand for).

    Given that Patterson (who coined the term RISC) never gave a
    definition of RISC, how can one say that the combinatorial explosion
    is right or wrong?

    John Mashey gave criteria for determining the RISC-ness of an
    intruction set
    <https://userpages.umbc.edu/~vijay/mashey.on.risc.html>, and I found
    his arguments convincing (although I do not agree fully with all of
    his criteria, in particular, not 3a-c, and 5a and consequently 5b).
    The number of instructions is not one of the criteria he gave.

    In particular, if we look at AVX and AVX-512 instructions,

    1) The gather and scatter instructions are against RISC criteria
    (Mashey criterion 4b), and on Skylake are slow, and already have
    resulted in the Downfall vulnerability.

    2) The load-and-operate variants of the instructions are against
    Mashey's criterion 4a, and while other criteria (in particular
    3a-3c) are not satisfied by all CPUs that are typically seen as
    RISC, this criterion has been satisfied by all of them. One can
    see the bad effects of the load-and-operate variants as well as the
    bad effects of making the destination operand one of the sources
    (not a Mashey criterion) in the FMA3 instructions, which come in
    132, 213, and 231 variants depending on which source operand should
    be overwritten and which should be in memory.

    3) AVX and AVX-512 are part of AMD64, so naturally they do not satisfy
    criteria 3a and 3b.

    If you leave away the gather-and-scatter instructions, and the
    load-and-operate variants, and encode the rest to fit in 32 bits (and
    leave room for the integer instruction set:-), and reduce the offset
    of load/store instructions to make this possible, AVX-512 still has
    hundreds, maybe thousands of instructions thanks to the combination of operations, types, lane (element) sizes, operation width, but
    satisfies Masheys criteria.

    The RISC-V designers may want to add the number of instructions as
    another criterion, but I think they would be wrong. The advantages of
    the RISC principles do not hinge on the number of instructions.

    If they want to encode some of the "combinatorial explosion" stuff in
    registers that are implicitly used by the SIMD instructions, that's
    actually against the trend in at least some of the RISCs, in
    particular MIPS (with hi and lo as the exception that proves the rule)
    and Alpha, and RISC-V without the vector stuff, to avoid implicit (and
    thus single-instance) registers; this rule has shown its value in
    particular when OoO was introduced (no need to rename the condition
    codes).

    One might have several registers containing the type and widths, and
    refer to them in the instruction, and this would reduce the problems
    of this approach a little. But a problem remains: Implementors want
    to know the registers that the instruction operates on in the renamer,
    and the type that they work on when entering the schedulers (not every microarchitecture has just one scheduler that covers everything), so
    these informations need to be provided at the front end, and
    instructions that change these registers need to be executed at the
    front end, subverting OoO implementations.

    There is a reason why we have encoded the instruction type and width
    into scalar instructions, and this reason does not go away when it
    comes to vector instructions. And just because this good practice
    inreases the instruction count, does not make it a bad practice, even
    if the result is a combinatorial explosion.

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.arch on Mon Nov 9 07:51:10 2026
    From Newsgroup: comp.arch

    On Mon, 09 Nov 2026 06:13:02 GMT, Anton Ertl wrote:

    On Mon, 9 Nov 2026 00:01:09 -0000 (UTC), Lawrence DrCOOliveiro wrote:

    The RISC-V designers quite rightly criticize this combinatorial
    explosion of instruction variants as going completely against the
    whole idea of a *reduced* instruction set computer (which is what
    "RISC" is supposed to stand for).

    Given that Patterson (who coined the term RISC) never gave a
    definition of RISC, how can one say that the combinatorial explosion
    is right or wrong?

    ItrCOs in the name: rCLReduced Instruction Set ComputerrCY.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Mon Nov 9 08:14:04 2026
    From Newsgroup: comp.arch

    Lawrence =?iso-8859-13?q?D=FFOliveiro?= <ldo@nz.invalid> writes:
    On Mon, 09 Nov 2026 06:13:02 GMT, Anton Ertl wrote:
    Given that Patterson (who coined the term RISC) never gave a
    definition of RISC, how can one say that the combinatorial explosion
    is right or wrong?

    It's in the name: "Reduced Instruction Set Computer"

    Read it as "reduced-instruction set computer", not as "reduced
    instruction-set computer". The relevance is that the instruction
    complexity is reduced, even at the cost of increasing the number of instructions.

    E.g., MIPS and RISC-V have an instruction called LUI, which would be unnecessary if ADDIU just supported full-width immediate operands,
    like VAX. So by the instruction-counting criteria MIPS and RISC-V are
    less reduced than the variants MY MIPS' and MY RISC-V (as in MY 66000)
    that have a full-width immediate operand and no LUI. But by John
    Mashey's criteria, the MY variants are less RISC, because they have
    more instruction widths.

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Robert Finch@robfi680@gmail.com to comp.arch on Mon Nov 9 07:03:43 2026
    From Newsgroup: comp.arch

    On 2026-11-09 1:13 a.m., Anton Ertl wrote:
    Lawrence =?iso-8859-13?q?D=FFOliveiro?= <ldo@nz.invalid> writes:
    RISC-V is going against the prevailing fashion on this. Most other CPU
    architectures in common use implement loads of SIMD instructions with
    fixed vector lengths that are typically quite short: e.g. 4 or 8
    elements. The reason why you need loads of different instructions is
    because you want to cover all the possible combinations of operand
    types that a programmer might find useful.

    The RISC-V designers quite rightly criticize this combinatorial
    explosion of instruction variants as going completely against the
    whole idea of a *reduced* instruction set computer (which is what
    "RISC" is supposed to stand for).

    Given that Patterson (who coined the term RISC) never gave a
    definition of RISC, how can one say that the combinatorial explosion
    is right or wrong?

    John Mashey gave criteria for determining the RISC-ness of an
    intruction set
    <https://userpages.umbc.edu/~vijay/mashey.on.risc.html>, and I found
    his arguments convincing (although I do not agree fully with all of
    his criteria, in particular, not 3a-c, and 5a and consequently 5b).
    The number of instructions is not one of the criteria he gave.

    In particular, if we look at AVX and AVX-512 instructions,

    1) The gather and scatter instructions are against RISC criteria
    (Mashey criterion 4b), and on Skylake are slow, and already have
    resulted in the Downfall vulnerability.

    2) The load-and-operate variants of the instructions are against
    Mashey's criterion 4a, and while other criteria (in particular
    3a-3c) are not satisfied by all CPUs that are typically seen as
    RISC, this criterion has been satisfied by all of them. One can
    see the bad effects of the load-and-operate variants as well as the
    bad effects of making the destination operand one of the sources
    (not a Mashey criterion) in the FMA3 instructions, which come in
    132, 213, and 231 variants depending on which source operand should
    be overwritten and which should be in memory.

    3) AVX and AVX-512 are part of AMD64, so naturally they do not satisfy
    criteria 3a and 3b.

    If you leave away the gather-and-scatter instructions, and the load-and-operate variants, and encode the rest to fit in 32 bits (and
    leave room for the integer instruction set:-), and reduce the offset
    of load/store instructions to make this possible, AVX-512 still has
    hundreds, maybe thousands of instructions thanks to the combination of operations, types, lane (element) sizes, operation width, but
    satisfies Masheys criteria.

    The RISC-V designers may want to add the number of instructions as
    another criterion, but I think they would be wrong. The advantages of
    the RISC principles do not hinge on the number of instructions.

    If they want to encode some of the "combinatorial explosion" stuff in registers that are implicitly used by the SIMD instructions, that's
    actually against the trend in at least some of the RISCs, in
    particular MIPS (with hi and lo as the exception that proves the rule)
    and Alpha, and RISC-V without the vector stuff, to avoid implicit (and
    thus single-instance) registers; this rule has shown its value in
    particular when OoO was introduced (no need to rename the condition
    codes).

    One might have several registers containing the type and widths, and
    refer to them in the instruction, and this would reduce the problems
    of this approach a little. But a problem remains: Implementors want
    to know the registers that the instruction operates on in the renamer,
    and the type that they work on when entering the schedulers (not every microarchitecture has just one scheduler that covers everything), so
    these informations need to be provided at the front end, and
    instructions that change these registers need to be executed at the
    front end, subverting OoO implementations.

    There is a reason why we have encoded the instruction type and width
    into scalar instructions, and this reason does not go away when it
    comes to vector instructions. And just because this good practice
    inreases the instruction count, does not make it a bad practice, even
    if the result is a combinatorial explosion.

    - anton

    Thanks, John Mashey's criteria is somewhat biblical. It looks like I
    start working on the next version of Qupls as the current version has
    some flaws. The operand size should be spec'd as part of the
    instruction. Got to avoid a level of indirection by using registers to
    specify things. It would be going a bit backwards to an earlier version
    that had just 32 visible regs, but also 32 vector regs.


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From scott@scott@slp53.sl.home (Scott Lurndal) to comp.arch on Mon Nov 9 15:52:41 2026
    From Newsgroup: comp.arch

    George Neuner <gneuner2@comcast.net> writes:
    On Sun, 8 Nov 2026 10:03:01 -0500, Robert Finch <robfi680@gmail.com>
    wrote:

    I looked at the RISCV vector extension model and they have it just as a >>>> CSR. Makes me think that is an acceptable solution.

    It is for the case where the vector unit is separate and asynchronous.

    I did not realize that was the use case for RISCV.

    I don't know anything about RISCV ... I was speaking generally.

    Any unit might have (hidden) control registers that need to be set for
    a particular operation to be performed. In fact, most do.

    The reason to have /visible/ setup registers is to allow for
    operations that run asynchronously and automatically. Generally you
    need at least to describe the input and what to do if there is an
    error ... typically much more information than can be packed into a
    CPU instruction.


    E.g., consider a DMA transfer: source address, target address,
    transfer width, transfer count.

    Ok, /maybe/ that's a 4 source instruction, but more likely it is 4
    mmap registers on your DMA unit that have to be set.

    For the most part, a "DMA unit" has been obsolete for three
    decades. For modern devices (e.g. PCI Express devices), DMA is handled
    by the device itself by simply sending a Memory Write TLP
    from the device to the host. The host may have a mapping
    unit (IOMMU/SMMU) in the path that will translate the address
    in the TLP before it reaches the host interconnect structures
    (mesh, crossbar switch, et alia) leading to memory (or in some
    cases to host CSRs).


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Stephen Fuld@sfuld@alumni.cmu.edu.invalid to comp.arch on Mon Nov 9 09:08:03 2026
    From Newsgroup: comp.arch

    On 11/8/2026 3:17 PM, George Neuner wrote:
    On Sun, 8 Nov 2026 10:03:01 -0500, Robert Finch <robfi680@gmail.com>
    wrote:

    Big snip

    Vectors are supported using the GPR register
    file by hiding the issuing of multiple instructions behind the scenes
    and relying on parallelism in the OoO design.

    Good.

    How vectors are supported in Qupls may need re-thinking.

    Agreed.

    big snip


    Note that I'm primarily a software person. And I don't know anything
    about your particular design. My own musings follow. Feel free to
    ignore them as I only can consider the problem from the POV of using
    the CPU.

    I am in the same position.

    I understand that you want to stream vectors through your CPU, using
    your general registers to do the processing. Sounds similar to what
    Mitch is trying to achieve with his "My 66000".
    Yes, although he is talking about various "configuration" registers for
    things like vector length, element size, etc. which My 66000's VVM
    doesn't need.


    Depending on how many sources (args) per instruction, and whether you
    have only reg->reg or memory loadops, and whether you have full length instruction constants, it seems that vector operations are going to
    require 1 to 3 registers per element.
    [If you can fix the number of registers per element, that will help.]

    Regardless of how many registers (or names) you have, undoubtedly
    there will be vectors that are too long to handle without looping, and
    there will be vectors whose lengths are not integer multiples of
    however many elements an iteration can do in parallel.
    [You always can fall back on 1 element per iteration.]

    All issues that simply go away with VVM. Or at least "go away" for the programmer. The hardware must still handle them, though.


    The question is how smart you want your CPU to be.

    Yes. I don't know how much "smarts" VVM requires in the hardware.



    With vector lengths known at compile time, the compiler can unroll the
    loop to figure out how many iterations of N elements, and handle
    remaining (< N) elements separately. This requires no vector specific
    smarts in your CPU.


    If you want to do the moral equivalent of unrolling at runtime ...
    well that's another thing altogether. I confess that I don't fully understand what Mitch is doing, and from your comments above I get the
    idea that you really don't yet know how you want to handle it.


    While I don't understand the details or how complex the hardware is
    behind the scenes, but from a programmer's point of view, VVM is very
    simple, in fact I would argue simpler than than all those SIMD
    instructions, extra reconfiguration registers, etc.

    The steps in writing code for VVM which would replace a sequence of SIMD instructions are ISTM, the following:

    Pretend you have no "special" instructions and are going to write a "traditional" loop to process whatever vectors you have in the way you
    need to to solve your problem.

    Write a sequence of "ordinary" scalar instructions to essentially process one element of the vectors you are dealing with. This is the
    "guts" of the processing that is conceptually in the innermost loop over
    the vectors you are processing and would replace the sequence of SIMD instructions. There are a few restrictions to what instructions you can
    use, e.g. no jumps, but you can use predicated instructions, a limit on
    the number of instructions.

    Put a LOOP instruction after the last instruction you wrote above. This includes the loop termination conditions.

    Lastly, and this includes the only part that is has something conceptually different from a simple scaler loop, add a VEC instruction
    at the beginning of the sequence. The different part is that this
    instruction includes information about which registers are needed to be "correct" after the loop terminates.


    The hardware does it magic. No need for you, the programmer, to worry
    about special length registers, element packing (just load bytes, half
    words, words or double words as required) how to break down processing
    into "chunks" the size of SIMD registers, no mask registers, etc.

    From a programmer's POV, once you "get it", it is much simpler than
    the SIMD approach (no new instructions to learn, a lot less to have to
    think about), and has the advantage of not requiring rethinking the code
    for the next iteration of SIMD instructions.

    I can't speak to the hardware complexity of the implementation. Perhaps
    that is a limiting factor. But barring that, and the mental effort
    required to "reorient" your thinking, I don't see why any new clean
    sheet design would use SIMD instructions. Perhaps someone can explain
    why it should.
    --
    - Stephen Fuld
    (e-mail address disguised to prevent spam)
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Mon Nov 9 22:01:04 2026
    From Newsgroup: comp.arch

    Stephen Fuld <sfuld@alumni.cmu.edu.invalid> writes:
    I can't speak to the hardware complexity of the implementation. Perhaps >that is a limiting factor. But barring that, and the mental effort
    required to "reorient" your thinking, I don't see why any new clean
    sheet design would use SIMD instructions. Perhaps someone can explain
    why it should.

    There used to be memory-to-memory vector machines, and there used to
    be vector machines with vector registers, like the Cray-1. The
    advantage of the vector registers was that they could be used several
    or even many times for each time they are loaded, as is common in
    matrix multiplication implementations.

    My impression is that VVM can only do what memory-to-memory vector
    machines could do, but does not have a good story for those tasks
    where the vector/SIMD registers are used several times.

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.arch on Mon Nov 9 22:38:04 2026
    From Newsgroup: comp.arch

    On Mon, 09 Nov 2026 08:14:04 GMT, Anton Ertl wrote:

    On Mon, 9 Nov 2026 07:51:10 -0000 (UTC), Lawrence DrCOOliveiro wrote:

    It's in the name: "Reduced Instruction Set Computer"

    Read it as "reduced-instruction set computer", not as "reduced instruction-set computer".

    So what exactly is a rCLset computerrCY?

    Why not rCLreduced-instruction set-computerrCY? If itrCOs good to put in hyphens, why not put in more of them? rCLReduced-instruction-set
    computerrCY?

    Yours is an example of a rCLcircular argumentrCY -- you are choosing a particular reading (and a particularly awkward one at that) just on
    the basis that it agrees with your argument, not for any other reason.

    The relevance is that the instruction complexity is reduced, even at
    the cost of increasing the number of instructions.

    E.g., MIPS and RISC-V have an instruction called LUI, which would be unnecessary if ADDIU just supported full-width immediate operands,
    like VAX.

    So you see a shift-and-load instruction is being somehow *less*
    complex than a straight load?
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From EricP@ThatWouldBeTelling@thevillage.com to comp.arch on Mon Nov 9 18:39:35 2026
    From Newsgroup: comp.arch

    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:

    -a-a-a-avadd %r1,%r8,%r16

    ; into
    -a-a-a-aadd %r1,%r8,%r16-a-a-a ; records lane #1 in the instruction
    -a-a-a-aadd %r2,%r9,%r17-a-a-a ; records lane #2 in the instruction
    -a-a-a-aadd %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.

    -a-a-a-avaddm %r1,%r8,%r16,%r4-a-a-a ; r4 contains mask

    ; translates into (source arg #3 is always scalar) masked add
    -a-a-a-aaddm %r1,%r8,%r16,%r4-a-a-a ; records lane #1 in the instruction
    -a-a-a-aaddm %r2,%r9,%r17,%r4-a-a-a ; records lane #2 in the instruction
    -a-a-a-aaddm %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)

    -a-a-a-avmfill %r4,$0,$ele_remaining

    ; It is possible to use a simple instruction sequence to
    ; generate the mask.
    ; eg 12 elements in 3 regs

    -a-a-a-aminu %r5,$12,%r6-a-a-a-a-a-a-a ; where r6 is counting down # ele
    -a-a-a-aset %r4,$0,$0,%r5,$-1-a-a-a-a-a-a-a ; vmfill %r4,$0,%r5
    -a-a-a-asub %r6,%r6,%r5-a-a-a-a-a-a-a-a-a-a-a ; count down # ele
    -a-a-a-abne %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.



    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Tue Nov 10 07:41:31 2026
    From Newsgroup: comp.arch

    Lawrence =?iso-8859-13?q?D=FFOliveiro?= <ldo@nz.invalid> writes:
    On Mon, 09 Nov 2026 08:14:04 GMT, Anton Ertl wrote:
    Read it as "reduced-instruction set computer", not as "reduced
    instruction-set computer".

    So what exactly is a "set computer"?

    You obviously need even more help in how the words belong together.
    It's

    {{reduced instruction} set} computer

    The relevance is that the instruction complexity is reduced, even at
    the cost of increasing the number of instructions.

    E.g., MIPS and RISC-V have an instruction called LUI, which would be
    unnecessary if ADDIU just supported full-width immediate operands,
    like VAX.

    So you see a shift-and-load instruction is being somehow *less*
    complex than a straight load?

    There is no shift-and-load involved anywhere. See <https://instructionsets.com/risc-v/lui/> about what LUI does on
    RISC-V. If you look at the binary layout, you see that the imm20 is
    in the same bit positions in the instruction as in the destination
    register.

    What is less complex is that MIPS amd RISC-V implementations do not
    need to deal with instructions that have more than 32 bits in length.
    Without their compressed extensions, they only need to deal with one instruction length: 32 bits. Which means that you can fetch the
    instruction directly into the decoder, without needing an instruction
    buffer nor a shifter for shifting the bytes around in that buffer.

    Concerning circularity: John Mashey's arguments are based on observing architectures that have been generally considered RISC (such as Power,
    ARM A32, and RISC-V) vs. architectures that have not (e.g., PDP-11,
    VAX, and i386).

    You may consider that circular: Derive criteria from a pre-existing classification, and then use the criteria to classify new
    architectures. That's what you get if you don't have a definition to
    start with. BTW, while Patterson himself did not give a definition in
    the paper where he coined the term RISC, but in 1985 observed
    commonalities between IBM 801, Berkeley RISC-II and Stanford MIPS and
    listed them, preceeding John Mashey's more detailed analysis.

    Mashey (and IIRC also Patterson) also discuss the technical background
    behind the commonalities in RISCs, so while you may consider the way
    that the criteria were derived to be circular, they are not
    accidental.

    Instruction count is not among these criteria that Patterson observed, and not among the criteria that Mashey uses, either.

    Instruction count would also be hard to measure; e.g., <https://instructionsets.com/x86/add/> lists 19 forms of instruction
    with the mnemonic ADD. Are they 19 different instructions with the
    same name, or just one? What about variants with the same encoding,
    like the one with the opcode 05H (listed separately), where the
    meaning depends on the value of a flag? What about other differences
    in behaviour influenced by a flag?

    Mashey used (wrongly IMO) the number of addressing modes as a
    criterion, and had difficulty counting them. And, e.g., Power lists auto-incrementing loads as separate instructions where auto-increment
    is considered to be an addressing mode by ARM.

    If you consider an instruction set RISC if it has, say, 64
    instructions or less, does it become CISC when FP instructions are
    added? What about adding 64-bit instructions?

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Tue Nov 10 09:03:17 2026
    From Newsgroup: comp.arch

    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
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From David Brown@david.brown@hesbynett.no to comp.arch on Tue Nov 10 10:31:47 2026
    From Newsgroup: comp.arch

    On 09/11/2026 23:38, Lawrence DrCOOliveiro wrote:
    On Mon, 09 Nov 2026 08:14:04 GMT, Anton Ertl wrote:

    On Mon, 9 Nov 2026 07:51:10 -0000 (UTC), Lawrence DrCOOliveiro wrote:

    It's in the name: "Reduced Instruction Set Computer"

    Read it as "reduced-instruction set computer", not as "reduced
    instruction-set computer".

    Exactly.

    It is also, I think, helpful to consider RISC as the "opposite" of CISC
    - and Complex Instruction Set Computer cannot really be interpreted as
    meaning anything other than that the instructions are "complex". By comparison, with RISC the /instructions/ are "reduced".


    So what exactly is a rCLset computerrCY?

    Why not rCLreduced-instruction set-computerrCY? If itrCOs good to put in hyphens, why not put in more of them? rCLReduced-instruction-set
    computerrCY?

    Try parentheses rather than hyphens :

    ((Reduced Instruction) Set) Computer

    rather than

    (Reduced (Instruction Set)) Computer

    RISC means the computer has a set of reduced instructions.


    Yours is an example of a rCLcircular argumentrCY -- you are choosing a particular reading (and a particularly awkward one at that) just on
    the basis that it agrees with your argument, not for any other reason.


    No, he is choosing the reading that fits best, and I think is the most
    used interpretation amongst people familiar with a range of processor architectures. It is certainly not uncommon to think of "RISC" as
    meaning that there are relatively few instructions, but once you start
    looking at a major RISC architecture you see that is not the case. (For
    me, that revelation came when I first used a PowerPC microcontroller.)

    The relevance is that the instruction complexity is reduced, even at
    the cost of increasing the number of instructions.

    E.g., MIPS and RISC-V have an instruction called LUI, which would be
    unnecessary if ADDIU just supported full-width immediate operands,
    like VAX.

    So you see a shift-and-load instruction is being somehow *less*
    complex than a straight load?

    Anton will say what /he/ thinks, but to me a load-with-shift is
    obviously more complex than a load /without/ a shift. However, it is
    not complex - it is done as single operation, without additional
    hardware states, delays or latencies, without scheduling executional
    units (other than a load or load/store unit for the load). This is very different from an operation that combines a load with an addition using
    an ALU execution unit. The point of RISC is not so much that
    instructions should not do fancy things, but that they should normally
    only use one execution unit for one operation.



    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Tue Nov 10 12:06:15 2026
    From Newsgroup: comp.arch

    David Brown <david.brown@hesbynett.no> writes:
    It is also, I think, helpful to consider RISC as the "opposite" of CISC
    - and Complex Instruction Set Computer cannot really be interpreted as >meaning anything other than that the instructions are "complex". By >comparison, with RISC the /instructions/ are "reduced".

    Patterson certainly gave CISC as a contrast for RISC, and his example
    CISC architecture is the VAX. But while RISCs are relatively similar,
    non-RISC architectures are all over the place, from VAX, Eclipse
    MV/8000, S/370, Burroughs B5500 through CDC-6600 and Cray-1 to stuff
    like the Novix NC4016 and its descendent Harris RTX2000, which is not
    really complex, but is still not a RISC.

    But I guess that Patterson had CPUs for mainframes and superminis of
    1980 in mind, with MMU, virtual memory and big memory subsystems, not microprocessors or microcontrollers of the time. And he probably also
    had an implementation-oriented, not just architecture-oriented view,
    having worked on VAX microcode just before starting the RISC-I
    project. But of course the architects of the day also had the implementation-oriented view, and added complex instructions to the
    relatively minimal Nova as more hardware became available, until they
    arrived at the Eclipse MV/8000; and we have a nice book about the
    difficulties of implementing that architecture ("The Soul of a new
    Machine").

    So despite the differences between the architectures that Patterson
    thought about when he coined the term CISC, I guess there is a common
    subtext among them: architectures that have been designed to make use
    of the possibilities of microcode; maybe not at the start (AFAIK the
    original Nova was pretty minimal), but certainly in their evolution
    towards larger systems.

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Stephen Fuld@sfuld@alumni.cmu.edu.invalid to comp.arch on Tue Nov 10 07:22:10 2026
    From Newsgroup: comp.arch

    On 11/9/2026 2:01 PM, Anton Ertl wrote:
    Stephen Fuld <sfuld@alumni.cmu.edu.invalid> writes:
    I can't speak to the hardware complexity of the implementation. Perhaps
    that is a limiting factor. But barring that, and the mental effort
    required to "reorient" your thinking, I don't see why any new clean
    sheet design would use SIMD instructions. Perhaps someone can explain
    why it should.

    There used to be memory-to-memory vector machines, and there used to
    be vector machines with vector registers, like the Cray-1. The
    advantage of the vector registers was that they could be used several
    or even many times for each time they are loaded, as is common in
    matrix multiplication implementations.

    My impression is that VVM can only do what memory-to-memory vector
    machines could do, but does not have a good story for those tasks
    where the vector/SIMD registers are used several times.

    That is an interesting, and thought provoking, response. It seems the advantage of an SIMD approach is the large set of addressable registers
    that can be used to keep data readily available for future use. Of
    course, both systems can keep a modest amount of data in the non SIMD registers, and VVM has streaming buffers, which dedicate memory within
    the CPU for other purposes.

    I don't know if, when doing things like matrix multiplication, the
    streaming buffers can be used to keep data around as well as their role
    in anticipating future use. And, for matmul in particular, perhaps you
    could break the operation down into small enough blocks that the
    non-SIMD registers would be enough. This all requires more thought.

    I respect Mitch's abilities such that I can't believe he hasn't thought
    about how VVM would handle such a common operation as matrix multiplication.
    --
    - Stephen Fuld
    (e-mail address disguised to prevent spam)
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From MitchAlsup@user5857@newsgrouper.org.invalid to comp.arch on Tue Nov 10 19:14:53 2026
    From Newsgroup: comp.arch

    Lawrence =?iso-8859-13?q?D=FFOliveiro?= <ldo@nz.invalid> posted:

    On Sun, 8 Nov 2026 07:39:44 -0500, Robert Finch wrote:

    I looked at the RISCV vector extension model and they have it just
    as a CSR. Makes me think that is an acceptable solution.

    RISC-V is going against the prevailing fashion on this. Most other CPU architectures in common use implement loads of SIMD instructions with
    fixed vector lengths that are typically quite short: e.g. 4 or 8
    elements. The reason why you need loads of different instructions is
    because you want to cover all the possible combinations of operand
    types that a programmer might find useful.

    The RISC-V designers quite rightly criticize this combinatorial
    explosion of instruction variants as going completely against the
    whole idea of a *reduced* instruction set computer (which is what
    rCLRISCrCY is supposed to stand for).

    And then they (RISC-V designers) go out and create a different combinatorial-explosion of instructions (about DIV-4 of the SIMD
    kind:: 300 instead of 1300). And both require a "crap load of bits"
    in another register file.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From MitchAlsup@user5857@newsgrouper.org.invalid to comp.arch on Tue Nov 10 19:27:42 2026
    From Newsgroup: comp.arch

    Robert Finch <robfi680@gmail.com> posted:

    On 2026-11-08 6:17 p.m., George Neuner wrote:
    ------------merciful snip--------------

    I understand that you want to stream vectors through your CPU, using
    your general registers to do the processing. Sounds similar to what
    Mitch is trying to achieve with his "My 66000".

    Depending on how many sources (args) per instruction, and whether you
    have only reg->reg or memory loadops, and whether you have full length instruction constants, it seems that vector operations are going to
    require 1 to 3 registers per element.
    [If you can fix the number of registers per element, that will help.]

    Maybe a semantic difference here. I call components of a vector elements that might also be called lanes. Multiple elements (lanes) fit into a
    single register (between 1 and 8 elements) depending on if the element
    is a byte, wyde, tetra or octa in size. Elements are not allowed to span registers.

    Standard (CRAY) terminology is
    a) length 64-elements
    b) Lanes {1,2,4,8}
    c) beats = Length/Lanes

    CRAY-1.. beats = 64
    CRAY-YMP beats = 16
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From MitchAlsup@user5857@newsgrouper.org.invalid to comp.arch on Tue Nov 10 19:32:32 2026
    From Newsgroup: comp.arch

    Robert Finch <robfi680@gmail.com> posted:

    On 2026-11-08 11:37 p.m., Lawrence DrCOOliveiro wrote:
    On Sun, 8 Nov 2026 23:11:46 -0500, Robert Finch wrote:

    On 2026-11-08 7:01 p.m., Lawrence DrCOOliveiro wrote:

    The RISC-V designers quite rightly criticize this combinatorial
    explosion of instruction variants as going completely against the
    whole idea of a *reduced* instruction set computer (which is what
    rCLRISCrCY is supposed to stand for).

    It is partly a representation issue. IDK how it would be avoided,
    scratched my head over this one.

    I think they do it by specifying the data type of the operands in
    another control register.

    I went with the hoards of instructions approach. But the size of the
    operand is specified in a config register.

    How would you vectorize:

    LOOP on i
    {
    DoubleWord[i] = WORD[i] |u HalfWord[i] + Byte[i+2];
    }

    ???

    At least I do not have a different instruction for each size. Data type is usually determined by
    the instruction. vadd for vector integer add, vfadd for float add, etc.






    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From MitchAlsup@user5857@newsgrouper.org.invalid to comp.arch on Tue Nov 10 19:43:37 2026
    From Newsgroup: comp.arch

    Stephen Fuld <sfuld@alumni.cmu.edu.invalid> posted:

    On 11/8/2026 3:17 PM, George Neuner wrote:
    On Sun, 8 Nov 2026 10:03:01 -0500, Robert Finch <robfi680@gmail.com>
    wrote:

    Big snip

    Vectors are supported using the GPR register
    file by hiding the issuing of multiple instructions behind the scenes
    and relying on parallelism in the OoO design.

    Good.

    How vectors are supported in Qupls may need re-thinking.

    Agreed.

    big snip


    Note that I'm primarily a software person. And I don't know anything
    about your particular design. My own musings follow. Feel free to
    ignore them as I only can consider the problem from the POV of using
    the CPU.

    I am in the same position.

    I understand that you want to stream vectors through your CPU, using
    your general registers to do the processing. Sounds similar to what
    Mitch is trying to achieve with his "My 66000".

    Yes, although he is talking about various "configuration" registers for things like vector length, element size, etc. which My 66000's VVM
    doesn't need.

    The LOOP instruction deals with the looping characteristics
    {iteration scheduling}.
    The VEC. instruction deals with the boundary of the loop
    {entering and exiting}
    There are no <SW visible> machine control registers involved.

    Depending on how many sources (args) per instruction, and whether you
    have only reg->reg or memory loadops, and whether you have full length instruction constants, it seems that vector operations are going to
    require 1 to 3 registers per element.
    [If you can fix the number of registers per element, that will help.]

    Regardless of how many registers (or names) you have, undoubtedly
    there will be vectors that are too long to handle without looping, and there will be vectors whose lengths are not integer multiples of
    however many elements an iteration can do in parallel.
    [You always can fall back on 1 element per iteration.]

    All issues that simply go away with VVM. Or at least "go away" for the programmer. The hardware must still handle them, though.

    And the compiler. If compiler can find:

    label:
    inst1
    inst2
    ...
    ADD
    CMP
    BC CND,label

    with no CALLs in the loop, then compiler can vectorize the loop--
    even in the face of memory aliasing, loop carried dependencies, ...
    No exotic vectorization analysis needed.

    The question is how smart you want your CPU to be.

    Yes. I don't know how much "smarts" VVM requires in the hardware.

    An installation sequencer that looks for certain patterns and
    setup a 2D rename process {1D is typical, 2D is iteration}.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From MitchAlsup@user5857@newsgrouper.org.invalid to comp.arch on Tue Nov 10 19:57:09 2026
    From Newsgroup: comp.arch

    anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:

    Lawrence =?iso-8859-13?q?D=FFOliveiro?= <ldo@nz.invalid> writes:
    On Mon, 09 Nov 2026 08:14:04 GMT, Anton Ertl wrote:
    Read it as "reduced-instruction set computer", not as "reduced
    instruction-set computer".

    So what exactly is a "set computer"?

    You obviously need even more help in how the words belong together.
    It's

    {{reduced instruction} set} computer

    The relevance is that the instruction complexity is reduced, even at
    the cost of increasing the number of instructions.

    E.g., MIPS and RISC-V have an instruction called LUI, which would be
    unnecessary if ADDIU just supported full-width immediate operands,
    like VAX.

    So you see a shift-and-load instruction is being somehow *less*
    complex than a straight load?

    There is no shift-and-load involved anywhere. See <https://instructionsets.com/risc-v/lui/> about what LUI does on
    RISC-V. If you look at the binary layout, you see that the imm20 is
    in the same bit positions in the instruction as in the destination
    register.

    What is less complex is that MIPS amd RISC-V implementations do not
    need to deal with instructions that have more than 32 bits in length.

    RISC-V:C has 16-bit instructions, too, so the shifter is there anyway.

    Without their compressed extensions, they only need to deal with one instruction length: 32 bits. Which means that you can fetch the
    instruction directly into the decoder, without needing an instruction
    buffer nor a shifter for shifting the bytes around in that buffer.

    One can put the IB in a place where set-hit overlaps its flip-flops.
    {meaning the IB is just part of ICache FETCH}

    Concerning circularity: John Mashey's arguments are based on observing architectures that have been generally considered RISC (such as Power,
    ARM A32, and RISC-V) vs. architectures that have not (e.g., PDP-11,
    VAX, and i386).

    You may consider that circular: Derive criteria from a pre-existing classification, and then use the criteria to classify new
    architectures. That's what you get if you don't have a definition to
    start with. BTW, while Patterson himself did not give a definition in
    the paper where he coined the term RISC, but in 1985 observed
    commonalities between IBM 801, Berkeley RISC-II and Stanford MIPS and
    listed them, preceeding John Mashey's more detailed analysis.

    Mashey (and IIRC also Patterson) also discuss the technical background
    behind the commonalities in RISCs, so while you may consider the way
    that the criteria were derived to be circular, they are not
    accidental.

    Don't leave out Mark Horowitz

    Instruction count is not among these criteria that Patterson observed, and not among the criteria that Mashey uses, either.

    Instruction count would also be hard to measure; e.g., <https://instructionsets.com/x86/add/> lists 19 forms of instruction
    with the mnemonic ADD. Are they 19 different instructions with the
    same name, or just one? What about variants with the same encoding,
    like the one with the opcode 05H (listed separately), where the
    meaning depends on the value of a flag? What about other differences
    in behaviour influenced by a flag?

    Given {signed, Unsigned}|u{Byte, halfword, word, doubleword} one has
    8 integer ADDs, and generally an AGEN ADD on the more CISCy machines.

    One can argue whether that is enough or insufficient--independently.

    Mashey used (wrongly IMO) the number of addressing modes as a
    criterion, and had difficulty counting them.

    {Gomer Pyle}
    Surprise, surprise, surprise...

    And, e.g., Power lists auto-incrementing loads as separate instructions where auto-increment
    is considered to be an addressing mode by ARM.

    If you consider an instruction set RISC if it has, say, 64
    instructions or less, does it become CISC when FP instructions are
    added? What about adding 64-bit instructions?

    - anton
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From MitchAlsup@user5857@newsgrouper.org.invalid to comp.arch on Tue Nov 10 20:00:18 2026
    From Newsgroup: comp.arch

    Stephen Fuld <sfuld@alumni.cmu.edu.invalid> posted:

    On 11/9/2026 2:01 PM, Anton Ertl wrote:
    Stephen Fuld <sfuld@alumni.cmu.edu.invalid> writes:
    I can't speak to the hardware complexity of the implementation. Perhaps >> that is a limiting factor. But barring that, and the mental effort
    required to "reorient" your thinking, I don't see why any new clean
    sheet design would use SIMD instructions. Perhaps someone can explain
    why it should.

    There used to be memory-to-memory vector machines, and there used to
    be vector machines with vector registers, like the Cray-1. The
    advantage of the vector registers was that they could be used several
    or even many times for each time they are loaded, as is common in
    matrix multiplication implementations.

    My impression is that VVM can only do what memory-to-memory vector
    machines could do, but does not have a good story for those tasks
    where the vector/SIMD registers are used several times.

    That is an interesting, and thought provoking, response. It seems the advantage of an SIMD approach is the large set of addressable registers
    that can be used to keep data readily available for future use. Of
    course, both systems can keep a modest amount of data in the non SIMD registers, and VVM has streaming buffers, which dedicate memory within
    the CPU for other purposes.

    I don't know if, when doing things like matrix multiplication, the
    streaming buffers can be used to keep data around as well as their role
    in anticipating future use. And, for matmul in particular, perhaps you
    could break the operation down into small enough blocks that the
    non-SIMD registers would be enough. This all requires more thought.

    I respect Mitch's abilities such that I can't believe he hasn't thought about how VVM would handle such a common operation as matrix multiplication.

    Blocking in the DCache.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Terje Mathisen@terje.mathisen@tmsw.no to comp.arch on Tue Nov 10 22:44:14 2026
    From Newsgroup: comp.arch

    MitchAlsup wrote:
    Robert Finch <robfi680@gmail.com> posted:

    On 2026-11-08 11:37 p.m., Lawrence DrCOOliveiro wrote:
    On Sun, 8 Nov 2026 23:11:46 -0500, Robert Finch wrote:

    On 2026-11-08 7:01 p.m., Lawrence DrCOOliveiro wrote:

    The RISC-V designers quite rightly criticize this combinatorial
    explosion of instruction variants as going completely against the
    whole idea of a *reduced* instruction set computer (which is what
    rCLRISCrCY is supposed to stand for).

    It is partly a representation issue. IDK how it would be avoided,
    scratched my head over this one.

    I think they do it by specifying the data type of the operands in
    another control register.

    I went with the hoards of instructions approach. But the size of the
    operand is specified in a config register.

    How would you vectorize:

    LOOP on i
    {
    DoubleWord[i] = WORD[i] |u HalfWord[i] + Byte[i+2];
    }

    Relatively easy:
    Unroll by 16:
    load 4 W entries into ymm0
    load 4 W entries into ymm1
    load 4 W entries into ymm2
    load 4 W entries into ymm3
    load 8 HW entries into ymm4
    load 8 HW entries into ymm5
    load 16 B entries into ymm6
    //
    expand low half of ymm4 into ymm7
    expand high half of ymm4 in place
    // Ditto for ymm5/ymm8
    //
    // expand ymm6 into ymm9, ymm6, then both of these into two more regs.
    After all inputs have been expanded into the final DW element size, do
    the muls and adds.
    With a total of ~20 size expansion operations, they might well end up as a very significant part of the total runtime.
    If the architecture has doubling parallel MULs, then that would save
    quite a few operations.
    Terje
    --
    - <Terje.Mathisen at tmsw.no>
    "almost all programming can be viewed as an exercise in caching"
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Stefan Monnier@monnier@iro.umontreal.ca to comp.arch on Tue Nov 10 12:08:33 2026
    From Newsgroup: comp.arch

    David Brown [2026-11-10 10:31:47] wrote:
    It is also, I think, helpful to consider RISC as the "opposite" of
    CISC - and Complex Instruction Set Computer cannot really be
    interpreted as meaning anything other than that the instructions are "complex". By comparison, with RISC the /instructions/ are "reduced".

    Indeed. And one of the motivations behind the CISC evolution was the
    famed "semantic gap", which pushed towards rather fewer instructions
    that are more flexible, regular, and powerful.

    The million instructions of AES don't feel very CISCy to me.


    === Stefan
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Stefan Monnier@monnier@iro.umontreal.ca to comp.arch on Tue Nov 10 09:02:21 2026
    From Newsgroup: comp.arch

    My impression is that VVM can only do what memory-to-memory vector
    machines could do, but does not have a good story for those tasks
    where the vector/SIMD registers are used several times.

    Presumably caches could be used to get comparable results.


    === Stefan
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Tue Nov 10 21:15:43 2026
    From Newsgroup: comp.arch

    MitchAlsup <user5857@newsgrouper.org.invalid> writes: >anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:
    Mashey (and IIRC also Patterson) also discuss the technical background
    behind the commonalities in RISCs, so while you may consider the way
    that the criteria were derived to be circular, they are not
    accidental.

    Don't leave out Mark Horowitz

    Duckduckgo does not give me any papers, or web pages about RISC
    definition when I ask it for "Mark Horowitz RISC", unlike for "John
    Mashey RISC". Do you have a specific paper or web page in mind?

    Given {signed, Unsigned}|u{Byte, halfword, word, doubleword} one has
    8 integer ADDs,

    SPARC and Power have only one add instruction. With a load-store
    architecture, you need only one, the full-width one. Only with
    load-and-add instructions, you need to specify the width in the
    addition, and whether you want the loaded value to be sign-extended or zero-extended (although I think most have only one variant of every
    length). You also then have to ask yourself if you want to perform
    the addition to the full width of the register, or just the width of
    the loaded value, and sign- or zero-extend the result. I see no good
    reason to add only to the width of the loaded value, but that's how
    AMD64 works.

    The nice thing about load/store architectures is that you can separate
    these concerns.

    Have all 7 variants of loads (lbu lbs lsu lss lmu lms ll), four
    variants of store (sb ss sm sl), do addition at full width, and have
    various zero- and sign-extending instructions in the cases where they
    are needed (usually not in connection with addition).

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From John Levine@johnl@taugh.com to comp.arch on Tue Nov 10 22:02:12 2026
    From Newsgroup: comp.arch

    It appears that Anton Ertl <anton@mips.complang.tuwien.ac.at> said:
    There used to be memory-to-memory vector machines, and there used to
    be vector machines with vector registers, like the Cray-1.

    There still are. zSeries has 16 vector registers and an impressively overimplemented set of vector ops including integers, IEEE floats,
    strings, and packed decimal.

    It's not clear who this is for, but presumably there are customers
    that wanted them enough to add them.
    --
    Regards,
    John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
    Please consider the environment before reading this e-mail. https://jl.ly
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From MitchAlsup@user5857@newsgrouper.org.invalid to comp.arch on Wed Nov 11 00:34:11 2026
    From Newsgroup: comp.arch

    anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:

    /ERROR "unexpected byte sequence starting at index 590: '\xC3'" while decoding/:

    MitchAlsup <user5857@newsgrouper.org.invalid> writes: >anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:
    Mashey (and IIRC also Patterson) also discuss the technical background
    behind the commonalities in RISCs, so while you may consider the way
    that the criteria were derived to be circular, they are not
    accidental.

    Don't leave out Mark Horowitz

    Duckduckgo does not give me any papers, or web pages about RISC
    definition when I ask it for "Mark Horowitz RISC", unlike for "John
    Mashey RISC". Do you have a specific paper or web page in mind?

    "Architectural Tradeoffs in the Design of MIPS-X" Horowitz and Chow

    Given {signed, Unsigned}|a-u{Byte, halfword, word, doubleword} one has
    8 integer ADDs,

    SPARC and Power have only one add instruction. With a load-store architecture, you need only one, the full-width one.

    If you like LLVM compilers having to constrain ADD results with
    SEXT/ZEXT, sure, and you also don't get integer overflow performed
    properly (assuming you want it done at all).

    LLVM takes the (somewhat convoluted) vision that a result in a
    register is range limited to the exact value-set as one stored
    in memory.

    Only with
    load-and-add instructions, you need to specify the width in the
    addition, and whether you want the loaded value to be sign-extended or zero-extended (although I think most have only one variant of every
    length). You also then have to ask yourself if you want to perform
    the addition to the full width of the register, or just the width of
    the loaded value, and sign- or zero-extend the result. I see no good
    reason to add only to the width of the loaded value, but that's how
    AMD64 works.

    Any language that requires the register-allocated variable to be range constrained exactly like those residing in memory has that property.

    The nice thing about load/store architectures is that you can separate
    these concerns.

    There are side effects wrt HLLs that are not addresses with that view point.

    Have all 7 variants of loads (lbu lbs lsu lss lmu lms ll), four
    variants of store (sb ss sm sl), do addition at full width, and have
    various zero- and sign-extending instructions in the cases where they
    are needed (usually not in connection with addition).

    - anton
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From MitchAlsup@user5857@newsgrouper.org.invalid to comp.arch on Wed Nov 11 00:36:17 2026
    From Newsgroup: comp.arch

    Terje Mathisen <terje.mathisen@tmsw.no> posted:

    MitchAlsup wrote:
    Robert Finch <robfi680@gmail.com> posted:

    On 2026-11-08 11:37 p.m., Lawrence DrCOOliveiro wrote:
    On Sun, 8 Nov 2026 23:11:46 -0500, Robert Finch wrote:

    On 2026-11-08 7:01 p.m., Lawrence DrCOOliveiro wrote:

    The RISC-V designers quite rightly criticize this combinatorial
    explosion of instruction variants as going completely against the
    whole idea of a *reduced* instruction set computer (which is what
    rCLRISCrCY is supposed to stand for).

    It is partly a representation issue. IDK how it would be avoided,
    scratched my head over this one.

    I think they do it by specifying the data type of the operands in
    another control register.

    I went with the hoards of instructions approach. But the size of the
    operand is specified in a config register.

    How would you vectorize:

    LOOP on i
    {
    DoubleWord[i] = WORD[i] |u HalfWord[i] + Byte[i+2];
    }


    Relatively easy:


    Unroll by 16:

    load 4 W entries into ymm0
    load 4 W entries into ymm1
    load 4 W entries into ymm2
    load 4 W entries into ymm3

    load 8 HW entries into ymm4
    load 8 HW entries into ymm5

    load 16 B entries into ymm6

    //
    expand low half of ymm4 into ymm7
    expand high half of ymm4 in place

    // Ditto for ymm5/ymm8

    //
    // expand ymm6 into ymm9, ymm6, then both of these into two more regs.


    See you did get my point--at least part of it.

    Now constrain i to the range{1..14} and try again.

    After all inputs have been expanded into the final DW element size, do
    the muls and adds.

    With a total of ~20 size expansion operations, they might well end up as
    a very significant part of the total runtime.

    If the architecture has doubling parallel MULs, then that would save
    quite a few operations.

    Terje




    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From MitchAlsup@user5857@newsgrouper.org.invalid to comp.arch on Wed Nov 11 00:37:14 2026
    From Newsgroup: comp.arch

    John Levine <johnl@taugh.com> posted:

    It appears that Anton Ertl <anton@mips.complang.tuwien.ac.at> said:
    There used to be memory-to-memory vector machines, and there used to
    be vector machines with vector registers, like the Cray-1.

    There still are. zSeries has 16 vector registers and an impressively overimplemented set of vector ops including integers, IEEE floats,
    strings, and packed decimal.

    It's not clear who this is for, but presumably there are customers
    that wanted them enough to add them.

    At the cost of a Zseries, the vector unit is essentially free.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From MitchAlsup@user5857@newsgrouper.org.invalid to comp.arch on Wed Nov 11 00:38:19 2026
    From Newsgroup: comp.arch

    Stefan Monnier <monnier@iro.umontreal.ca> posted:

    David Brown [2026-11-10 10:31:47] wrote:
    It is also, I think, helpful to consider RISC as the "opposite" of
    CISC - and Complex Instruction Set Computer cannot really be
    interpreted as meaning anything other than that the instructions are "complex". By comparison, with RISC the /instructions/ are "reduced".

    Indeed. And one of the motivations behind the CISC evolution was the
    famed "semantic gap", which pushed towards rather fewer instructions
    that are more flexible, regular, and powerful.

    The million instructions of AES don't feel very CISCy to me.

    Nor does a million instructions of AES feel very RISCy to me.


    === Stefan
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Stephen Fuld@sfuld@alumni.cmu.edu.invalid to comp.arch on Tue Nov 10 16:52:36 2026
    From Newsgroup: comp.arch

    On 11/10/2026 12:00 PM, MitchAlsup wrote:
    Stephen Fuld <sfuld@alumni.cmu.edu.invalid> posted:

    On 11/9/2026 2:01 PM, Anton Ertl wrote:
    Stephen Fuld <sfuld@alumni.cmu.edu.invalid> writes:
    I can't speak to the hardware complexity of the implementation. Perhaps >>>> that is a limiting factor. But barring that, and the mental effort
    required to "reorient" your thinking, I don't see why any new clean
    sheet design would use SIMD instructions. Perhaps someone can explain >>>> why it should.

    There used to be memory-to-memory vector machines, and there used to
    be vector machines with vector registers, like the Cray-1. The
    advantage of the vector registers was that they could be used several
    or even many times for each time they are loaded, as is common in
    matrix multiplication implementations.

    My impression is that VVM can only do what memory-to-memory vector
    machines could do, but does not have a good story for those tasks
    where the vector/SIMD registers are used several times.

    That is an interesting, and thought provoking, response. It seems the
    advantage of an SIMD approach is the large set of addressable registers
    that can be used to keep data readily available for future use. Of
    course, both systems can keep a modest amount of data in the non SIMD
    registers, and VVM has streaming buffers, which dedicate memory within
    the CPU for other purposes.

    I don't know if, when doing things like matrix multiplication, the
    streaming buffers can be used to keep data around as well as their role
    in anticipating future use. And, for matmul in particular, perhaps you
    could break the operation down into small enough blocks that the
    non-SIMD registers would be enough. This all requires more thought.

    I respect Mitch's abilities such that I can't believe he hasn't thought
    about how VVM would handle such a common operation as matrix multiplication.

    Blocking in the DCache.

    So how well does that perform compared to a "typical" SIMD approach?
    --
    - Stephen Fuld
    (e-mail address disguised to prevent spam)
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Robert Finch@robfi680@gmail.com to comp.arch on Wed Nov 11 02:15:40 2026
    From Newsgroup: comp.arch

    On 2026-11-10 2:32 p.m., MitchAlsup wrote:
    Robert Finch <robfi680@gmail.com> posted:

    On 2026-11-08 11:37 p.m., Lawrence DrCOOliveiro wrote:
    On Sun, 8 Nov 2026 23:11:46 -0500, Robert Finch wrote:

    On 2026-11-08 7:01 p.m., Lawrence DrCOOliveiro wrote:

    The RISC-V designers quite rightly criticize this combinatorial
    explosion of instruction variants as going completely against the
    whole idea of a *reduced* instruction set computer (which is what
    rCLRISCrCY is supposed to stand for).

    It is partly a representation issue. IDK how it would be avoided,
    scratched my head over this one.

    I think they do it by specifying the data type of the operands in
    another control register.

    I went with the hoards of instructions approach. But the size of the
    operand is specified in a config register.

    How would you vectorize:

    LOOP on i
    {
    DoubleWord[i] = WORD[i] |u HalfWord[i] + Byte[i+2];
    }

    ???

    I been busy. The operand size and number of registers are now encoded in
    the instruction.

    For the above, the values would need to be extended to the largest
    operand size and it is really ugly to do ATM. Basically have to extract
    the elements of the vector and insert them into a new temp one.

    At least I do not have a
    different instruction for each size. Data type is usually determined by
    the instruction. vadd for vector integer add, vfadd for float add, etc.







    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Robert Finch@robfi680@gmail.com to comp.arch on Wed Nov 11 04:10:39 2026
    From Newsgroup: comp.arch

    On 2026-11-10 4:44 p.m., Terje Mathisen wrote:
    MitchAlsup wrote:
    Robert Finch <robfi680@gmail.com> posted:

    On 2026-11-08 11:37 p.m., Lawrence DrCOOliveiro wrote:
    On Sun, 8 Nov 2026 23:11:46 -0500, Robert Finch wrote:

    On 2026-11-08 7:01 p.m., Lawrence DrCOOliveiro wrote:

    The RISC-V designers quite rightly criticize this combinatorial
    explosion of instruction variants as going completely against the
    whole idea of a *reduced* instruction set computer (which is what
    rCLRISCrCY is supposed to stand for).

    It is partly a representation issue. IDK how it would be avoided,
    scratched my head over this one.

    I think they do it by specifying the data type of the operands in
    another control register.

    I went with the hoards of instructions approach. But the size of the
    operand is specified in a config register.

    How would you vectorize:

    -a-a-a-a-a-a LOOP on i
    -a-a-a-a-a-a {
    -a-a-a-a-a-a-a-a-a-a-a DoubleWord[i] = WORD[i] |u HalfWord[i] + Byte[i+2]; >> -a-a-a-a-a-a }


    Relatively easy:


    Unroll by 16:

    -a-a load 4 W entries into ymm0
    -a-a load 4 W entries into ymm1
    -a-a load 4 W entries into ymm2
    -a-a load 4 W entries into ymm3

    -a-a load 8 HW entries into ymm4
    -a-a load 8 HW entries into ymm5

    -a-a load 16 B entries into ymm6

    //
    -a-a expand low half of ymm4 into ymm7
    -a-a expand high half of ymm4 in place

    // Ditto for ymm5/ymm8

    //
    //-a-a expand ymm6 into ymm9, ymm6, then both of these into two more regs.

    After all inputs have been expanded into the final DW element size, do
    the muls and adds.

    With a total of ~20 size expansion operations, they might well end up as
    a very significant part of the total runtime.

    If the architecture has doubling parallel MULs, then that would save
    quite a few operations.

    Terje




    ; Qupls code (in theory)
    not as bad as I thought because the vectors are accessible in chunks
    itrCOs about 36 instructions assuming a max vector length of eigth regs.

    ; LOOP on i
    ; {
    ; DoubleWord[i] = WORD[i] |u HalfWord[i] + Byte[i+2];
    ; }
    ; four double words in DoubleWord = {r25rCar18}
    ; four words in WORD = {r11...r8}
    ; four half word in HalfWord = {r7,r6}
    ; four bytes in Byte[i+2] = lower half of {r5}
    ; temp = {r4,r3}
    ; temp double word = {r35rCar28}

    MOVSXT r28,r6,$tetra0 ; r28 = sign extend (halfword[i])
    MUL %r3,%r28,%r8
    MULH %r4,%r28,%r8 ; {r4,r3} = word[i] * halfword[i]
    MOVSXB %r28,%r5 ;
    ASR %r29,%r28,$64 ; {r29,r28} = byte[i+2]
    ADD %r18,%r3,%r28 ; add low half
    ADD_GCY %r2,%r3,%r28
    ADD %r19,%r4,%r29,%r2 ; {r19,18} = result
    ; unroll three more times

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Wed Nov 11 09:37:08 2026
    From Newsgroup: comp.arch

    Stefan Monnier <monnier@iro.umontreal.ca> writes:
    My impression is that VVM can only do what memory-to-memory vector
    machines could do, but does not have a good story for those tasks
    where the vector/SIMD registers are used several times.

    Presumably caches could be used to get comparable results.

    Let's take Zen6 (because its capabilities have just been reported on <https://chipsandcheese.com/p/amds-zen-6-family-feeding-the-beast>):

    It can do 2 512-bit FMAs per cycle, each consuming 3 512-bit inputs
    and generating 1 512-bit output, and, e.g. matrix multiplication can
    get a good utilization from these units.

    So in the worst case, if you need all the inputs from caches and
    outputs to caches, you would need to be able to perform 6 512-bit
    loads and 2 512-bit stores per cycle. The actual Zen6 can perform 2
    512-bit loads and (?) 1 512-bit store per cycle (and it's unclear from
    the graphics whether the 2 loads and 1 store can happen in the same
    cycle).

    It may be possible to reduce the number of needed load or store ports
    a little for matrix multiplication in VVM, e.g., by computing the sum
    of several multiplications before storing, and/or by performing
    multiplications of a vector with a scalar (SAXPY-style). Fortunately,
    matrix multiplication provides lots of freedoms in rearranging the
    computation. Nevertheless, I would be surprised if one could achieve
    the same FPU/LSU ratio with VVM as one can achieve with AVX-512.

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Wed Nov 11 09:57:30 2026
    From Newsgroup: comp.arch

    Stefan Monnier <monnier@iro.umontreal.ca> writes:
    The million instructions of AES don't feel very CISCy to me.

    Not sure what you mean by that.

    Intel's AES instruction set has 6 instructions <https://en.wikipedia.org/wiki/AES-NI> and later they added 4 AVX-512
    variants <https://en.wikipedia.org/wiki/AVX-512#VAES>. As usual for
    SSE (AES-NI) and AVX-512 instructions, one operand can be either in a
    register or in memory. So that's not RISC. If you only do these
    instructions with register operands, they look RISCy to me. If you
    mean the dynamic use of the instructions, you need to use AESENC 9
    times and then call AESENCLAST omc to perform an AES-128 computation;
    you need to prepare the key in 10 XMM/ZMM registers first. in this
    respect it is RISCy, rather than the CISCy approach of doing the full computation in one instruction.

    A more borderline issue is some crypto instruction (or several?) in
    ARM A64, that uses IIRC 8 registers for its work. IIRC the registers
    are implicit in the instruction (unusual for RISC, but given the
    number of registers involved...), and the instruction does so many
    dependent operations that I think of a microcode engine for
    implementing it, so it has a certain CISCy feeing. But OTOH, the
    instruction only accesses registers, so it avoids the usual
    complications of CISCs, such as possibly having a page fault in the
    middle of the computation. Unfortunately, I don't remember further
    details.

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Terje Mathisen@terje.mathisen@tmsw.no to comp.arch on Wed Nov 11 14:56:17 2026
    From Newsgroup: comp.arch

    MitchAlsup wrote:
    Terje Mathisen <terje.mathisen@tmsw.no> posted:

    MitchAlsup wrote:
    Robert Finch <robfi680@gmail.com> posted:

    On 2026-11-08 11:37 p.m., Lawrence D|ore4raoOliveiro wrote:
    On Sun, 8 Nov 2026 23:11:46 -0500, Robert Finch wrote:

    On 2026-11-08 7:01 p.m., Lawrence D|ore4raoOliveiro wrote:

    The RISC-V designers quite rightly criticize this combinatorial
    explosion of instruction variants as going completely against the>>>>>>> whole idea of a *reduced* instruction set computer (which is what>>>>>>> |ore4+oRISC|ore4-Y is supposed to stand for).

    It is partly a representation issue. IDK how it would be avoided,
    scratched my head over this one.

    I think they do it by specifying the data type of the operands in
    another control register.

    I went with the hoards of instructions approach. But the size of the>>>> operand is specified in a config register.

    How would you vectorize:

    LOOP on i
    {
    DoubleWord[i] = WORD[i] |arCo HalfWord[i] + Byte[i+2];
    }


    Relatively easy:


    Unroll by 16:

    load 4 W entries into ymm0
    load 4 W entries into ymm1
    load 4 W entries into ymm2
    load 4 W entries into ymm3

    load 8 HW entries into ymm4
    load 8 HW entries into ymm5

    load 16 B entries into ymm6

    //
    expand low half of ymm4 into ymm7
    expand high half of ymm4 in place

    // Ditto for ymm5/ymm8

    //
    // expand ymm6 into ymm9, ymm6, then both of these into two more regs.


    See you did get my point--at least part of it.
    Oh, I most certainly "got" it. :-)
    When the data inputs don't fit inside the "one size fits everything",
    then SIMD becomes much more convoluted.

    Now constrain i to the range{1..14} and try again.
    If we only have 14 operations, then it becomes like the final iteration
    of a 16-wide unrolled loop where you have to play some tricks to avoid accessing invalid memory addresses, mask away the unused slots and use a masked write to store the results back. This is of course even more
    convoluted than the regular iteration!
    OTOH, with just 14 iterations, this is by definition not a time-critical operation.
    Instead, it is almost tailor-made for Mill with masked operations, None elements that don't get stored etc.
    Terje
    --
    - <Terje.Mathisen at tmsw.no>
    "almost all programming can be viewed as an exercise in caching"
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Terje Mathisen@terje.mathisen@tmsw.no to comp.arch on Wed Nov 11 15:04:11 2026
    From Newsgroup: comp.arch

    Stephen Fuld wrote:
    On 11/10/2026 12:00 PM, MitchAlsup wrote:
    Stephen Fuld <sfuld@alumni.cmu.edu.invalid> posted:
    I respect Mitch's abilities such that I can't believe he hasn't thought
    about how VVM would handle such a common operation as matrix
    multiplication.

    Blocking in the DCache.

    So how well does that perform compared to a "typical" SIMD approach?


    My guess would be "quite well".

    A decade or two ago AMD published benchmark code for a relatively simple kernel where the final version ran about 3 x faster than the naive version:

    From memory, they started by prefetching 4KB of data, by actually
    loading and discarding the first byte of each 64-byte cache line (this
    was significatnly faster than using the PREFETCH hint operations), then
    they used load-and-operate on this 4 KB of input data (together with
    some other either local memory or register data), storing the results
    back to a local (cache-resident) 4 KB buffer, before the third and final iteration stored the 4KB to the final target, using Non-Temporal stores
    that would bypass the caches since this was data which would not be
    reused shortly.

    Omitting/bypassing any of these "extra" steps made the code run slower.

    Terje
    --
    - <Terje.Mathisen at tmsw.no>
    "almost all programming can be viewed as an exercise in caching"
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From BGB@cr88192@gmail.com to comp.arch on Wed Nov 11 14:37:02 2026
    From Newsgroup: comp.arch

    On 11/10/2026 11:08 AM, Stefan Monnier wrote:
    David Brown [2026-11-10 10:31:47] wrote:
    It is also, I think, helpful to consider RISC as the "opposite" of
    CISC - and Complex Instruction Set Computer cannot really be
    interpreted as meaning anything other than that the instructions are
    "complex". By comparison, with RISC the /instructions/ are "reduced".

    Indeed. And one of the motivations behind the CISC evolution was the
    famed "semantic gap", which pushed towards rather fewer instructions
    that are more flexible, regular, and powerful.


    I can note that one goal I pushed for in my ISA design was to reduce
    executed instruction counts without raising the level of abstraction or
    having complex logic.

    Though, this mostly ends up creating a pressure towards a larger GPR
    space and having the ability to encode larger immediate and displacement fields and similar for the cases where spills were common.


    Also the LUI+ADDI scheme used by RISC-V, while very effective as a
    fallback case for a 32-bit machine, falls on its face for 64-bit
    machines. Also the design of the ISA starts to fall on its face the
    moment one has a struct or similar that is larger than 2K.

    So:
    LUI+ADD+LW/SW => Sucks...
    Well, and:
    SLL+ADD+LW/SW => Also sucks.
    ...

    And people keep over-relying on optimizing designs for the SPEC
    benchmark, rather than across larger and more varied codebases (that
    would ideally not cost money to access).

    Like, using a specific set of standardized benchmarks to drive feature
    and optimization decisions is equivalent to "teaching for the test" in education settings, which, while it does increase test-scores, is none
    the less an anti-pattern.


    Better to find a range of codebases, and try to find codebases and
    scenarios for which things suck, and then try to make them "suck less".
    When the amount of "suck" can reduced, then typically everything gets
    better in a more indirect way.


    But, what you don't necessarily want, is a bunch of overly specialized
    widgets that only happen in certain benchmarks...

    Well, with some exceptions, like my ISA did end up with some amount of instructions that are a bit specialized towards graphics processing
    tasks and similar.



    And, like, if one were doing a lot of work with JPEG or similar, a case
    could be made for things like YUV -> RGB converters and similar.
    Nevermind the specific version of YUV.

    Some of my stuff used an approximation, say:
    Y=(4*G+3*R+B)/8; U=(B-Y)/2+128; V=(R-Y)/2+128;

    Which while not an exact match for the standard color spaces, is "close enough". If mashing the result into RGB555 it may not really matter.
    Could be realized relatively affordably in a hardware implementation.

    Well, and say:
    Y=(9*G+5*R+2*B)/16;
    ...
    Would be more accurate, but slightly less cheap to convert back to RGB
    (even if, yes, these factors still allow the multiplications to be done
    via a LEA instruction or similar; it results in the reverse-side Green conversion no longer being a plain shift).

    Say:
    G=(8*Y-3*R-B)>>2;
    Vs:
    G=((16*Y-5*R-2*B)*57)>>9;


    Note, although the standard math is a bit different, it more or less
    amounts to subtracting Y for forming U and V (not exactly, but doing it
    more accurately would make the conversion back to RGB more expensive).

    As can be noted, within an RGB555 target space, the error from going
    mix/match with YCbCr / BT.601 is mostly small enough that (apart from
    high saturation colors) mostly falls below the level of RGB555 rounding
    error (and, with high saturation, still mostly +/- 1 for points within
    the gamut).


    There is also RCT which I use a lot as well, but this is pros/cons (and
    if one goes mix and match between RCT and YCbCr, the visual result of a mismatch is a lot more obvious).

    Well, and GDbDr, which while the cheapest option, is also the least good.


    The million instructions of AES don't feel very CISCy to me.


    === Stefan

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Michael S@already5chosen@yahoo.com to comp.arch on Wed Nov 11 22:47:47 2026
    From Newsgroup: comp.arch

    On Tue, 10 Nov 2026 22:02:12 -0000 (UTC)
    John Levine <johnl@taugh.com> wrote:

    It appears that Anton Ertl <anton@mips.complang.tuwien.ac.at> said:
    There used to be memory-to-memory vector machines, and there used to
    be vector machines with vector registers, like the Cray-1.

    There still are. zSeries has 16 vector registers and an impressively overimplemented set of vector ops including integers, IEEE floats,
    strings, and packed decimal.

    It's not clear who this is for, but presumably there are customers
    that wanted them enough to add them.


    I would think that current zSeries vector registers and an engine they
    feed belong to the same school of thought as Intel/AMD AVX512 or
    Fujitsu A64Fx and their SPARC CPUs with fx suffix or IBM's own
    scalar/vector facility on POWER. That is quite different school from
    CRAY-1 or CRAY-YMP.
    The difference is size of 'beats'.
    Intel/AMD/Fujitsu/POWER and I suppose modern zSeries have beats=1 or 2.
    Rarely 4, typically only on low end implementations.
    On CRAY 'beats' was from 64 to 16.

    IMHO, as long as one has cache beats > 8 is a very bad idea.


    Of course, most zSeries also has outer-product accelerator, which is
    completely different cattle of fish - not very useful for things that
    do not resemble matrix multiplication, but very very useful for things
    that do resemble it.




    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From BGB@cr88192@gmail.com to comp.arch on Wed Nov 11 15:20:39 2026
    From Newsgroup: comp.arch

    On 11/10/2026 6:34 PM, MitchAlsup wrote:
    anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:

    /ERROR "unexpected byte sequence starting at index 590: '\xC3'" while decoding/:

    MitchAlsup <user5857@newsgrouper.org.invalid> writes:
    anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:
    Mashey (and IIRC also Patterson) also discuss the technical background >>>> behind the commonalities in RISCs, so while you may consider the way
    that the criteria were derived to be circular, they are not
    accidental.

    Don't leave out Mark Horowitz

    Duckduckgo does not give me any papers, or web pages about RISC
    definition when I ask it for "Mark Horowitz RISC", unlike for "John
    Mashey RISC". Do you have a specific paper or web page in mind?

    "Architectural Tradeoffs in the Design of MIPS-X" Horowitz and Chow

    Given {signed, Unsigned}|a-u{Byte, halfword, word, doubleword} one has
    8 integer ADDs,

    SPARC and Power have only one add instruction. With a load-store
    architecture, you need only one, the full-width one.

    If you like LLVM compilers having to constrain ADD results with
    SEXT/ZEXT, sure, and you also don't get integer overflow performed
    properly (assuming you want it done at all).

    LLVM takes the (somewhat convoluted) vision that a result in a
    register is range limited to the exact value-set as one stored
    in memory.


    That is "safe", and mostly matches C.

    One trick though in a compiler is to flag intermediate values for cases
    where they may be out of range, and then lazily enforce range if the
    variable is used in a way where this matters.

    Say, adding two char or short variables may produce a temporarily
    out-of-range result, but this can be ignored if it is being immediately
    stored to memory, but the compiler needs to add-in the sign/zero
    extension if it then goes into an arithmetic operation or would flow out
    of the current basic block.


    Otherwise one would need some rarely-used 8 and 16 bit ADD variants.

    Sign and zero extension ops for the common sizes is a solid "nice to
    have" though (using a pair of shifts kinda sucks).


    Only with
    load-and-add instructions, you need to specify the width in the
    addition, and whether you want the loaded value to be sign-extended or
    zero-extended (although I think most have only one variant of every
    length). You also then have to ask yourself if you want to perform
    the addition to the full width of the register, or just the width of
    the loaded value, and sign- or zero-extend the result. I see no good
    reason to add only to the width of the loaded value, but that's how
    AMD64 works.

    Any language that requires the register-allocated variable to be range constrained exactly like those residing in memory has that property.


    This is a place where pure RISC-V kinda sucks:
    int x, y, z;
    ...
    z=x+y; //fine, ADDW so all is good.
    ...


    But:
    unsigned int ux, uy, uz;
    ...
    uz=ux+uy; //worse.
    ...
    Standard ABI makes this operation cheaper than it would have been
    otherwise, but in a stupid way that makes more problems than it solves.

    Then:
    short sx, sy, sz;
    ...
    sz=sx+sy; //well, crap.
    ...
    This case is going to kinda suck in RV.


    The nice thing about load/store architectures is that you can separate
    these concerns.

    There are side effects wrt HLLs that are not addresses with that view point.

    Have all 7 variants of loads (lbu lbs lsu lss lmu lms ll), four
    variants of store (sb ss sm sl), do addition at full width, and have
    various zero- and sign-extending instructions in the cases where they
    are needed (usually not in connection with addition).

    - anton

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Stefan Monnier@monnier@iro.umontreal.ca to comp.arch on Wed Nov 11 10:23:54 2026
    From Newsgroup: comp.arch

    MitchAlsup [2026-11-11 00:38:19] wrote:
    Stefan Monnier <monnier@iro.umontreal.ca> posted:
    Indeed. And one of the motivations behind the CISC evolution was the
    famed "semantic gap", which pushed towards rather fewer instructions
    that are more flexible, regular, and powerful.

    The million instructions of AES don't feel very CISCy to me.

    Nor does a million instructions of AES feel very RISCy to me.

    Yeah, if we take CISC as motivated by the desire to provide an assembly language that is comfortable for humans, we can also take RISC as
    motivated by the desire to provide an assembly language that's
    convenient for compilers (which would rather not need to worry about
    tradeoffs between using LD+ADD+ST vs using some fancy addressing mode
    on ADD).

    From that point of view, AES is neither CISCy nor RISCy because it's
    convenient only for the CPU implementors.

    [ In contrast, vVM is definitely RISCy from that standpoint. ]


    === Stefan
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Michael S@already5chosen@yahoo.com to comp.arch on Thu Nov 12 00:14:05 2026
    From Newsgroup: comp.arch

    On Wed, 11 Nov 2026 09:37:08 GMT
    anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote:

    Stefan Monnier <monnier@iro.umontreal.ca> writes:
    My impression is that VVM can only do what memory-to-memory vector
    machines could do, but does not have a good story for those tasks
    where the vector/SIMD registers are used several times.

    Presumably caches could be used to get comparable results.

    Let's take Zen6 (because its capabilities have just been reported on <https://chipsandcheese.com/p/amds-zen-6-family-feeding-the-beast>):

    It can do 2 512-bit FMAs per cycle, each consuming 3 512-bit inputs
    and generating 1 512-bit output, and, e.g. matrix multiplication can
    get a good utilization from these units.

    So in the worst case, if you need all the inputs from caches and
    outputs to caches, you would need to be able to perform 6 512-bit
    loads and 2 512-bit stores per cycle. The actual Zen6 can perform 2
    512-bit loads and (?) 1 512-bit store per cycle (and it's unclear from
    the graphics whether the 2 loads and 1 store can happen in the same
    cycle).

    It may be possible to reduce the number of needed load or store ports
    a little for matrix multiplication in VVM, e.g., by computing the sum
    of several multiplications before storing, and/or by performing multiplications of a vector with a scalar (SAXPY-style). Fortunately,
    matrix multiplication provides lots of freedoms in rearranging the computation. Nevertheless, I would be surprised if one could achieve
    the same FPU/LSU ratio with VVM as one can achieve with AVX-512.

    - anton

    I will be impressed if (for matmul) Mitch demonstrates 1/3rd of
    performance per clock of server-grade Intel's or Zen5 AMD.
    Especially for single precision.


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.arch on Wed Nov 11 22:23:26 2026
    From Newsgroup: comp.arch

    On Wed, 11 Nov 2026 14:37:02 -0600, BGB wrote:

    And people keep over-relying on optimizing designs for the SPEC
    benchmark, rather than across larger and more varied codebases (that
    would ideally not cost money to access).

    Being able to run a Linux kernel seems like a good benchmark to
    include these days: a typical build takes a few million lines of
    source, and real-world performance is critical across a wide range of
    software applications and hardware setups, given how popular Linux has
    become.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Wed Nov 11 22:28:44 2026
    From Newsgroup: comp.arch

    MitchAlsup <user5857@newsgrouper.org.invalid> writes: >anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:
    SPARC and Power have only one add instruction. With a load-store
    architecture, you need only one, the full-width one.

    If you like LLVM compilers having to constrain ADD results with
    SEXT/ZEXT, sure, and you also don't get integer overflow performed
    properly (assuming you want it done at all).

    Actually, it's easier to determine overflow of, e.g., half-width
    addition, if you use full-width addition to do it: If the result of,
    e.g., d=a+b+c does not have the same values for bits 31..63, there has
    been an overflow. It's a checking analogon of sign extension. And
    the cool thing is that it only checks the end result, not intermediate operations.

    But if you think it's reasonable to trap on an immediate overflow even
    if the end result is in range, nobody forbids doing the check after
    every step. Or, if you prefer flags, have flags not just for
    full-width overflow, but also for half-width overflow, for
    quarter-width overflow, and for byte overflow.

    LLVM takes the (somewhat convoluted) vision that a result in a
    register is range limited to the exact value-set as one stored
    in memory.

    Let's test that theory:

    int foo(int a, int b, int c)
    {
    return a+b+c;
    }

    Use clang-19 on a Power9 machine to compile this, and disassemble the
    result:

    clang -O3 -c xxx.c && objdump -d xxx.o

    Here's the disassembly of foo():

    0000000000000000 <foo>:
    0: 14 1a 64 7c add r3,r4,r3
    4: 14 2a 63 7c add r3,r3,r5
    8: b4 07 63 7c extsw r3,r3
    c: 20 00 80 4e blr

    I get the same result when foo() is defined as:

    int foo(int a, int b, int c)
    {
    int d=a+b;
    return d+c;
    }

    Nope, no sign-extending every result in a register. Only the end
    result is sign-extended, because the ABI of Power demands sign
    extension for signed ints. With current C coding practices, using
    don't-care extension when returning ints might be possible, but in the
    1990s when the Power 64-bit ABI was designed, there were enough
    function calls without or with wrong prototypes that requiring
    sign-extension for signed ints resulted in significantly less
    breakage.

    Only with
    load-and-add instructions, you need to specify the width in the
    addition, and whether you want the loaded value to be sign-extended or
    zero-extended (although I think most have only one variant of every
    length). You also then have to ask yourself if you want to perform
    the addition to the full width of the register, or just the width of
    the loaded value, and sign- or zero-extend the result. I see no good
    reason to add only to the width of the loaded value, but that's how
    AMD64 works.

    Any language that requires the register-allocated variable to be range >constrained exactly like those residing in memory has that property.

    Apart from assembly languages, I don't know any languages that have
    any requirements for "register-allocated variable". As for the
    requirement for variables in general, they usually do not specify what
    the bits beyond the bits needed to represent the type should look
    like. ABIs do, but they are all over the place, and only relevant at
    call boundaries.

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From MitchAlsup@user5857@newsgrouper.org.invalid to comp.arch on Thu Nov 12 02:32:34 2026
    From Newsgroup: comp.arch

    BGB <cr88192@gmail.com> posted:

    On 11/10/2026 11:08 AM, Stefan Monnier wrote:
    David Brown [2026-11-10 10:31:47] wrote:
    It is also, I think, helpful to consider RISC as the "opposite" of
    CISC - and Complex Instruction Set Computer cannot really be
    interpreted as meaning anything other than that the instructions are
    "complex". By comparison, with RISC the /instructions/ are "reduced".

    Indeed. And one of the motivations behind the CISC evolution was the
    famed "semantic gap", which pushed towards rather fewer instructions
    that are more flexible, regular, and powerful.


    I can note that one goal I pushed for in my ISA design was to reduce executed instruction counts without raising the level of abstraction
    or having complex logic.

    For my part, My 66000 was restricted to not add more than 1 gate of delay
    per cycle to any stage of the pipeline.

    Though, this mostly ends up creating a pressure towards a larger GPR
    space and having the ability to encode larger immediate and displacement fields and similar for the cases where spills were common.

    I did not find that, given that I waste no registers for immediates or displacements.

    Also the LUI+ADDI scheme used by RISC-V, while very effective as a
    fallback case for a 32-bit machine, falls on its face for 64-bit
    machines. Also the design of the ISA starts to fall on its face the
    moment one has a struct or similar that is larger than 2K.

    So:
    LUI+ADD+LW/SW => Sucks...
    Well, and:
    SLL+ADD+LW/SW => Also sucks.
    ...

    And the only thing that always works is:

    MEM Rd,[Rbase,Rindex<<scale,#displacement{32 or 64}]

    You can access anything anywhere in a 64-bit VAS in 1 instruction--
    including transferring control through GOT.

    -------------------
    And, like, if one were doing a lot of work with JPEG or similar, a case could be made for things like YUV -> RGB converters and similar.
    Nevermind the specific version of YUV.

    Some of my stuff used an approximation, say:
    Y=(4*G+3*R+B)/8; U=(B-Y)/2+128; V=(R-Y)/2+128;

    Which while not an exact match for the standard color spaces, is "close enough". If mashing the result into RGB555 it may not really matter.
    Could be realized relatively affordably in a hardware implementation.

    Well, and say:
    Y=(9*G+5*R+2*B)/16;
    ...
    Would be more accurate, but slightly less cheap to convert back to RGB
    (even if, yes, these factors still allow the multiplications to be done
    via a LEA instruction or similar; it results in the reverse-side Green conversion no longer being a plain shift).

    Say:
    G=(8*Y-3*R-B)>>2;
    Vs:
    G=((16*Y-5*R-2*B)*57)>>9;

    My point on all of this is to find a way to avoid approximations and
    get the well defined math done cheaply.


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Andy Valencia@vandys@vsta.org to comp.arch on Wed Nov 11 19:53:06 2026
    From Newsgroup: comp.arch

    Stefan Monnier <monnier@iro.umontreal.ca> writes:
    Yeah, if we take CISC as motivated by the desire to provide an assembly language that is comfortable for humans, we can also take RISC as
    motivated by the desire to provide an assembly language that's
    convenient for compilers (which would rather not need to worry about tradeoffs between using LD+ADD+ST vs using some fancy addressing mode
    on ADD).

    That said, MIPS was a remarkably comfortable instruction set in which
    to hand-write assembly.

    Andy Valencia
    Home page: https://www.vsta.org/andy/
    To contact me: https://www.vsta.org/contact/andy.html
    No AI was used in the composition of this message
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Thu Nov 12 05:55:53 2026
    From Newsgroup: comp.arch

    John Levine <johnl@taugh.com> writes:
    It appears that Anton Ertl <anton@mips.complang.tuwien.ac.at> said:
    There still are. zSeries has 16 vector registers and an impressively >overimplemented set of vector ops including integers, IEEE floats,
    strings, and packed decimal.

    Any relation to the vector facility of the 3090 model 9021/9121?

    I see on
    <https://en.wikipedia.org/wiki/Z/Architecture#Vector_facility> that
    the z13 (from 2015) introduced a vector facility with "32 vector
    registers, each 128 bits wide". Have they introduced long vectors in
    addition? About the vector facility of the z13 Wikipedia says:

    |The older vector processor facility first introduced from the IBM 3090
    |and also supported in the ES/9000 is not supported in z/Architecture.

    It's not clear who this is for, but presumably there are customers
    that wanted them enough to add them.

    One idea might be that auto-vectorization was becoming widespread in
    2015 (with gcc and LLVM doing it), probably with exaggerated
    expectations concerning its efficacy. So a reason for adding these instructions might be FOMO on the side of the s390x architects and/or
    their customers.

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Thomas Koenig@tkoenig@netcologne.de to comp.arch on Thu Nov 12 06:53:49 2026
    From Newsgroup: comp.arch

    Stephen Fuld <sfuld@alumni.cmu.edu.invalid> schrieb:

    It seems the
    advantage of an SIMD approach is the large set of addressable registers
    that can be used to keep data readily available for future use.

    Plus, you can do wide permutes, and it can also help with reduction.
    Having mask for reducing operations also helps (or a length field).

    There is one other thing that VVM does not do natively: Reductions
    on commutative operators. Consider the implementation of a simple
    SUM intrinsic of FORTRAN. If you write the assembly equivalent of

    s = 0;
    for (long int i=0; i<n; i++)
    s = s + a[i];

    then VVM will add a loop-carried dependency. For faster code
    on long arrays one can unroll the loop, like

    tmp[0] = 0;
    tmp[1] = 0;
    tmp[2] = 0;
    tmp[3] = 0;
    n_end = (n / 4) * 4;
    for (long int i = 0; i < n_nend; i++)
    {
    tmp[0] = tmp[0] + a[i];
    tmp[1] = tmp[1] + a[i+1];
    tmp[2] = tmp[2] + a[i+2];
    tmp[3] = tmp[3] + a[i+3];
    }
    for (long int i = 0; i < n % 4; i++)
    tmp[i] = tmp[i] + a[i+n_end];

    s = tmp[0] + tmp[1] + tmp[2] + tmp[3];

    (hope I got this right) but if that is needed, one might as well
    use an SIMD register - it is as complex, and register pressure is,
    of course, much higher if you use general-purpose registers.
    --
    This USENET posting was made without artificial intelligence,
    artificial impertinence, artificial arrogance, artificial stupidity,
    artificial flavorings or artificial colorants.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Thu Nov 12 06:21:21 2026
    From Newsgroup: comp.arch

    Stefan Monnier <monnier@iro.umontreal.ca> writes:
    Yeah, if we take CISC as motivated by the desire to provide an assembly >language that is comfortable for humans, we can also take RISC as
    motivated by the desire to provide an assembly language that's
    convenient for compilers (which would rather not need to worry about >tradeoffs between using LD+ADD+ST vs using some fancy addressing mode
    on ADD).

    The fancy addressing mode is the same whether you use it with a LD, a
    ST, or an ADD.

    Compilers actually have no problem using that addressing mode,
    especially in an architecture like VAX: When the variable resides in a register, use a register, when it's in memory, use the appropriate
    addressing mode.

    It's just that with the 16 registers of S/360 and a compiler that
    allocates variables into registers, most accesses are to registers.

    And the more fancy addressing modes are not difficult for the
    compiler, either (optimality is more difficult, but for trees has been
    reached with tree-parsing, as used in burg or iburg). But these
    addressing modes are not used much, not by compilers, nor by humans
    (IIRC the IBM 801 group looked at existing S/370 code), because the corresponding access patterns are not used much.

    The IBM 801 group included hardware and compiler people, so they were
    aware of what compilers could do, and also what hardware would run
    fast, and when they aimed to achieve a very fast machine, they created
    at RISC.

    The Berkeley RISC projects included no compiler people, and they just
    wanted to avoid the complexities of architectures like VAX, and also
    arrived at RISC (but with register windows).

    The Stanford MIPS projects included compiler people, so they worked on designing an architecture that leaned on compilers, in particular
    including architectural load-delay slots.

    One famous example of a CISC instruction is the VAX CALL instruction,
    famous for its slowness. Compilers had no problem generating it. It
    just was faster to use something based on BSR. But I think that the
    compiler that used BSR for better speed instead also used a different
    calling convention that did not have all the features of the VAX CALL,
    which gave cross-language support for various tools such as debuggers.

    We have learned how to do such tools with the more efficient calling conventions we use now, but that does cost a lot of complexity in the
    tools: Generating and using DWARF information etc. Ok, DWARF is not
    just about calling conventions, but it might be interesting to
    consider how much simpler debugging information would be with VAX
    CALLs.

    In any case, the minimum configuration for a VAX apparently was 128KB
    (one memory controller with the minimum amount of memory), so having
    one CALL instruction with a calling convention that made it easy to
    write a cross-language debugger was a benefit that the VAX architects considered worth the performance cost. They also provided BSR, if
    speed was more important than debugability (probably for helper
    routines).

    From that point of view, AES is neither CISCy nor RISCy because it's >convenient only for the CPU implementors.

    AES instructions are not particularly convenient for CPU implementors,
    probably on the contrary, because they need hardware that is not
    useful for anything else. But they are useful for the performance of
    the typical application mix. They tend to be used in libraries, using
    asm statements or (equivalently) intrinsics. Could a compiler
    generate them? It could use pattern-matching to recognize one or a
    few ways of coding AES. But I doubt that anybody has done that. Why
    waste development budget (and later compile-time budget) on such pattern-matching, when it's easier for the programmer to write down
    the asm statements/intrinsics than the code in the base language?

    Likewise, the famed POLY instruction of VAX is there for library use,
    in particular for implementing transcendental functions, not because
    it's something that programmers used often in raw form.

    [ In contrast, vVM is definitely RISCy from that standpoint. ]

    VVM is a microarchitectural mechanism, so architectural concepts like
    RISC and CISC are inappropriate for that. You may want to discuss the
    VEC and LOOP instructions of MY 66000.

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Thu Nov 12 08:21:55 2026
    From Newsgroup: comp.arch

    Thomas Koenig <tkoenig@netcologne.de> writes:
    Stephen Fuld <sfuld@alumni.cmu.edu.invalid> schrieb:

    It seems the
    advantage of an SIMD approach is the large set of addressable registers
    that can be used to keep data readily available for future use.

    Plus, you can do wide permutes, and it can also help with reduction.
    Having mask for reducing operations also helps (or a length field).

    There is one other thing that VVM does not do natively: Reductions
    on commutative operators.

    Associativity is key (and FP addition and multiplication are mostly commutative, but not associative).

    Consider the implementation of a simple
    SUM intrinsic of FORTRAN. If you write the assembly equivalent of

    s = 0;
    for (long int i=0; i<n; i++)
    s = s + a[i];

    then VVM will add a loop-carried dependency. For faster code
    on long arrays one can unroll the loop, like

    tmp[0] = 0;
    tmp[1] = 0;
    tmp[2] = 0;
    tmp[3] = 0;
    n_end = (n / 4) * 4;
    for (long int i = 0; i < n_nend; i++)
    {
    tmp[0] = tmp[0] + a[i];
    tmp[1] = tmp[1] + a[i+1];
    tmp[2] = tmp[2] + a[i+2];
    tmp[3] = tmp[3] + a[i+3];
    }
    for (long int i = 0; i < n % 4; i++)
    tmp[i] = tmp[i] + a[i+n_end];

    s = tmp[0] + tmp[1] + tmp[2] + tmp[3];

    (hope I got this right)

    You confused yourself with trying to use an increment by 1 (why?).
    Better do the loop as follows:

    long i;
    for (i = 0; i < n+1-4; i+=4) {
    ... unrolled body ...
    }
    for (; i<n; i++) {
    ... plain body ...
    }

    Another option for the unrolled body would be:

    tmp = a[i]+b[i]+c[i]+d[i];
    r = r + tmp;

    This variant does not require commutativity, but still associativity,
    and it has the same loop-carried latency (on an OoO CPU).

    But with SIMD, doing parallel adds like you did is a good idea, and
    you can also implement my idea in addition (or unroll more) to perform
    as many SIMD operations per loop-carried latency as the hardware has
    resources for. What I have seen from gcc and/or clang is that they
    use more unrolling.

    AFAIK VVM will not auto-vectorize your code, so reduction is another
    case for which VVM does not have a story AFAICS.

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From John Levine@johnl@taugh.com to comp.arch on Thu Nov 12 17:36:22 2026
    From Newsgroup: comp.arch

    According to Anton Ertl <anton@mips.complang.tuwien.ac.at>:
    John Levine <johnl@taugh.com> writes:
    It appears that Anton Ertl <anton@mips.complang.tuwien.ac.at> said:
    There still are. zSeries has 16 vector registers and an impressively >>overimplemented set of vector ops including integers, IEEE floats,
    strings, and packed decimal.

    Any relation to the vector facility of the 3090 model 9021/9121?

    As far as I can tell, no. The 3090 had 16 vector registers each of
    which could hold 128 elements: integer, float, or by pairing registers,
    double. The z has 16 registers which can hold all sorts of stuff.

    It's not clear who this is for, but presumably there are customers
    that wanted them enough to add them.

    One idea might be that auto-vectorization was becoming widespread in
    2015 (with gcc and LLVM doing it), probably with exaggerated
    expectations concerning its efficacy. So a reason for adding these >instructions might be FOMO on the side of the s390x architects and/or
    their customers.

    Possibly, or they may have had some specific applications where they
    wanted to do a whole lot of decimal arithmetic or string searches.
    --
    Regards,
    John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
    Please consider the environment before reading this e-mail. https://jl.ly
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From MitchAlsup@user5857@newsgrouper.org.invalid to comp.arch on Thu Nov 12 19:19:27 2026
    From Newsgroup: comp.arch

    anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:

    Stefan Monnier <monnier@iro.umontreal.ca> writes:
    Yeah, if we take CISC as motivated by the desire to provide an assembly >language that is comfortable for humans, we can also take RISC as
    motivated by the desire to provide an assembly language that's
    convenient for compilers (which would rather not need to worry about >tradeoffs between using LD+ADD+ST vs using some fancy addressing mode
    on ADD).

    The fancy addressing mode is the same whether you use it with a LD, a
    ST, or an ADD.

    Compilers actually have no problem using that addressing mode,
    especially in an architecture like VAX: When the variable resides in a register, use a register, when it's in memory, use the appropriate
    addressing mode.

    It's just that with the 16 registers of S/360 and a compiler that
    allocates variables into registers, most accesses are to registers.

    And the more fancy addressing modes are not difficult for the
    compiler, either (optimality is more difficult, but for trees has been reached with tree-parsing, as used in burg or iburg). But these
    addressing modes are not used much, not by compilers, nor by humans
    (IIRC the IBM 801 group looked at existing S/370 code), because the corresponding access patterns are not used much.

    CMU circa 1985, there was a master's thesis called "Maximal Munching
    Method" where someone wrote a tree-walker that attempted to match
    as big a tree segment as possible in targeting VAX addressing modes.
    The compiler produced good fast code (for that era).

    The problem was that there was a ">" instead of a "<" in the tree
    analyzer: so, the compiler actually used VAX ISA to produce RISC-like
    code sequences.
    ---------------
    Likewise, the famed POLY instruction of VAX is there for library use,
    in particular for implementing transcendental functions, not because
    it's something that programmers used often in raw form.

    Performing a series of FMAC steps in the FMAC unit is straightforward--
    feeding the polynomial evaluation a series of coefficients is not--
    unless those coefficients are stored in ROM in the FMAC unit itself.
    Thus, My 66000 transcendentals.

    [ In contrast, vVM is definitely RISCy from that standpoint. ]

    VVM is a microarchitectural mechanism, so architectural concepts like
    RISC and CISC are inappropriate for that. You may want to discuss the
    VEC and LOOP instructions of MY 66000.

    - anton
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From EricP@ThatWouldBeTelling@thevillage.com to comp.arch on Thu Nov 12 14:35:24 2026
    From Newsgroup: comp.arch

    On 2026-Nov-12 12:36, John Levine wrote:
    According to Anton Ertl <anton@mips.complang.tuwien.ac.at>:
    John Levine <johnl@taugh.com> writes:
    It appears that Anton Ertl <anton@mips.complang.tuwien.ac.at> said:
    There still are. zSeries has 16 vector registers and an impressively
    overimplemented set of vector ops including integers, IEEE floats,
    strings, and packed decimal.

    Any relation to the vector facility of the 3090 model 9021/9121?

    As far as I can tell, no. The 3090 had 16 vector registers each of
    which could hold 128 elements: integer, float, or by pairing registers, double. The z has 16 registers which can hold all sorts of stuff.

    It's not clear who this is for, but presumably there are customers
    that wanted them enough to add them.

    One idea might be that auto-vectorization was becoming widespread in
    2015 (with gcc and LLVM doing it), probably with exaggerated
    expectations concerning its efficacy. So a reason for adding these
    instructions might be FOMO on the side of the s390x architects and/or
    their customers.

    Possibly, or they may have had some specific applications where they
    wanted to do a whole lot of decimal arithmetic or string searches.


    Floating Point Systems had been selling attached "array processors"
    for PDP-11, VAX-780 and IBM systems since 1976 and colloborated with
    DEC in 1987 attaching to the VAX 8200, 8500, 87/8800. https://en.wikipedia.org/wiki/Floating_Point_Systems https://en.wikipedia.org/wiki/Floating_Point_Systems#Collaboration_with_Digital https://en.wikipedia.org/wiki/FPS_AP-120B

    The 3090 announced its vector unit on 1-Oct-1985
    to replace "discontinued 3838 array processor". https://en.wikipedia.org/wiki/IBM_3090#Vector_facility https://en.wikipedia.org/wiki/Vector_processor#IBM_370_Vector_facility

    DEC started designed their own vector unit in 1986 for the VAX 9000 https://en.wikipedia.org/wiki/VAX_9000#Vector_processor

    It might have been that IBM and DEC looked at the money FPS
    was taking in and decided that they wanted a piece of that action.


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From EricP@ThatWouldBeTelling@thevillage.com to comp.arch on Thu Nov 12 15:06:09 2026
    From Newsgroup: comp.arch

    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.


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Robert Finch@robfi680@gmail.com to comp.arch on Thu Nov 12 15:43:34 2026
    From Newsgroup: comp.arch

    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.

    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?

    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?

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Robert Finch@robfi680@gmail.com to comp.arch on Thu Nov 12 15:49:34 2026
    From Newsgroup: comp.arch

    On 2026-11-12 2:19 p.m., MitchAlsup wrote:
    anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:

    Stefan Monnier <monnier@iro.umontreal.ca> writes:
    Yeah, if we take CISC as motivated by the desire to provide an assembly
    language that is comfortable for humans, we can also take RISC as
    motivated by the desire to provide an assembly language that's
    convenient for compilers (which would rather not need to worry about
    tradeoffs between using LD+ADD+ST vs using some fancy addressing mode
    on ADD).

    The fancy addressing mode is the same whether you use it with a LD, a
    ST, or an ADD.

    Compilers actually have no problem using that addressing mode,
    especially in an architecture like VAX: When the variable resides in a
    register, use a register, when it's in memory, use the appropriate
    addressing mode.

    It's just that with the 16 registers of S/360 and a compiler that
    allocates variables into registers, most accesses are to registers.

    And the more fancy addressing modes are not difficult for the
    compiler, either (optimality is more difficult, but for trees has been
    reached with tree-parsing, as used in burg or iburg). But these
    addressing modes are not used much, not by compilers, nor by humans
    (IIRC the IBM 801 group looked at existing S/370 code), because the
    corresponding access patterns are not used much.

    CMU circa 1985, there was a master's thesis called "Maximal Munching
    Method" where someone wrote a tree-walker that attempted to match
    as big a tree segment as possible in targeting VAX addressing modes.
    The compiler produced good fast code (for that era).

    The problem was that there was a ">" instead of a "<" in the tree
    analyzer: so, the compiler actually used VAX ISA to produce RISC-like
    code sequences.
    ---------------
    Likewise, the famed POLY instruction of VAX is there for library use,
    in particular for implementing transcendental functions, not because
    it's something that programmers used often in raw form.

    Performing a series of FMAC steps in the FMAC unit is straightforward-- feeding the polynomial evaluation a series of coefficients is not--
    unless those coefficients are stored in ROM in the FMAC unit itself.
    Thus, My 66000 transcendentals.

    Why cannot the polynomical coefficients be passed in registers?

    [ In contrast, vVM is definitely RISCy from that standpoint. ]

    VVM is a microarchitectural mechanism, so architectural concepts like
    RISC and CISC are inappropriate for that. You may want to discuss the
    VEC and LOOP instructions of MY 66000.

    - anton

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Stefan Monnier@monnier@iro.umontreal.ca to comp.arch on Thu Nov 12 10:35:53 2026
    From Newsgroup: comp.arch

    Anton Ertl [2026-11-11 09:57:30] wrote:
    Stefan Monnier <monnier@iro.umontreal.ca> writes:
    The million instructions of AES don't feel very CISCy to me.
    Not sure what you mean by that.

    You have to read the above sentence in its context, i.e. preceded by:

    Indeed. And one of the motivations behind the CISC evolution was the
    famed "semantic gap", which pushed towards rather fewer instructions
    that are more flexible, regular, and powerful.

    So what I meant by that is that the AES instructions don't help to
    bridge the semantic gap.


    === Stefan
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From John Levine@johnl@taugh.com to comp.arch on Thu Nov 12 22:05:57 2026
    From Newsgroup: comp.arch

    According to EricP <ThatWouldBeTelling@thevillage.com>:
    Floating Point Systems had been selling attached "array processors"
    for PDP-11, VAX-780 and IBM systems since 1976 and colloborated with
    DEC in 1987 attaching to the VAX 8200, 8500, 87/8800. >https://en.wikipedia.org/wiki/Floating_Point_Systems

    They were fast, but extremely difficult to program because you had to work
    out all the paralellism by hand. Trying to program FPS got Josh Fisher thinking about trace scheduling which led to Multiflow and later Itanium.

    The 3090 announced its vector unit on 1-Oct-1985
    to replace "discontinued 3838 array processor". >https://en.wikipedia.org/wiki/IBM_3090#Vector_facility

    Here's the manual for it.

    https://bitsavers.org/pdf/ibm/3090/GG24-3058-0_IBM_3090_Vector_Facility_Technical_Reference_198607.pdf

    DEC started designed their own vector unit in 1986 for the VAX 9000 >https://en.wikipedia.org/wiki/VAX_9000#Vector_processor

    It might have been that IBM and DEC looked at the money FPS
    was taking in and decided that they wanted a piece of that action.

    Perhaps but I don't get the impression FPS made that much money. In the early 1990s Cray Research bought them and subsequent machines were clusters of SPARC or Intel i860 chips, quite different from the coprocessors.
    --
    Regards,
    John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
    Please consider the environment before reading this e-mail. https://jl.ly
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From MitchAlsup@user5857@newsgrouper.org.invalid to comp.arch on Fri Nov 13 01:17:16 2026
    From Newsgroup: comp.arch

    Robert Finch <robfi680@gmail.com> posted:

    On 2026-11-12 3:06 p.m., EricP wrote:
    On 2026-Nov-10 04:03, Anton Ertl wrote:
    EricP <ThatWouldBeTelling@thevillage.com> writes:
    ---------------------
    IDK how the belt works. Sounds like a familiar architecture with a
    conveyor belt of operands bolted on? When does the belt advance?

    Every time a result is produced.

    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.

    Like a belt but belt is SW controlled (move back to front so the
    result can be used again.)

    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?

    I never found the distinction to be useful--especially when one puts
    Ints in FP and needs all the {ALU, Shifts, Logical} instructions in
    FP FUs.

    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?

    In <gross> effect, separate RFs only allow for more writes/unit-time;
    but only when both files are in simultaneous use. Read ports can be
    provided by duplication.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From MitchAlsup@user5857@newsgrouper.org.invalid to comp.arch on Fri Nov 13 01:18:36 2026
    From Newsgroup: comp.arch

    Robert Finch <robfi680@gmail.com> posted:

    On 2026-11-12 2:19 p.m., MitchAlsup wrote:
    anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:

    Stefan Monnier <monnier@iro.umontreal.ca> writes:
    -----------------------
    Performing a series of FMAC steps in the FMAC unit is straightforward-- feeding the polynomial evaluation a series of coefficients is not--
    unless those coefficients are stored in ROM in the FMAC unit itself.
    Thus, My 66000 transcendentals.

    Why cannot the polynomical coefficients be passed in registers?

    Are you going to make a RS-entry with 9 Src2 operands ???

    [ In contrast, vVM is definitely RISCy from that standpoint. ]

    VVM is a microarchitectural mechanism, so architectural concepts like
    RISC and CISC are inappropriate for that. You may want to discuss the
    VEC and LOOP instructions of MY 66000.

    - anton

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From MitchAlsup@user5857@newsgrouper.org.invalid to comp.arch on Fri Nov 13 01:26:16 2026
    From Newsgroup: comp.arch

    John Levine <johnl@taugh.com> posted:

    According to EricP <ThatWouldBeTelling@thevillage.com>:
    Floating Point Systems had been selling attached "array processors"
    for PDP-11, VAX-780 and IBM systems since 1976 and colloborated with
    DEC in 1987 attaching to the VAX 8200, 8500, 87/8800. >https://en.wikipedia.org/wiki/Floating_Point_Systems

    They were fast, but extremely difficult to program because you had to work out all the paralellism by hand. Trying to program FPS got Josh Fisher thinking about trace scheduling which led to Multiflow and later Itanium.

    So, 4 strikes against him !?!

    The 3090 announced its vector unit on 1-Oct-1985
    to replace "discontinued 3838 array processor". >https://en.wikipedia.org/wiki/IBM_3090#Vector_facility

    Here's the manual for it.

    https://bitsavers.org/pdf/ibm/3090/GG24-3058-0_IBM_3090_Vector_Facility_Technical_Reference_198607.pdf

    DEC started designed their own vector unit in 1986 for the VAX 9000 >https://en.wikipedia.org/wiki/VAX_9000#Vector_processor

    It might have been that IBM and DEC looked at the money FPS
    was taking in and decided that they wanted a piece of that action.

    Perhaps but I don't get the impression FPS made that much money. In the early 1990s Cray Research bought them and subsequent machines were clusters of SPARC
    or Intel i860 chips, quite different from the coprocessors.

    I helped install a FPS system at the Air station in/near Cincinnati
    in 1983-4 attached to a S.E.L. 32/67 that provided the control of
    an F14 cockpit on a 14 ft. boom that could simulate a real 2.5Gs
    {powered by 100 HP hydraulic motor} all manipulated by the FPS
    application.


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From EricP@ThatWouldBeTelling@thevillage.com to comp.arch on Thu Nov 12 21:42:55 2026
    From Newsgroup: comp.arch

    On 2026-Nov-12 17:05, John Levine wrote:
    According to EricP <ThatWouldBeTelling@thevillage.com>:
    The 3090 announced its vector unit on 1-Oct-1985
    to replace "discontinued 3838 array processor".
    https://en.wikipedia.org/wiki/IBM_3090#Vector_facility

    Here's the manual for it.

    https://bitsavers.org/pdf/ibm/3090/GG24-3058-0_IBM_3090_Vector_Facility_Technical_Reference_198607.pdf

    Wikipedia mentions an earlier array processor, the 3838

    https://www.bitsavers.org/pdf/ibm/3838/Array_Processor_Status_Report_Jan76.pdf

    "HARDWARE
    1 MEGABYTE BULK STORE (24K POINTS, 1M-PURCHASE)
    24/48 BIT FRACTION
    ARITHMATIC ELEMENT
    2 ADDERS
    1 MULTIPLIER
    HIGHLY PIPELINED
    100 NS CYCLE
    2-1000 WORD WORKING STORES
    MICROPROGRAMMED
    SHORT/LONG PRECISION
    No ERROR CHECKING
    CONTROL PROCESSOR
    2 MICRO SECOND CYCLE
    CONTROLS DATA TRANSFERS
    HOST TO BULK STORE (3M B/S)
    BULK STORE TO WORKING STORE (40M B/S)
    PROVIDES OVERLAP
    370 CHANNEL INTERFACE

    It mentions an earlier array processor, the 2938, note the date of 1966

    https://www.bitsavers.org/pdf/ibm/2938/Functional_Objectives_for_an_Array_Processor_Nov66.pdf

    "August 1967
    THE 2938 ARRAY PROCESSOR

    The 2938 Array Processor is a peripheral processor for attachment to
    System/360 Models 44, 65, and 75.
    ...
    The arithmetic unit of the 2938 is a multiplication and addition unit which performs the operation Z = U*X +- Y. The unit operates on System/360 short-operand floating-point data only.
    ...
    the combined multiply and add time is effectively 200 nanoseconds,
    whereas the total time for a particular set of U, X I and Y to pass
    through the arithmetic unit to form the resultant Z is approximately
    800 nanoseconds."

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Robert Finch@robfi680@gmail.com to comp.arch on Thu Nov 12 22:14:22 2026
    From Newsgroup: comp.arch

    On 2026-11-12 8:18 p.m., MitchAlsup wrote:
    Robert Finch <robfi680@gmail.com> posted:

    On 2026-11-12 2:19 p.m., MitchAlsup wrote:
    anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:

    Stefan Monnier <monnier@iro.umontreal.ca> writes:
    -----------------------
    Performing a series of FMAC steps in the FMAC unit is straightforward--
    feeding the polynomial evaluation a series of coefficients is not--
    unless those coefficients are stored in ROM in the FMAC unit itself.
    Thus, My 66000 transcendentals.

    Why cannot the polynomical coefficients be passed in registers?

    Are you going to make a RS-entry with 9 Src2 operands ???

    But cannot the calc be broken up into sequential elements?
    Q+ FPOLY instruction expands into multiple FMA micro-ops.
    The micro-ops only need a few src operands. The next coefficient is
    assumed to come from the next register.
    It is using Horner's rule.
    FPOLY has a cascade input option so it can be called as many times as
    desired.

    Of course the Q+ micro-op translator is kinda huge, maybe unworkable IRL.



    [ In contrast, vVM is definitely RISCy from that standpoint. ]

    VVM is a microarchitectural mechanism, so architectural concepts like
    RISC and CISC are inappropriate for that. You may want to discuss the >>>> VEC and LOOP instructions of MY 66000.

    - anton


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Stephen Fuld@sfuld@alumni.cmu.edu.invalid to comp.arch on Thu Nov 12 19:18:22 2026
    From Newsgroup: comp.arch

    On 11/11/2026 10:53 PM, Thomas Koenig wrote:
    Stephen Fuld <sfuld@alumni.cmu.edu.invalid> schrieb:

    It seems the
    advantage of an SIMD approach is the large set of addressable registers
    that can be used to keep data readily available for future use.

    Plus, you can do wide permutes, and it can also help with reduction.
    Having mask for reducing operations also helps (or a length field).

    There is one other thing that VVM does not do natively: Reductions
    on commutative operators.

    When we talked about reductions on VVM in a thread some months ago, I
    thought Mitch said that VVM could parallelize such reductions, including handling an array size that was not a multiple of the number of
    functional units used (i.e. the degree of parallelism), and combining
    the partial sums at the end. As I have said, I am not a hardware guy
    but that sounded impressive and I don't know how he does that.
    --
    - Stephen Fuld
    (e-mail address disguised to prevent spam)
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From George Neuner@gneuner2@comcast.net to comp.arch on Thu Nov 12 23:14:51 2026
    From Newsgroup: comp.arch

    On Tue, 10 Nov 2026 09:03:17 GMT, anton@mips.complang.tuwien.ac.at
    (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

    WRT the Mill, I think people here may be missing that it supported short-vector-SIMD, and that a vector operand on its belt was a single
    element [of whatever width] - not a bunch of scalars that magically
    would be operated on together.

    According to Ivan, the Mill's instruction set supported quad FP and
    128-bit short vector SIMD.
    [Similar width as Intel's SSE2, though SSE_ doesn't do quad FP.]

    He spoke about the potential for [more lanes] wider SIMD and made
    clear that, whatever widths were supported, the "operands" still would
    be treated as single belt elements.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Thomas Koenig@tkoenig@netcologne.de to comp.arch on Fri Nov 13 07:28:36 2026
    From Newsgroup: comp.arch

    Stephen Fuld <sfuld@alumni.cmu.edu.invalid> schrieb:
    On 11/11/2026 10:53 PM, Thomas Koenig wrote:
    Stephen Fuld <sfuld@alumni.cmu.edu.invalid> schrieb:

    It seems the
    advantage of an SIMD approach is the large set of addressable registers
    that can be used to keep data readily available for future use.

    Plus, you can do wide permutes, and it can also help with reduction.
    Having mask for reducing operations also helps (or a length field).

    There is one other thing that VVM does not do natively: Reductions
    on commutative operators.

    When we talked about reductions on VVM in a thread some months ago, I thought Mitch said that VVM could parallelize such reductions, including handling an array size that was not a multiple of the number of
    functional units used (i.e. the degree of parallelism), and combining
    the partial sums at the end. As I have said, I am not a hardware guy
    but that sounded impressive and I don't know how he does that.

    I don't see this in the manuals, at least. Mitch, did I miss it?
    --
    This USENET posting was made without artificial intelligence,
    artificial impertinence, artificial arrogance, artificial stupidity,
    artificial flavorings or artificial colorants.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Fri Nov 13 07:20:00 2026
    From Newsgroup: comp.arch

    EricP <ThatWouldBeTelling@thevillage.com> writes:
    Wikipedia mentions an earlier array processor, the 3838

    https://www.bitsavers.org/pdf/ibm/3838/Array_Processor_Status_Report_Jan76.pdf

    "HARDWARE
    1 MEGABYTE BULK STORE (24K POINTS, 1M-PURCHASE)
    24/48 BIT FRACTION
    ARITHMATIC ELEMENT
    2 ADDERS
    1 MULTIPLIER
    HIGHLY PIPELINED
    100 NS CYCLE
    2-1000 WORD WORKING STORES
    MICROPROGRAMMED
    SHORT/LONG PRECISION
    No ERROR CHECKING
    CONTROL PROCESSOR
    2 MICRO SECOND CYCLE
    CONTROLS DATA TRANSFERS
    HOST TO BULK STORE (3M B/S)
    BULK STORE TO WORKING STORE (40M B/S)
    PROVIDES OVERLAP
    370 CHANNEL INTERFACE

    So that's around the same time as Cray-1, maybe inspired by earlier
    pipelined vector machines by TI and CDC.

    The cycle time is 8 times longer than that of the Cray-1, so the
    Cray-1 probably resulted in very low sales for the 3838.

    The use of the channels for these kinds of accelerators is
    interesting. Maybe this was the inspiration for the way that the SPEs
    in the Cell Broadband Engine (used in, e.g., the Playstation 3)
    interface to the rest of the system. I'll ask Michael Gschwind when I
    see him (he occasionally visits his alma mater).

    While reading up on Cell and Michal Gschwind, I found the following, which leads us back to vector extensions on S390x:

    <https://en.wikipedia.org/wiki/Michael_Gschwind#SIMD_Parallel_vector_architecture>
    |To enable efficient compilation, Gschwind proposed the implementation
    |of merged scalar and vector execution units, eliminating the cost of
    |copies between scalar and vectorized code, and simplifying compiler |architecture by resolving phase ordering problems in compilers.
    |
    |The Cell's accelerator cores (Synergistic Processor Unit SPU) contain
    |a single 128 element register file with 128 bit per register.
    |Registers may hold either scalar or a vector of multiple values.[66]
    |The simplified cost model leads to significantly improved
    |vectorization success, improving overall program performance and |efficiency.[67]
    |
    |The vector-scalar approach was also adopted by the IBM Power VSX
    |(Vector Scalar Extension) SIMD instructions,[68] BlueGene/Q vector |instructions[69][70] and System/z mainframe vector instruction
    |set,[42][71] the design of all three IBM vector-scalar architectures
    |having been led by Gschwind as Chief Architect for IBM System
    |Architecture.

    So IBM reuses architectural (and probably implementation) work across
    its various architectures. This has also happened with decimal FP
    appearing on Power and S390x. So the S390x vector stuff probably was
    not demand-driven, but supply-driven. One would have to compare the
    vector extensions of the various architectures (and architecture
    versions) to see if there are any parts that occur only on some of
    them and where they appear first. One can assume that demand puts the
    feature in the first architecture, and then supply puts it in the
    others.

    It mentions an earlier array processor, the 2938, note the date of 1966

    https://www.bitsavers.org/pdf/ibm/2938/Functional_Objectives_for_an_Array_Processor_Nov66.pdf

    "August 1967
    THE 2938 ARRAY PROCESSOR

    The 2938 Array Processor is a peripheral processor for attachment to >System/360 Models 44, 65, and 75.
    ...
    The arithmetic unit of the 2938 is a multiplication and addition unit which >performs the operation Z = U*X +- Y. The unit operates on System/360 >short-operand floating-point data only.
    ...
    the combined multiply and add time is effectively 200 nanoseconds,
    whereas the total time for a particular set of U, X I and Y to pass
    through the arithmetic unit to form the resultant Z is approximately
    800 nanoseconds."

    Should I interpret that as 800ns latency with a throughput of 1/200ns?
    That would then be an early case of a pipelined vector processor.

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Thomas Koenig@tkoenig@netcologne.de to comp.arch on Fri Nov 13 08:46:41 2026
    From Newsgroup: comp.arch

    John Levine <johnl@taugh.com> schrieb:
    According to EricP <ThatWouldBeTelling@thevillage.com>:
    Floating Point Systems had been selling attached "array processors"
    for PDP-11, VAX-780 and IBM systems since 1976 and colloborated with
    DEC in 1987 attaching to the VAX 8200, 8500, 87/8800. >>https://en.wikipedia.org/wiki/Floating_Point_Systems

    They were fast, but extremely difficult to program because you had to work out all the paralellism by hand. Trying to program FPS got Josh Fisher thinking about trace scheduling which led to Multiflow and later Itanium.

    The 3090 announced its vector unit on 1-Oct-1985
    to replace "discontinued 3838 array processor". >>https://en.wikipedia.org/wiki/IBM_3090#Vector_facility

    Here's the manual for it.

    https://bitsavers.org/pdf/ibm/3090/GG24-3058-0_IBM_3090_Vector_Facility_Technical_Reference_198607.pdf

    In my PhD days, the university had a Fujitsu VP with an IBM 3090
    as front end computer, which later got the vector extension. If
    you wanted fast execution, you used the VP.

    At least I got to write cool JCL for the combined system.
    Compile the code on the IBM (which had FAR better error messages,
    the Japanese English was hard ro understand). If it worked,
    submit a job on the VP to also compile, execute, and send back
    the results to the IBM. Both ran a variant of MVS. Later on,
    they switched the VP to a variant of UNIX, which was weird.
    You still had to do dataset allocation like on the MVS systems.
    --
    This USENET posting was made without artificial intelligence,
    artificial impertinence, artificial arrogance, artificial stupidity,
    artificial flavorings or artificial colorants.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Stefan Monnier@monnier@iro.umontreal.ca to comp.arch on Thu Nov 12 19:04:09 2026
    From Newsgroup: comp.arch

    Anton Ertl [2026-11-12 06:21:21] wrote:
    Stefan Monnier <monnier@iro.umontreal.ca> writes:
    Yeah, if we take CISC as motivated by the desire to provide an assembly >>language that is comfortable for humans, we can also take RISC as
    motivated by the desire to provide an assembly language that's
    convenient for compilers (which would rather not need to worry about >>tradeoffs between using LD+ADD+ST vs using some fancy addressing mode
    on ADD).
    The fancy addressing mode is the same whether you use it with a LD, a
    ST, or an ADD.

    That's beside the point. With a load/store architecture you don't need
    to choose between using the ADD-with-addressing mode or using explicit
    loads and stores. Makes life simpler for the compiler.

    Compilers actually have no problem using that addressing mode,
    especially in an architecture like VAX: When the variable resides in a register, use a register, when it's in memory, use the appropriate
    addressing mode.

    What if explicit loads and stores are faster/slower?
    And how is the answer affected by subsequent operations accessing the
    same memory location?

    (optimality is more difficult, but for trees has been
    reached with tree-parsing, as used in burg or iburg).

    And this is useful for CISC but much less so for RISC, so you can use
    a simpler compiler for RISC instruction sets.

    But these addressing modes are not used much, not by compilers,

    Exactly.

    We have learned how to do such tools with the more efficient calling conventions we use now, but that does cost a lot of complexity in the
    tools: Generating and using DWARF information etc. Ok, DWARF is not
    just about calling conventions, but it might be interesting to
    consider how much simpler debugging information would be with VAX
    CALLs.

    That's a good point. AFAICT this has not been taken into account in the
    RISC designs. EfOU

    From that point of view, AES is neither CISCy nor RISCy because it's
    convenient only for the CPU implementors.
    AES instructions are not particularly convenient for CPU implementors, probably on the contrary, because they need hardware that is not
    useful for anything else.

    AFAIK, AES was designed specifically to give access to that extra
    hardware. More specifically, manufacturers were eager to add more FPUs
    and the question they faced was how to make that hardware available to
    the programmer.
    IOW it's "more hardware" that caused AES rather than the other way around.

    And AFAICT, AES is a fairly naive/simple way (for the CPU implementor)
    to give access to that hardware.

    [ In contrast, vVM is definitely RISCy from that standpoint. ]
    vVM is a microarchitectural mechanism,

    Is it? I use it as a way to refer to the design of VEC+LOOP (which is
    so designed as to allow a particular micro-architecture).


    === Stefan
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Thomas Koenig@tkoenig@netcologne.de to comp.arch on Fri Nov 13 11:02:07 2026
    From Newsgroup: comp.arch

    Stefan Monnier <monnier@iro.umontreal.ca> schrieb:
    Anton Ertl [2026-11-12 06:21:21] wrote:
    Stefan Monnier <monnier@iro.umontreal.ca> writes:
    Yeah, if we take CISC as motivated by the desire to provide an assembly >>>language that is comfortable for humans, we can also take RISC as >>>motivated by the desire to provide an assembly language that's
    convenient for compilers (which would rather not need to worry about >>>tradeoffs between using LD+ADD+ST vs using some fancy addressing mode
    on ADD).
    The fancy addressing mode is the same whether you use it with a LD, a
    ST, or an ADD.

    That's beside the point. With a load/store architecture you don't need
    to choose between using the ADD-with-addressing mode or using explicit
    loads and stores. Makes life simpler for the compiler.

    I agree. But a large amount of optimization has gone into architectures
    with have memory operands (especially x86), so this is in large part
    a solved problem.


    Compilers actually have no problem using that addressing mode,
    especially in an architecture like VAX: When the variable resides in a
    register, use a register, when it's in memory, use the appropriate
    addressing mode.

    What if explicit loads and stores are faster/slower?

    That should be in the cost model of the compiler.

    And how is the answer affected by subsequent operations accessing the
    same memory location?

    In the general case, that should be done well by the compiler.
    If it sees a sequence of events where there is a load and an
    operation, or a load, an operation and a store, with nothing
    further going on with that value, then that is a candidate for a
    memory operation. Otherwise not. Modern cmpilers are based on
    SSA (call it RISC with an inifinite amount of registers which are
    only assigned to once), the rest is pattern recognition and
    register allocation.

    (optimality is more difficult, but for trees has been
    reached with tree-parsing, as used in burg or iburg).

    And this is useful for CISC but much less so for RISC, so you can use
    a simpler compiler for RISC instruction sets.

    If you are going to make a new architecture, you have two choices:
    Roll your own compiler or do a port of an existing compiler,
    for example LLVM or gcc. Mitch and Brian did the latter (LLVM),
    and I think it turned out well. (If you're doing things which are
    not done in other architectures, you might have to fight some
    general optimizations which turn out to be pessimization for your
    particular feature, as Brian has experienced.)
    --
    This USENET posting was made without artificial intelligence,
    artificial impertinence, artificial arrogance, artificial stupidity,
    artificial flavorings or artificial colorants.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From BGB@cr88192@gmail.com to comp.arch on Fri Nov 13 05:28:14 2026
    From Newsgroup: comp.arch

    On 11/11/2026 8:32 PM, MitchAlsup wrote:
    BGB <cr88192@gmail.com> posted:

    On 11/10/2026 11:08 AM, Stefan Monnier wrote:
    David Brown [2026-11-10 10:31:47] wrote:
    It is also, I think, helpful to consider RISC as the "opposite" of
    CISC - and Complex Instruction Set Computer cannot really be
    interpreted as meaning anything other than that the instructions are
    "complex". By comparison, with RISC the /instructions/ are "reduced".

    Indeed. And one of the motivations behind the CISC evolution was the
    famed "semantic gap", which pushed towards rather fewer instructions
    that are more flexible, regular, and powerful.


    I can note that one goal I pushed for in my ISA design was to reduce
    executed instruction counts without raising the level of abstraction
    or having complex logic.

    For my part, My 66000 was restricted to not add more than 1 gate of delay
    per cycle to any stage of the pipeline.


    OK.

    There are some things that could be done, but yeah, latency is a pain.


    It is like the issue of early on, I mostly gave up on things like
    1-cycle ALU ops.

    Granted, 1-cycle AND/OR/XOR and 32-bit ADD would be possible, but:
    AND/OR/XOR: Not really the heaviest used;
    32-bit ADD OK, but still kinda tight.


    Carry-select helps, but ironically it seems like carry-select is better
    at allowing a 2-cycle 128-bit adder than giving a 64-bit result within
    the same clock-cycle (or, at least when the ALU result needs to reach
    the register forwarding).

    Well, say:
    16-bit: Carry-chain is faster;
    32-bit: Nearly break-even;
    64-bit: Carry select helps, but modestly;
    128-bit: Carry select pays off a lot more.

    For things like PC-increment and Branches, ended up doing a little
    trickery. Originally, they would have had an implicit 4GB "do-not-cross" boundary, but I figured out a workaround:
    Branch predictor skips branches if they would cross a boundary;
    Falls back to a slow-branch, which uses a full AGU;
    Crossing a boundary can insert a pipeline stall or similar;
    Inconsistent state stalls so carry can propagate.


    The actual ADD takes place within a single cycle, but is 2-cycle mostly
    for sake of forwarding the result.

    I didn't see a big difference here between 6R and 4R, and early on it
    was looking like only really 32-bit designs could easily hit a 100 MHz goal.

    In a few cases, had pushed things to 75 MHz, but usually this required
    more extreme corner-cutting that hurt performance:
    Small caches;
    Penalties for memory RAW and WAW scenarios;
    Penalizing misaligned access;
    ...


    Some FPGA soft-processors had also gained more clock speed by doing
    things that would more drastically impact actual performance, like
    faking 32 or 64 bit operations with multi-stage 16-bit ALUs.

    Apparently people had also implemented a few 200 MHz bit-serial
    processors. But...

    A 200 MHz CPU that performs more like the 6502 in a NES isn't quite so
    useful. And, any more than a few levels, and logic doesn't pass timing
    at 200 MHz.

    Some other people went the other way and instead targeted 25 and 33 MHz.


    Seemingly, areas that tend to fail timing at times:
    L1 D$ stuff;
    Register-Forwarding path;
    Instruction decoder path;
    ...

    The ring-bus is at least easy on timing, one just sort of has to be
    generous with forwarding cycles and not try to have too many shortcut
    paths to allow things to spread out on the FPGA.


    I mostly got tired of battling with a lot of this though.


    In theory, a more efficient CPU design could be possible, but would need
    to be more carefully engineered.

    Had noted that while I could have an mode that simply drops some older functionality off the CPU (say, a mode that only runs XG3 and RISC-V),
    but itself this doesn't save all that much in terms of resource costs.

    Can note that a CPU core that only runs RV64GC but is otherwise similar,
    wont actually save much in terms of resource cost over still having XG3
    (well, because mostly both need essentially the same stuff in the EX
    stages and similar).

    Well, and if one wants a small core, it also means no hardware FPU or
    SIMD. Etc...


    Comparably, the amount and variability of stuff attached to the EX
    stages effects cost more than the exact size of the listing.

    Listing size by itself matters less than things like instruction layout variability and similar.

    Most of the "cost" of adding instructions being not in the cost of
    having them in the listing, but rather having any unique EX-side logic.
    So, a "new" instruction is cheap if it is just plugging inputs into the existing logic in a slightly different way; but not so cheap if it means
    new logic or new paths.



    Though, this mostly ends up creating a pressure towards a larger GPR
    space and having the ability to encode larger immediate and displacement
    fields and similar for the cases where spills were common.

    I did not find that, given that I waste no registers for immediates or displacements.


    Big issue was mostly functions that have large numbers of live variables.

    Seemingly, my own code seems more prone to run into cases of heavy
    variable use, but then heavy variable use is often the path to better performance.

    Well, and a lot of C code that ends up almost more structured like ASM code.


    Also the LUI+ADDI scheme used by RISC-V, while very effective as a
    fallback case for a 32-bit machine, falls on its face for 64-bit
    machines. Also the design of the ISA starts to fall on its face the
    moment one has a struct or similar that is larger than 2K.

    So:
    LUI+ADD+LW/SW => Sucks...
    Well, and:
    SLL+ADD+LW/SW => Also sucks.
    ...

    And the only thing that always works is:

    MEM Rd,[Rbase,Rindex<<scale,#displacement{32 or 64}]

    You can access anything anywhere in a 64-bit VAS in 1 instruction--
    including transferring control through GOT.


    That is a heavy-hitter, though usually "good enough" in practice to
    treat index and displacement as two mutually exclusive scenarios and
    require a LEA or similar to do both.

    Getting a 64-bit 3-way addition to happen within a single clock-cycle
    seems like a big ask though.

    I mostly went with a more modest:
    48 + 33 << (0..3)

    Had some Disp64 cases, but decided to get clever and for Disp64 the displacement and base register swap places; so the Disp64 functions like
    an Abs64 with a register index, Which, is maybe jank, but worked...


    Can note:
    Base48 + Index48 << Sc:
    Experimented with, worked, but a little harder for timing.
    Experimental Addr64/Addr96 modes:
    Avoids timing penalty as the addressing was split.
    So, no carry propagation from low to high to worry about;
    Was mostly just pulling a trick over the existing 48b addressing.


    -------------------
    And, like, if one were doing a lot of work with JPEG or similar, a case
    could be made for things like YUV -> RGB converters and similar.
    Nevermind the specific version of YUV.

    Some of my stuff used an approximation, say:
    Y=(4*G+3*R+B)/8; U=(B-Y)/2+128; V=(R-Y)/2+128;

    Which while not an exact match for the standard color spaces, is "close
    enough". If mashing the result into RGB555 it may not really matter.
    Could be realized relatively affordably in a hardware implementation.

    Well, and say:
    Y=(9*G+5*R+2*B)/16;
    ...
    Would be more accurate, but slightly less cheap to convert back to RGB
    (even if, yes, these factors still allow the multiplications to be done
    via a LEA instruction or similar; it results in the reverse-side Green
    conversion no longer being a plain shift).

    Say:
    G=(8*Y-3*R-B)>>2;
    Vs:
    G=((16*Y-5*R-2*B)*57)>>9;

    My point on all of this is to find a way to avoid approximations and
    get the well defined math done cheaply.


    Possibly, but the proper YCbCr math requires a lot of fixed-point
    multiply and similar.

    Could use SIMD, but then one is effectively needing to do a matrix-multiply.

    And, then one still needs to range-clamp the output and similar.

    ...

    So, TBD if there is a way to make it cheap.



    Even with a crappy approximation, in a Cinepak style codec the YUV->RGB
    is the bulk of the CPU time.

    Though, did manage to get my recent experimental codec in this area to
    have decode speeds of 350-500 megapixels/second on my Xen+ (with a single-threaded decoder).


    So, say:
    UPIC as a video codec : ~ 90 Mpix/sec
    BT6A (Cinepak-like) : ~ 350- 500 Mpix/sec
    BT5C (vaguely CRAM like): ~ 700- 900 Mpix/sec
    MS-CRAM : ~ 1000-1200 Mpix/sec

    MS-CRAM:
    Fastest, but terrible Q/bpp, more prone to become IO bound;
    Proper CRAM also has 8-color blocks, but better off not used.
    The add huge bulk, for not much gain in quality.

    BT5C:
    Much better Q/bpp, but best case quality is still CRAM-like
    Neither BT5C nor CRAM can get particularly high image quality.
    Well, like, the RGB555 and 1-bit selectors are a bit of a damper.
    Was intended to try to get CRAM-like speeds, but fell short.

    BT6A:
    Theoretically can achieve better image quality;
    YUV 4:2:0 with an 8-bit / channel;
    Fiddling has managed to get promising Q/bpp;
    Managed to get moderately fast decode speeds.
    However, work is ongoing to make the encoder fast enough.
    Not going to work if videos have implausible encode times.
    Idea was to try for "kinda like Cinepak but compresses better".


    UPIC:
    Design is sorta like T.81 JPEG but with different transforms:
    8x8 BHT in place of 8x8 DCT
    RCT in place of YCbCr
    STF+AdRice (or now STF+AdSkew) in place of Huffman
    ...
    Added motion vectors and skip/delta blocks for video, like H.261;
    Could mostly manage 360p at 1 Mbps.
    Trying to to 720p and it totally falls on its face.
    Seemingly needs ~ 5 Mbps for semi-passable 720p.
    Should have been 4, but needs an extra 1 Mbps here.


    Theoretically, UPIC's Q/bpp could be helped with an in-loop deblocking
    filter and sub-pixel steps; but, these would (relatively speaking) tank
    the decode speeds. Could in theory have a multithreaded decoder, but multithreading here is a cheap trick to make slow code look faster.

    UPIC was originally more intended as a plain image format though, and
    does better in this role. It can partly take on PNG and JPEG use-cases
    (while being a little faster than either).

    For images, UPIC naturally supports a lossless mode by way of using
    reversible transforms.



    Meanwhile, BT6A needs a computationally demanding encoder to give
    acceptable compression. Could maybe do a quick-and-dirty encoder for
    lower compression, but then it is basically just dumping YUV with extra
    steps.

    The big expensive thing mostly has to deal with "codebooks", eg:
    2x2 pixels, stored as delta-coded Y,Y,Y,Y,U,V
    4x4 pixels, stored as four 2x2 codebook indices;
    Or, 2x2 block zoomed to 4x4.
    8x8 pixels, stored as four 4x4 indices;
    Or, 2x2 zoomed to 8x8;
    16x16 pixels, stored as four 8x8 indices;
    Or, 2x2 zoomed to 16x16.

    Basically, it operating on 16x16 blocks and recursively subdividing them quad-tree style to decide how to best encode them; building a running
    set of codebooks and then searching these codebooks to find indices to
    build the desired blocks (and track block lifetime and simulating the
    running state of the decoder at each step). This process leading to a relatively computationally-intensive encoding process.


    Also, for better or worse, makes significant use of the properties of
    Hilbert curves. Nevermind if putting all the pixels for a 16x16 block
    into Hilbert order may seem needlessly convoluted.


    However, with a lot of fiddling, was able to push the encoder into an
    area where it sorta overlaps with JPEG (BT6A still obviously inferior on
    Q/bpp though).

    Still seems like something, as BT6A lacks an entropy coder.

    Though, for better or worse, post-compression does very little for BT6A
    in this case. Despite being a byte-based format, there is seemingly not
    much entropy for an entropy coder to extract.

    Have been able to push images below 1.0 bpp with tolerable quality,
    which is maybe still notable for a format without an entropy coder...


    Still not a particularly "simple" format code-wise.

    Though, checking, its decoder is still a little shorter than the BT5C or
    UPIC decoders, so at least it is not unreasonable.


    Note:
    Neither 5C nor 6A being intended to try to deal with the same use-cases
    as H.264 or similar though...


    Well, 6A was more just to test out a design that I had thought up within
    the context of a sci-fi story though. Got it working acceptably, so the depiction in the story (of its general features and its artifacts)
    basically matches up.

    Nevermind if my description of artifacts was mostly based on describing
    the artifacts visible in Cinepak, with slight artistic license.


    Nevermind whether or not this sort of stuff makes for "gripping sci-fi"
    (and it is debatable if the story is even sci-fi when most of the
    in-universe tech is kinda inferior to what we have now).

    ...

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Terje Mathisen@terje.mathisen@tmsw.no to comp.arch on Fri Nov 13 15:19:04 2026
    From Newsgroup: comp.arch

    George Neuner wrote:
    WRT the Mill, I think people here may be missing that it supported short-vector-SIMD, and that a vector operand on its belt was a single
    element [of whatever width] - not a bunch of scalars that magically
    would be operated on together.

    Yes and no, see below.

    According to Ivan, the Mill's instruction set supported quad FP and
    128-bit short vector SIMD.
    [Similar width as Intel's SSE2, though SSE_ doesn't do quad FP.]

    He spoke about the potential for [more lanes] wider SIMD and made
    clear that, whatever widths were supported, the "operands" still would
    be treated as single belt elements.

    The real magic sauce is the fact that belt operands carries metadata, including not just byte/short/int/long/float/double/etc designators, but
    also a vector vs scalar boolean, as well as None and NAR (Not A Result, similar to NaN but even more powerful).

    This means that Mill only needs a single ADD instruction, it
    automagically handles vector/scalar/multiple element sizes based on
    those metadata bits.

    If you want to treat 16 bytes, loaded as 16 unsigned bytes, as if they
    were 8 int16_t's, then you need to convert the entry.

    Terje

    PS. Expect to see Mill return to being generally visible in the near future.
    --
    - <Terje.Mathisen at tmsw.no>
    "almost all programming can be viewed as an exercise in caching"
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Michael S@already5chosen@yahoo.com to comp.arch on Fri Nov 13 16:30:27 2026
    From Newsgroup: comp.arch

    On Fri, 13 Nov 2026 15:19:04 +0100
    Terje Mathisen <terje.mathisen@tmsw.no> wrote:

    George Neuner wrote:
    WRT the Mill, I think people here may be missing that it supported short-vector-SIMD, and that a vector operand on its belt was a
    single element [of whatever width] - not a bunch of scalars that
    magically would be operated on together.

    Yes and no, see below.

    According to Ivan, the Mill's instruction set supported quad FP and
    128-bit short vector SIMD.
    [Similar width as Intel's SSE2, though SSE_ doesn't do quad FP.]

    He spoke about the potential for [more lanes] wider SIMD and made
    clear that, whatever widths were supported, the "operands" still
    would be treated as single belt elements.

    The real magic sauce is the fact that belt operands carries metadata, including not just byte/short/int/long/float/double/etc designators,
    but also a vector vs scalar boolean, as well as None and NAR (Not A
    Result, similar to NaN but even more powerful).

    This means that Mill only needs a single ADD instruction, it
    automagically handles vector/scalar/multiple element sizes based on
    those metadata bits.

    If you want to treat 16 bytes, loaded as 16 unsigned bytes, as if
    they were 8 int16_t's, then you need to convert the entry.

    Terje

    PS. Expect to see Mill return to being generally visible in the near
    future.


    Still with aspiration to actually implement it in silicon?
    Or realistic?



    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From EricP@ThatWouldBeTelling@thevillage.com to comp.arch on Fri Nov 13 10:28:56 2026
    From Newsgroup: comp.arch

    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?



    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From EricP@ThatWouldBeTelling@thevillage.com to comp.arch on Fri Nov 13 10:56:06 2026
    From Newsgroup: comp.arch

    On 2026-Nov-12 23:14, George Neuner wrote:
    On Tue, 10 Nov 2026 09:03:17 GMT, anton@mips.complang.tuwien.ac.at
    (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

    WRT the Mill, I think people here may be missing that it supported short-vector-SIMD, and that a vector operand on its belt was a single
    element [of whatever width] - not a bunch of scalars that magically
    would be operated on together.

    According to Ivan, the Mill's instruction set supported quad FP and
    128-bit short vector SIMD.
    [Similar width as Intel's SSE2, though SSE_ doesn't do quad FP.]

    He spoke about the potential for [more lanes] wider SIMD and made
    clear that, whatever widths were supported, the "operands" still would
    be treated as single belt elements.

    I didn't know that is how Mill handled SIMD but it makes sense.

    I was looking at the belt style for how it names results.
    Regular scalar register files use absolute addressing, eg R1.
    A belt style RF uses relative addressing, eg belt[N] is the Nth result ago.

    I've not programmed a belt, or a vector processor but it seemed to me that this relative result addressing might be more in line with what vector programs need in that it inherently names results like an unrolled loop.

    My exploration had not made it as far as to consider internally packing
    vector instructions and their operands together for SIMD execution but my intuition says that the belt's relative addressing might make this much easier.


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Terje Mathisen@terje.mathisen@tmsw.no to comp.arch on Fri Nov 13 17:05:26 2026
    From Newsgroup: comp.arch

    Michael S wrote:
    On Fri, 13 Nov 2026 15:19:04 +0100
    Terje Mathisen <terje.mathisen@tmsw.no> wrote:

    George Neuner wrote:
    WRT the Mill, I think people here may be missing that it supported
    short-vector-SIMD, and that a vector operand on its belt was a
    single element [of whatever width] - not a bunch of scalars that
    magically would be operated on together.

    Yes and no, see below.

    According to Ivan, the Mill's instruction set supported quad FP and
    128-bit short vector SIMD.
    [Similar width as Intel's SSE2, though SSE_ doesn't do quad FP.]

    He spoke about the potential for [more lanes] wider SIMD and made
    clear that, whatever widths were supported, the "operands" still
    would be treated as single belt elements.

    The real magic sauce is the fact that belt operands carries metadata,
    including not just byte/short/int/long/float/double/etc designators,
    but also a vector vs scalar boolean, as well as None and NAR (Not A
    Result, similar to NaN but even more powerful).

    This means that Mill only needs a single ADD instruction, it
    automagically handles vector/scalar/multiple element sizes based on
    those metadata bits.

    If you want to treat 16 bytes, loaded as 16 unsigned bytes, as if
    they were 8 int16_t's, then you need to convert the entry.

    Terje

    PS. Expect to see Mill return to being generally visible in the near
    future.


    Still with aspiration to actually implement it in silicon?
    Or realistic?

    I sincerely hope so since I would love to be able to run on actual
    silicon, not just a sw simulator! :-)

    Terje
    --
    - <Terje.Mathisen at tmsw.no>
    "almost all programming can be viewed as an exercise in caching"
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Stephen Fuld@sfuld@alumni.cmu.edu.invalid to comp.arch on Fri Nov 13 08:36:20 2026
    From Newsgroup: comp.arch

    On 11/13/2026 7:28 AM, EricP wrote:
    On 2026-Nov-12 15:43, Robert Finch wrote:

    snip
    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.

    Yes. I look at it as sort of a fixed length stack (put new elements at
    the top an push all other elements down) with the enhancement that you
    can address, for reading only, stack elements other than the top.


    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.

    IIRC, the Mill implements it using the output buffers of each functional
    unit plus each having a "position register" of log2 (number of FUs) bit register that gives that register's position within the stack. Each instruction sets the register corresponding to that instruction to TOS
    and increments all the other position registers. No actual separate
    register set and no shifting.


    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.

    Yes.


    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.

    Yes, although with the Mill (IIRC), the "shift" is logical not physical.
    --
    - Stephen Fuld
    (e-mail address disguised to prevent spam)
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From scott@scott@slp53.sl.home (Scott Lurndal) to comp.arch on Fri Nov 13 18:12:11 2026
    From Newsgroup: comp.arch

    Thomas Koenig <tkoenig@netcologne.de> writes:
    John Levine <johnl@taugh.com> schrieb:
    According to EricP <ThatWouldBeTelling@thevillage.com>:
    Floating Point Systems had been selling attached "array processors"
    for PDP-11, VAX-780 and IBM systems since 1976 and colloborated with
    DEC in 1987 attaching to the VAX 8200, 8500, 87/8800. >>>https://en.wikipedia.org/wiki/Floating_Point_Systems

    They were fast, but extremely difficult to program because you had to work >> out all the paralellism by hand. Trying to program FPS got Josh Fisher
    thinking about trace scheduling which led to Multiflow and later Itanium.

    The 3090 announced its vector unit on 1-Oct-1985
    to replace "discontinued 3838 array processor". >>>https://en.wikipedia.org/wiki/IBM_3090#Vector_facility

    Here's the manual for it.

    https://bitsavers.org/pdf/ibm/3090/GG24-3058-0_IBM_3090_Vector_Facility_Technical_Reference_198607.pdf

    There was also the one-off BSP:

    https://en.wikipedia.org/wiki/Burroughs_Scientific_Processor
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From MitchAlsup@user5857@newsgrouper.org.invalid to comp.arch on Fri Nov 13 18:14:41 2026
    From Newsgroup: comp.arch

    Robert Finch <robfi680@gmail.com> posted:

    On 2026-11-12 8:18 p.m., MitchAlsup wrote:
    Robert Finch <robfi680@gmail.com> posted:

    On 2026-11-12 2:19 p.m., MitchAlsup wrote:
    anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:

    Stefan Monnier <monnier@iro.umontreal.ca> writes:
    -----------------------
    Performing a series of FMAC steps in the FMAC unit is straightforward-- >>> feeding the polynomial evaluation a series of coefficients is not--
    unless those coefficients are stored in ROM in the FMAC unit itself.
    Thus, My 66000 transcendentals.

    Why cannot the polynomical coefficients be passed in registers?

    Are you going to make a RS-entry with 9 Src2 operands ???

    But cannot the calc be broken up into sequential elements?

    Do you break up FMUL or FDIV into individual steps ???

    Q+ FPOLY instruction expands into multiple FMA micro-ops.

    I just lob SIN() at the FMAC unit; which has a SIN() sequencer.

    The micro-ops only need a few src operands. The next coefficient is
    assumed to come from the next register.
    It is using Horner's rule.

    Which is FMAC latency dependent ...

    FPOLY has a cascade input option so it can be called as many times as desired.

    Of course the Q+ micro-op translator is kinda huge, maybe unworkable IRL.



    [ In contrast, vVM is definitely RISCy from that standpoint. ]

    VVM is a microarchitectural mechanism, so architectural concepts like >>>> RISC and CISC are inappropriate for that. You may want to discuss the >>>> VEC and LOOP instructions of MY 66000.

    - anton


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Fri Nov 13 18:26:42 2026
    From Newsgroup: comp.arch

    Stefan Monnier <monnier@iro.umontreal.ca> writes:
    Anton Ertl [2026-11-12 06:21:21] wrote:
    Stefan Monnier <monnier@iro.umontreal.ca> writes:
    Yeah, if we take CISC as motivated by the desire to provide an assembly >>>language that is comfortable for humans, we can also take RISC as >>>motivated by the desire to provide an assembly language that's
    convenient for compilers (which would rather not need to worry about >>>tradeoffs between using LD+ADD+ST vs using some fancy addressing mode
    on ADD).
    The fancy addressing mode is the same whether you use it with a LD, a
    ST, or an ADD.

    That's beside the point. With a load/store architecture you don't need
    to choose between using the ADD-with-addressing mode or using explicit
    loads and stores. Makes life simpler for the compiler.

    No. With an architecture like the VAX, RISC is actually harder:

    VAX: If operand src1 is in memory, accessed with d(SP), use the ADD
    instruction with d(SP) as second operand. Likewise for src2 and dst.

    RISC: If operand src2 is in memory, allocate a register for it (but
    why is it in memory? Probably because there are no registers
    available, so first spill some other value); then load the operand
    from d(SP) into the register; possibly do the same for the other
    source operand (but don't spill the register for src2). If the
    destination is in memory, allocate a register for storing it in the
    meantime (again with the potential for spilling). Finally do the add.
    Store the result if necessary. And now refill all the spilled values.

    It's all doable, but simpler? No.

    For the more common CISC style with load-and-op and read-modify-write,
    things are harder than on the VAX, but RISC still is not simpler.

    Compilers actually have no problem using that addressing mode,
    especially in an architecture like VAX: When the variable resides in a
    register, use a register, when it's in memory, use the appropriate
    addressing mode.

    What if explicit loads and stores are faster/slower?

    If using the hardware as a load/store architecture is preferable, then
    the compiler will just generate that code, and it will be just as hard
    or simple as on a RISC.

    If the load-op and RMW instructions are preferable, the compiler can
    just use them when the operand is in memory.

    And how is the answer affected by subsequent operations accessing the
    same memory location?

    Just the same as on a RISC: You run register allocation before
    instruction selection, so if a value is accessed several times and
    registers are available, the value will be allocated into a register,
    on both architecture styles. Then the instruction selection sees that
    there is a register access for src1 of an add, and on either style of architecture will just access it in a register, making the RISC case
    much easier.

    (optimality is more difficult, but for trees has been
    reached with tree-parsing, as used in burg or iburg).

    And this is useful for CISC but much less so for RISC, so you can use
    a simpler compiler for RISC instruction sets.

    It's also useful for RISCs, because it has instructions that combine a
    constant with an operation, and instructions that add a constant and a register, and then use the resulting address in a load (or store); not
    to mention addressing modes of, e.g., the 88K architecture. And auto-increment/decrement addressing modes, such as available on ARM
    A32 and A64, and HPPA, do not fit the tree parsing paradigm.

    I taught the students to use iburg/burg when the compiler course was
    run on an Alpha, and I am telling them to do that now, when the
    compiler course runs on an AMD64 machine. The usage of these tools
    depends far more on the student than on the architecture.

    AES instructions are not particularly convenient for CPU implementors,
    probably on the contrary, because they need hardware that is not
    useful for anything else.

    AFAIK, AES was designed specifically to give access to that extra
    hardware. More specifically, manufacturers were eager to add more FPUs
    and the question they faced was how to make that hardware available to
    the programmer.
    IOW it's "more hardware" that caused AES rather than the other way around.

    I read about CPU designers having to cut down their designs when the realization comes closer (silicon diet). So it's not that they had
    silicon to spend on useless things. I think they wanted to offer AES
    because they expected people to actually use it (and I think they were
    right).

    And one other benefit of these instructions is that they avoid the
    cache side channels that implementations based on other instructions
    are likely to have.

    And AFAICT, AES is a fairly naive/simple way (for the CPU implementor)
    to give access to that hardware.

    One you have decided to implement AES in hardware, the question is,
    how. The VAX way (as shown in POLY) is to have one instruction that
    takes the key (maybe the preprocessed key) and does it all. Intel
    chose to have an instruction that performs a round, and use 9
    instances of this instruction plus a separate one for the last round.
    That looks like a rather RISCy approach to me, but of course it still
    has the CISC property of having a memory operand. It also has an
    instruction for preprocessing the key, and I think you need to use
    that multple times.

    vVM is a microarchitectural mechanism,

    Is it? I use it as a way to refer to the design of VEC+LOOP (which is
    so designed as to allow a particular micro-architecture).

    Architecturally, LOOP is a branch (maybe it also deals with the loop
    counter?), and VEC is a noop AFAIK.

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Fri Nov 13 21:51:25 2026
    From Newsgroup: comp.arch

    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    Stefan Monnier <monnier@iro.umontreal.ca> writes:
    And how is the answer affected by subsequent operations accessing the
    same memory location?

    Just the same as on a RISC: You run register allocation before
    instruction selection, so if a value is accessed several times and
    registers are available, the value will be allocated into a register,
    on both architecture styles.

    Actually, normally register allocation is performed after instruction selection. So if the operand is a local variable that can be in a
    register (no address taken), it will be assumed to be in a register,
    for instruction selection. Later the register allocator actually
    tries to allocate a register for the variable, and if not, on a RISC
    spill code is inserted with additional live ranges, and the register
    allocator has to run again (at least that's the way that Chaitin and
    Briggs described this). On a VAX, you just use a memory operand for
    those variables that do not fit into registers.

    vVM is a microarchitectural mechanism,

    Is it? I use it as a way to refer to the design of VEC+LOOP (which is
    so designed as to allow a particular micro-architecture).

    Architecturally, LOOP is a branch (maybe it also deals with the loop >counter?), and VEC is a noop AFAIK.

    And the fact that VVM is a microarchitectural mechanism is it's
    beauty. The semantics are just the same as for the whole loop without
    VVM.

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From MitchAlsup@user5857@newsgrouper.org.invalid to comp.arch on Sat Nov 14 00:27:18 2026
    From Newsgroup: comp.arch

    Thomas Koenig <tkoenig@netcologne.de> posted:

    Stephen Fuld <sfuld@alumni.cmu.edu.invalid> schrieb:
    On 11/11/2026 10:53 PM, Thomas Koenig wrote:
    Stephen Fuld <sfuld@alumni.cmu.edu.invalid> schrieb:

    It seems the
    advantage of an SIMD approach is the large set of addressable registers >>> that can be used to keep data readily available for future use.

    Plus, you can do wide permutes, and it can also help with reduction.
    Having mask for reducing operations also helps (or a length field).

    There is one other thing that VVM does not do natively: Reductions
    on commutative operators.

    When we talked about reductions on VVM in a thread some months ago, I thought Mitch said that VVM could parallelize such reductions, including handling an array size that was not a multiple of the number of
    functional units used (i.e. the degree of parallelism), and combining
    the partial sums at the end. As I have said, I am not a hardware guy
    but that sounded impressive and I don't know how he does that.

    I don't see this in the manuals, at least. Mitch, did I miss it?

    The augend input to FMAC has a special feed-forward mechanism
    {-|Architectural}

    I may have to do something special when running 4-wide.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Sat Nov 14 09:12:55 2026
    From Newsgroup: comp.arch

    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    Actually, normally register allocation is performed after instruction >selection. So if the operand is a local variable that can be in a
    register (no address taken), it will be assumed to be in a register,
    for instruction selection. Later the register allocator actually
    tries to allocate a register for the variable, and if not, on a RISC
    spill code is inserted with additional live ranges, and the register >allocator has to run again (at least that's the way that Chaitin and
    Briggs described this). On a VAX, you just use a memory operand for
    those variables that do not fit into registers.

    The latter is oversimplified, too.

    E.g., if you have a statement

    c[i] = a[i] + b[i];

    If a, b, c, and i are all in (pseudo-)registers, this can be one
    instruction on the VAX, and any somewhat sophisticated instruction
    selector will select it, whether optimal or not. But if it turns out
    that the pseudo-register for a does not fit in a real register, and
    has to be spilled to d(SP), the whole thing does not fit in an
    instruction*, and, e.g., there has to be a load of a into a register
    first, leading to all the same problems that RISCs already have for
    c=a+b. There is a reason why bugs tend to hide in register
    allocation; I remember reading that one register allocator needed to
    process 10 million lines of code until all bugs had been found (and
    10M lines was a lot at the time).

    * I have not examined the VAX instruction set to see if it has an
    addressing mode that covers this case. If it has, then this
    particular example does not show the problem, but given that VAX
    instructions are finite, one can construct an example where an
    in-register value fits in the instruction, while the in-memory value
    does not.

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Stefan Monnier@monnier@iro.umontreal.ca to comp.arch on Fri Nov 13 17:42:43 2026
    From Newsgroup: comp.arch

    Thomas Koenig [2026-11-13 11:02:07] wrote:
    Stefan Monnier <monnier@iro.umontreal.ca> schrieb:
    Anton Ertl [2026-11-12 06:21:21] wrote:
    Stefan Monnier <monnier@iro.umontreal.ca> writes:
    Yeah, if we take CISC as motivated by the desire to provide an assembly >>>>language that is comfortable for humans, we can also take RISC as >>>>motivated by the desire to provide an assembly language that's >>>>convenient for compilers (which would rather not need to worry about >>>>tradeoffs between using LD+ADD+ST vs using some fancy addressing mode >>>>on ADD).
    The fancy addressing mode is the same whether you use it with a LD, a
    ST, or an ADD.
    That's beside the point. With a load/store architecture you don't need
    to choose between using the ADD-with-addressing mode or using explicit
    loads and stores. Makes life simpler for the compiler.
    I agree. But a large amount of optimization has gone into architectures
    with have memory operands (especially x86), so this is in large part
    a solved problem.

    I'm not disagreeing but that's now, so it doesn't really change the fact
    that "RISC [w]as motivated by the desire to provide an assembly language
    that's convenient for compilers" (among other desires).


    === Stefan
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Stefan Monnier@monnier@iro.umontreal.ca to comp.arch on Fri Nov 13 17:54:07 2026
    From Newsgroup: comp.arch

    Anton Ertl [2026-11-13 18:26:42] wrote:
    Stefan Monnier <monnier@iro.umontreal.ca> writes:
    That's beside the point. With a load/store architecture you don't need
    to choose between using the ADD-with-addressing mode or using explicit >>loads and stores. Makes life simpler for the compiler.
    No. With an architecture like the VAX, RISC is actually harder:
    VAX: If operand src1 is in memory, accessed with d(SP), use the ADD instruction with d(SP) as second operand. Likewise for src2 and dst.

    RISC: If operand src2 is in memory, allocate a register for it (but
    why is it in memory? Probably because there are no registers
    available, so first spill some other value);

    AFAIK at the point you make this choice you haven't performed register allocation yet, so if it's in memory it's for other reasons than
    register pressure and you don't need to allocate a register, you
    allocate a "variable" instead (which will likely be mapped to
    a register later on).

    It's all doable, but simpler? No.

    In my experience it is, because each indirection from the high-level
    language maps to basically a single simple LD/ST. In contrast to use
    VAX's ADD-with-memory you have to combine such an indirection with the
    addition operation, so you need to do the burg kind of dance.

    And this is useful for CISC but much less so for RISC, so you can use
    a simpler compiler for RISC instruction sets.

    It's also useful for RISCs, because it has instructions that combine a constant with an operation, and instructions that add a constant and a register, and then use the resulting address in a load (or store); not
    to mention addressing modes of, e.g., the 88K architecture. And auto-increment/decrement addressing modes, such as available on ARM
    A32 and A64, and HPPA, do not fit the tree parsing paradigm.

    Yup. They didn't push the "make it simple for compilers" as far as they
    could have. There were other competing desires.


    === Stefan
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Thomas Koenig@tkoenig@netcologne.de to comp.arch on Sat Nov 14 14:04:13 2026
    From Newsgroup: comp.arch

    MitchAlsup <user5857@newsgrouper.org.invalid> schrieb:
    Thomas Koenig <tkoenig@netcologne.de> posted:

    Stephen Fuld <sfuld@alumni.cmu.edu.invalid> schrieb:
    On 11/11/2026 10:53 PM, Thomas Koenig wrote:
    Stephen Fuld <sfuld@alumni.cmu.edu.invalid> schrieb:

    It seems the
    advantage of an SIMD approach is the large set of addressable registers >> >>> that can be used to keep data readily available for future use.

    Plus, you can do wide permutes, and it can also help with reduction.
    Having mask for reducing operations also helps (or a length field).

    There is one other thing that VVM does not do natively: Reductions
    on commutative operators.

    When we talked about reductions on VVM in a thread some months ago, I
    thought Mitch said that VVM could parallelize such reductions, including >> > handling an array size that was not a multiple of the number of
    functional units used (i.e. the degree of parallelism), and combining
    the partial sums at the end. As I have said, I am not a hardware guy
    but that sounded impressive and I don't know how he does that.

    I don't see this in the manuals, at least. Mitch, did I miss it?

    The augend input to FMAC has a special feed-forward mechanism {-|Architectural}

    I may have to do something special when running 4-wide.


    So, in order to do efficient reductions, the vectorized VVM
    loops will also have to be unrolled, with a final horizontal
    reduction step (like I wrote above).
    --
    This USENET posting was made without artificial intelligence,
    artificial impertinence, artificial arrogance, artificial stupidity,
    artificial flavorings or artificial colorants.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Michael S@already5chosen@yahoo.com to comp.arch on Sat Nov 14 18:36:12 2026
    From Newsgroup: comp.arch

    On Fri, 13 Nov 2026 21:51:25 GMT
    anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote:

    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    Stefan Monnier <monnier@iro.umontreal.ca> writes:
    And how is the answer affected by subsequent operations accessing
    the same memory location?

    Just the same as on a RISC: You run register allocation before
    instruction selection, so if a value is accessed several times and >registers are available, the value will be allocated into a register,
    on both architecture styles.

    Actually, normally register allocation is performed after instruction selection. So if the operand is a local variable that can be in a
    register (no address taken), it will be assumed to be in a register,
    for instruction selection. Later the register allocator actually
    tries to allocate a register for the variable, and if not, on a RISC
    spill code is inserted with additional live ranges, and the register allocator has to run again (at least that's the way that Chaitin and
    Briggs described this). On a VAX, you just use a memory operand for
    those variables that do not fit into registers.

    vVM is a microarchitectural mechanism,

    Is it? I use it as a way to refer to the design of VEC+LOOP (which
    is so designed as to allow a particular micro-architecture).

    Architecturally, LOOP is a branch (maybe it also deals with the loop >counter?), and VEC is a noop AFAIK.

    And the fact that VVM is a microarchitectural mechanism is it's
    beauty. The semantics are just the same as for the whole loop without
    VVM.

    - anton

    How would you do it for non-associative arithmetic opcodes like
    floating-point?



    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Michael S@already5chosen@yahoo.com to comp.arch on Sat Nov 14 18:18:24 2026
    From Newsgroup: comp.arch

    On Fri, 13 Nov 2026 17:05:26 +0100
    Terje Mathisen <terje.mathisen@tmsw.no> wrote:

    Michael S wrote:
    On Fri, 13 Nov 2026 15:19:04 +0100
    Terje Mathisen <terje.mathisen@tmsw.no> wrote:

    George Neuner wrote:
    WRT the Mill, I think people here may be missing that it supported
    short-vector-SIMD, and that a vector operand on its belt was a
    single element [of whatever width] - not a bunch of scalars that
    magically would be operated on together.

    Yes and no, see below.

    According to Ivan, the Mill's instruction set supported quad FP
    and 128-bit short vector SIMD.
    [Similar width as Intel's SSE2, though SSE_ doesn't do quad FP.]

    He spoke about the potential for [more lanes] wider SIMD and made
    clear that, whatever widths were supported, the "operands" still
    would be treated as single belt elements.

    The real magic sauce is the fact that belt operands carries
    metadata, including not just byte/short/int/long/float/double/etc
    designators, but also a vector vs scalar boolean, as well as None
    and NAR (Not A Result, similar to NaN but even more powerful).

    This means that Mill only needs a single ADD instruction, it
    automagically handles vector/scalar/multiple element sizes based on
    those metadata bits.

    If you want to treat 16 bytes, loaded as 16 unsigned bytes, as if
    they were 8 int16_t's, then you need to convert the entry.

    Terje

    PS. Expect to see Mill return to being generally visible in the
    near future.


    Still with aspiration to actually implement it in silicon?
    Or realistic?

    I sincerely hope so since I would love to be able to run on actual
    silicon, not just a sw simulator! :-)

    Terje




    Aiming too high, you'll hit nothing for sure.
    Being realistic, it was possible to have Mill running as a soft core on
    FPGA back in the previous decade.
    Which could have helped with higher aspirations as well. Of course,
    under assumption that the whole idea of Mill holds water.





    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Sat Nov 14 17:53:07 2026
    From Newsgroup: comp.arch

    Michael S <already5chosen@yahoo.com> writes:
    How would you do it for non-associative arithmetic opcodes like >floating-point?

    IIRC Mitch Alsup's answer to FP reduction is an accumulator with about
    2100 bits or so. It's not clear to me how one can accumulate 16 DP FP
    values per cycle, like Zen5 can do.

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Michael S@already5chosen@yahoo.com to comp.arch on Sat Nov 14 20:16:56 2026
    From Newsgroup: comp.arch

    On Sat, 14 Nov 2026 17:53:07 GMT
    anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote:

    Michael S <already5chosen@yahoo.com> writes:
    How would you do it for non-associative arithmetic opcodes like >floating-point?

    IIRC Mitch Alsup's answer to FP reduction is an accumulator with about
    2100 bits or so. It's not clear to me how one can accumulate 16 DP FP
    values per cycle, like Zen5 can do.

    - anton

    It still does not produce the same result as sequiential code.
    May be, better, but not the same.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Sat Nov 14 18:32:08 2026
    From Newsgroup: comp.arch

    Michael S <already5chosen@yahoo.com> writes:
    On Sat, 14 Nov 2026 17:53:07 GMT
    anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote:
    IIRC Mitch Alsup's answer to FP reduction is an accumulator with about
    2100 bits or so. It's not clear to me how one can accumulate 16 DP FP
    values per cycle, like Zen5 can do.

    - anton

    It still does not produce the same result as sequiential code.

    Of course the (architectural) code does not add an FP value with
    another FP value, instead it always adds to the accumulator; so the
    programmer or compiler has to know what they are doing.

    Adding to the accumulator produces an exact result. So the order in
    which you add is irrelevant.

    A way to do it in parallel would be to have 16 accumulators that each
    can do one addition per cycle, and add them all in the end. But that
    would be very expensive to implement. Maybe there is a clever way to
    add more than one value per cycle.

    It's less clear to me if one can use an accumulator for
    multiplicative reduction and if that can be parallelized, but it's
    rare AFAIK, so it may not be so important to make it fast.

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Michael S@already5chosen@yahoo.com to comp.arch on Sat Nov 14 20:56:37 2026
    From Newsgroup: comp.arch

    On Sat, 14 Nov 2026 18:32:08 GMT
    anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote:

    Michael S <already5chosen@yahoo.com> writes:
    On Sat, 14 Nov 2026 17:53:07 GMT
    anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote:
    IIRC Mitch Alsup's answer to FP reduction is an accumulator with
    about 2100 bits or so. It's not clear to me how one can
    accumulate 16 DP FP values per cycle, like Zen5 can do.

    - anton

    It still does not produce the same result as sequiential code.

    Of course the (architectural) code does not add an FP value with
    another FP value, instead it always adds to the accumulator; so the programmer or compiler has to know what they are doing.


    O.k.

    Adding to the accumulator produces an exact result. So the order in
    which you add is irrelevant.


    I think that it is only almost irrelevant. Overflows still can differ.
    Or may be not, if you have few more bits?

    A way to do it in parallel would be to have 16 accumulators that each
    can do one addition per cycle, and add them all in the end. But that
    would be very expensive to implement. Maybe there is a clever way to
    add more than one value per cycle.

    It's less clear to me if one can use an accumulator for
    multiplicative reduction and if that can be parallelized, but it's
    rare AFAIK, so it may not be so important to make it fast.

    - anton

    FMA reduction is the most common by far.
    But Horner scheme is not exactly unseen of.





    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From MitchAlsup@user5857@newsgrouper.org.invalid to comp.arch on Sat Nov 14 19:07:36 2026
    From Newsgroup: comp.arch

    Thomas Koenig <tkoenig@netcologne.de> posted:

    MitchAlsup <user5857@newsgrouper.org.invalid> schrieb:
    Thomas Koenig <tkoenig@netcologne.de> posted:

    Stephen Fuld <sfuld@alumni.cmu.edu.invalid> schrieb:
    On 11/11/2026 10:53 PM, Thomas Koenig wrote:
    Stephen Fuld <sfuld@alumni.cmu.edu.invalid> schrieb:

    It seems the
    advantage of an SIMD approach is the large set of addressable registers
    that can be used to keep data readily available for future use.

    Plus, you can do wide permutes, and it can also help with reduction.
    Having mask for reducing operations also helps (or a length field).

    There is one other thing that VVM does not do natively: Reductions
    on commutative operators.

    When we talked about reductions on VVM in a thread some months ago, I >> > thought Mitch said that VVM could parallelize such reductions, including
    handling an array size that was not a multiple of the number of
    functional units used (i.e. the degree of parallelism), and combining >> > the partial sums at the end. As I have said, I am not a hardware guy >> > but that sounded impressive and I don't know how he does that.

    I don't see this in the manuals, at least. Mitch, did I miss it?

    The augend input to FMAC has a special feed-forward mechanism {-|Architectural}

    I may have to do something special when running 4-wide.


    So, in order to do efficient reductions, the vectorized VVM
    loops will also have to be unrolled, with a final horizontal
    reduction step (like I wrote above).

    I think not. I may need to build a reduction summer and recognize
    the pattern from asm code.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Terje Mathisen@terje.mathisen@tmsw.no to comp.arch on Sat Nov 14 23:38:19 2026
    From Newsgroup: comp.arch

    Anton Ertl wrote:
    Michael S <already5chosen@yahoo.com> writes:
    How would you do it for non-associative arithmetic opcodes like
    floating-point?

    IIRC Mitch Alsup's answer to FP reduction is an accumulator with about
    2100 bits or so. It's not clear to me how one can accumulate 16 DP FP
    values per cycle, like Zen5 can do.

    A superaccumulator using fully redundant storage (bits + carries) can
    add another input in a small fraction of a clock cycle, you just need
    parallel aligners to allow mantissa bits to enter in the right spot.

    Probably not 16 doubles every clock cycle, but much more than one. That
    Zen5 needs a pair of 512-bit accumulators to do it, right?

    Total number of accumulator bits are in the same ballpark, but a Superaccumulator will give the correct/exact answer totally independent
    of the aggregation order, something which you definitely cannot claim
    for that 16-wide Zen5 AVX-512 version. (For the last claim to be true,
    you actually need a fair number of extra bits so that you cannot get a spurious intermediate overflow due to a particularly bad operand ordering.)

    Terje
    --
    - <Terje.Mathisen at tmsw.no>
    "almost all programming can be viewed as an exercise in caching"
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Sun Nov 15 06:56:55 2026
    From Newsgroup: comp.arch

    Michael S <already5chosen@yahoo.com> writes:
    On Sat, 14 Nov 2026 18:32:08 GMT
    anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote:
    Adding to the accumulator produces an exact result. So the order in
    which you add is irrelevant.


    I think that it is only almost irrelevant. Overflows still can differ.
    Or may be not, if you have few more bits?

    Yes. But how many more bits? I guess you have to use on the order of
    60 extra bits if you want to support accumulating over several years
    without forcing overflow detection in the meantime.

    Alternatively, the architecture could require an explicit
    overflow-check instruction every n adds to the accumulator, and then
    the additions could not be reordered wrt. this instruction. 60 extra
    bits looks more attractive to me.

    But Horner scheme is not exactly unseen of.

    How would it be sped up in SIMD? Un-Horner it and compute all the
    powers in parallel, then multiply with the coefficients in parallel,
    then add up the summands with pairwise addition?

    With VVM, the parallel parts should be relatively straightforward to
    do, and then the pairwise addition parts would be done with the
    reduction support, whatever it is.

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Sun Nov 15 07:18:25 2026
    From Newsgroup: comp.arch

    Terje Mathisen <terje.mathisen@tmsw.no> writes:
    Anton Ertl wrote:
    Michael S <already5chosen@yahoo.com> writes:
    How would you do it for non-associative arithmetic opcodes like
    floating-point?

    IIRC Mitch Alsup's answer to FP reduction is an accumulator with about
    2100 bits or so. It's not clear to me how one can accumulate 16 DP FP
    values per cycle, like Zen5 can do.

    That
    Zen5 needs a pair of 512-bit accumulators to do it, right?

    You use n*2 ZMM (512-bit) registers to accumulate stuff in the main
    loop, where n>= the latency in cycles of the fadd (or fma, if that is
    used). The latency is 2 cycles for Zen6, but higher for Zen5. In the
    end you use pairwise addition with ld(16*n) levels to reduce these n*2
    ZMM registers to a single FP value.

    Total number of accumulator bits are in the same ballpark, but a >Superaccumulator will give the correct/exact answer totally independent
    of the aggregation order, something which you definitely cannot claim
    for that 16-wide Zen5 AVX-512 version.

    Yes. So one has to code this explicitly, or, when using compiler auto-vectorization, use a flag like -ffast-math to tell the compiler
    that you don't care for bit-accurate results and that it can
    re-associate FP addition and multipliation.

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Michael S@already5chosen@yahoo.com to comp.arch on Sun Nov 15 09:40:45 2026
    From Newsgroup: comp.arch

    On Sun, 15 Nov 2026 06:56:55 GMT
    anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote:

    Michael S <already5chosen@yahoo.com> writes:
    On Sat, 14 Nov 2026 18:32:08 GMT
    anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote:
    Adding to the accumulator produces an exact result. So the order
    in which you add is irrelevant.


    I think that it is only almost irrelevant. Overflows still can
    differ. Or may be not, if you have few more bits?

    Yes. But how many more bits? I guess you have to use on the order of
    60 extra bits if you want to support accumulating over several years
    without forcing overflow detection in the meantime.

    Alternatively, the architecture could require an explicit
    overflow-check instruction every n adds to the accumulator, and then
    the additions could not be reordered wrt. this instruction. 60 extra
    bits looks more attractive to me.

    But Horner scheme is not exactly unseen of.

    How would it be sped up in SIMD? Un-Horner it and compute all the
    powers in parallel, then multiply with the coefficients in parallel,
    then add up the summands with pairwise addition?


    May be that.
    May be, if app allows, by evaluation of several polys in parallel.
    May be, something completely different.
    But with SIMD explicit, it's just another engineering task.
    With VMM you don't know what to do. Not unlike with magic autovec by
    compiler.

    With VVM, the parallel parts should be relatively straightforward to
    do, and then the pairwise addition parts would be done with the
    reduction support, whatever it is.

    - anton


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Thomas Koenig@tkoenig@netcologne.de to comp.arch on Sun Nov 15 11:25:53 2026
    From Newsgroup: comp.arch

    Anton Ertl <anton@mips.complang.tuwien.ac.at> schrieb:
    Michael S <already5chosen@yahoo.com> writes:
    How would you do it for non-associative arithmetic opcodes like >>floating-point?

    IIRC Mitch Alsup's answer to FP reduction is an accumulator with about
    2100 bits or so.

    See https://en.wikipedia.org/wiki/Karlsruhe_Accurate_Arithmetic ,
    a development of the group of Prof. Kuisch at Karlsruhe, which
    was implemented on an IBM 4361. (I had to do my basic programming
    courses on a Pascal version which implemented this

    It's not clear to me how one can accumulate 16 DP FP
    values per cycle, like Zen5 can do.

    Lots of pipelining and lots of full adders would be my guess.
    --
    This USENET posting was made without artificial intelligence,
    artificial impertinence, artificial arrogance, artificial stupidity,
    artificial flavorings or artificial colorants.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Sun Nov 15 17:03:32 2026
    From Newsgroup: comp.arch

    Thomas Koenig <tkoenig@netcologne.de> writes:
    Anton Ertl <anton@mips.complang.tuwien.ac.at> schrieb:
    Michael S <already5chosen@yahoo.com> writes:
    How would you do it for non-associative arithmetic opcodes like >>>floating-point?

    IIRC Mitch Alsup's answer to FP reduction is an accumulator with about
    2100 bits or so.
    ...
    It's not clear to me how one can accumulate 16 DP FP
    values per cycle, like Zen5 can do.

    Lots of pipelining and lots of full adders would be my guess.

    One way to do it would be to add up the 16 operands using pairwise
    addition, and then finally add the result to the accumulator. That
    approach would cost a lot of transistors, however.

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From EricP@ThatWouldBeTelling@thevillage.com to comp.arch on Sun Nov 15 12:36:10 2026
    From Newsgroup: comp.arch

    On 2026-Nov-13 02:20, Anton Ertl wrote:
    EricP <ThatWouldBeTelling@thevillage.com> writes:
    Wikipedia mentions an earlier array processor, the 3838

    https://www.bitsavers.org/pdf/ibm/3838/Array_Processor_Status_Report_Jan76.pdf

    "HARDWARE
    1 MEGABYTE BULK STORE (24K POINTS, 1M-PURCHASE)
    24/48 BIT FRACTION
    ARITHMATIC ELEMENT
    2 ADDERS
    1 MULTIPLIER
    HIGHLY PIPELINED
    100 NS CYCLE
    2-1000 WORD WORKING STORES
    MICROPROGRAMMED
    SHORT/LONG PRECISION
    No ERROR CHECKING
    CONTROL PROCESSOR
    2 MICRO SECOND CYCLE
    CONTROLS DATA TRANSFERS
    HOST TO BULK STORE (3M B/S)
    BULK STORE TO WORKING STORE (40M B/S)
    PROVIDES OVERLAP
    370 CHANNEL INTERFACE

    So that's around the same time as Cray-1, maybe inspired by earlier
    pipelined vector machines by TI and CDC.

    The cycle time is 8 times longer than that of the Cray-1, so the
    Cray-1 probably resulted in very low sales for the 3838.

    Both the 2938 and 3838 documents are internal marketing docs.
    Both contain confidential comparisons to multiple IBM systems and competitors. They seem to be trying to figure out who might buy their kit.

    3838 doc compares Cray-1, CDC 7600, Cyber 175, Amdahl 470/V6
    to IBM 195, 168 AP, 168 MP, 168 UP, 158 MP, 158 UP, 145
    and the base speed is 1.0 for a 168 UP,
    Cray-1 is 10 to 14 times faster, 195 is 2 to 5 times faster.
    I don't see where they compare 3838 vector performance.

    The use of the channels for these kinds of accelerators is
    interesting. Maybe this was the inspiration for the way that the SPEs
    in the Cell Broadband Engine (used in, e.g., the Playstation 3)
    interface to the rest of the system. I'll ask Michael Gschwind when I
    see him (he occasionally visits his alma mater).

    Actually the 2938 document has some analysis of its pros and cons,
    and the channel attachment is part of its cons as it bottlenecks the whole thing.
    The 2938 only allowing single precision is another.

    While reading up on Cell and Michal Gschwind, I found the following, which leads us back to vector extensions on S390x:

    <https://en.wikipedia.org/wiki/Michael_Gschwind#SIMD_Parallel_vector_architecture>
    |To enable efficient compilation, Gschwind proposed the implementation
    |of merged scalar and vector execution units, eliminating the cost of
    |copies between scalar and vectorized code, and simplifying compiler |architecture by resolving phase ordering problems in compilers.
    |
    |The Cell's accelerator cores (Synergistic Processor Unit SPU) contain
    |a single 128 element register file with 128 bit per register.
    |Registers may hold either scalar or a vector of multiple values.[66]
    |The simplified cost model leads to significantly improved
    |vectorization success, improving overall program performance and |efficiency.[67]
    |
    |The vector-scalar approach was also adopted by the IBM Power VSX
    |(Vector Scalar Extension) SIMD instructions,[68] BlueGene/Q vector |instructions[69][70] and System/z mainframe vector instruction
    |set,[42][71] the design of all three IBM vector-scalar architectures
    |having been led by Gschwind as Chief Architect for IBM System
    |Architecture.

    So IBM reuses architectural (and probably implementation) work across
    its various architectures. This has also happened with decimal FP
    appearing on Power and S390x. So the S390x vector stuff probably was
    not demand-driven, but supply-driven. One would have to compare the
    vector extensions of the various architectures (and architecture
    versions) to see if there are any parts that occur only on some of
    them and where they appear first. One can assume that demand puts the feature in the first architecture, and then supply puts it in the
    others.

    It mentions an earlier array processor, the 2938, note the date of 1966

    https://www.bitsavers.org/pdf/ibm/2938/Functional_Objectives_for_an_Array_Processor_Nov66.pdf

    "August 1967
    THE 2938 ARRAY PROCESSOR

    The 2938 Array Processor is a peripheral processor for attachment to
    System/360 Models 44, 65, and 75.
    ...
    The arithmetic unit of the 2938 is a multiplication and addition unit which >> performs the operation Z = U*X +- Y. The unit operates on System/360
    short-operand floating-point data only.
    ...
    the combined multiply and add time is effectively 200 nanoseconds,
    whereas the total time for a particular set of U, X I and Y to pass
    through the arithmetic unit to form the resultant Z is approximately
    800 nanoseconds."

    Should I interpret that as 800ns latency with a throughput of 1/200ns?
    That would then be an early case of a pipelined vector processor.

    - anton

    I'm guessing both are pipelined FPU's which run at their 100/200 ns clocks
    if working with register operands but stall with 3 us memory accesses.
    Also the channel overhead doesn't help, plus it signals completion with an interrupt and I've never heard anything nice about 370 interrupt timing.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From EricP@ThatWouldBeTelling@thevillage.com to comp.arch on Sun Nov 15 12:45:06 2026
    From Newsgroup: comp.arch

    On 2026-Nov-13 11:36, Stephen Fuld wrote:
    On 11/13/2026 7:28 AM, EricP wrote:
    On 2026-Nov-12 15:43, Robert Finch wrote:

    snip
    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.

    Yes.-a I look at it as sort of a fixed length stack (put new elements at the top an push all other elements down) with the enhancement that you can address, for reading only, stack elements other than the top.


    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.

    IIRC, the Mill implements it using the output buffers of each functional unit plus each having a "position register" of log2 (number of FUs) bit register that gives that register's position within the stack.-a Each instruction sets the register corresponding to that instruction to TOS and increments all the other position registers.-a No actual separate register set and no shifting.

    I'm borrowing it's architectural model of relative register addressing.
    Yeah, I skipped over their implementation as I didn't have a good mental picture of exactly how it works.

    AIUI each Mill FU has a small set of output registers which gives a
    private write port to its bank.
    But it also has something to do with instruction latency.
    And it tracks where each belt slot resides (in effect a renamer).
    But what happens when all the small set of output registers are full -
    where does the next output go? Seems like they would have to shuffle everything about.

    Since each output register can hold a belt value, Mill requires a giant crossbar to route any output register to each FU as a source operand.
    This looked to me like a register file with a read port for each
    belt slot, for each source operand.
    It wasn't clear to me where the benefit of this approach was.
    I chock this up to me not grokking their internal details.

    Links to the belt patents are below.

    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.

    Yes.


    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.

    Yes, although with the Mill (IIRC), the "shift" is logical not physical.

    Yes, I'm referring to an architectural or logical belt.
    It is also possible to do an OoO belt with more physical
    registers than the logical number of belt slots.

    If anyone is interested the Mill patents are here: https://patents.google.com/?assignee=Mill+Computing+Inc&sort=new

    The two that seem relevant to the belt operation are:

    US20150347142A1 - Computer Processor Employing Split Crossbar Circuit
    For Operand Routing And Slot-Based Organization Of Functional Units https://patents.google.com/patent/US20150370738A1/en

    US20150370570A1 - Computer Processor Employing Temporal Addressing
    For Storage Of Transient Operands https://patents.google.com/patent/US20150370570A1/en


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From MitchAlsup@user5857@newsgrouper.org.invalid to comp.arch on Sun Nov 15 18:42:46 2026
    From Newsgroup: comp.arch

    Michael S <already5chosen@yahoo.com> posted:

    On Fri, 13 Nov 2026 21:51:25 GMT
    anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote:

    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    Stefan Monnier <monnier@iro.umontreal.ca> writes:
    And how is the answer affected by subsequent operations accessing
    the same memory location?

    Just the same as on a RISC: You run register allocation before >instruction selection, so if a value is accessed several times and >registers are available, the value will be allocated into a register,
    on both architecture styles.

    Actually, normally register allocation is performed after instruction selection. So if the operand is a local variable that can be in a
    register (no address taken), it will be assumed to be in a register,
    for instruction selection. Later the register allocator actually
    tries to allocate a register for the variable, and if not, on a RISC
    spill code is inserted with additional live ranges, and the register allocator has to run again (at least that's the way that Chaitin and
    Briggs described this). On a VAX, you just use a memory operand for
    those variables that do not fit into registers.

    vVM is a microarchitectural mechanism,

    Is it? I use it as a way to refer to the design of VEC+LOOP (which
    is so designed as to allow a particular micro-architecture).

    Architecturally, LOOP is a branch (maybe it also deals with the loop >counter?), and VEC is a noop AFAIK.

    And the fact that VVM is a microarchitectural mechanism is it's
    beauty. The semantics are just the same as for the whole loop without
    VVM.

    - anton

    How would you do it for non-associative arithmetic opcodes like floating-point?

    As Ivan would say:: Not Yet Filed.


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From MitchAlsup@user5857@newsgrouper.org.invalid to comp.arch on Sun Nov 15 18:51:51 2026
    From Newsgroup: comp.arch

    Terje Mathisen <terje.mathisen@tmsw.no> posted:

    Anton Ertl wrote:
    Michael S <already5chosen@yahoo.com> writes:
    How would you do it for non-associative arithmetic opcodes like
    floating-point?

    IIRC Mitch Alsup's answer to FP reduction is an accumulator with about
    2100 bits or so. It's not clear to me how one can accumulate 16 DP FP values per cycle, like Zen5 can do.

    A superaccumulator using fully redundant storage (bits + carries) can
    add another input in a small fraction of a clock cycle, you just need parallel aligners to allow mantissa bits to enter in the right spot.

    Yes

    Probably not 16 doubles every clock cycle, but much more than one. That
    Zen5 needs a pair of 512-bit accumulators to do it, right?

    16 inputs per cycle in carry-save form is only 8-gates of delay for accumulation.

    Total number of accumulator bits are in the same ballpark, but a Superaccumulator will give the correct/exact answer totally independent
    of the aggregation order, something which you definitely cannot claim
    for that 16-wide Zen5 AVX-512 version. (For the last claim to be true,
    you actually need a fair number of extra bits so that you cannot get a spurious intermediate overflow due to a particularly bad operand ordering.)

    Terje

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From MitchAlsup@user5857@newsgrouper.org.invalid to comp.arch on Sun Nov 15 19:00:03 2026
    From Newsgroup: comp.arch

    anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:

    Michael S <already5chosen@yahoo.com> writes:
    On Sat, 14 Nov 2026 18:32:08 GMT
    anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote:
    Adding to the accumulator produces an exact result. So the order in
    which you add is irrelevant.


    I think that it is only almost irrelevant. Overflows still can differ.
    Or may be not, if you have few more bits?

    Yes. But how many more bits? I guess you have to use on the order of
    60 extra bits if you want to support accumulating over several years
    without forcing overflow detection in the meantime.

    Alternatively, the architecture could require an explicit
    overflow-check instruction every n adds to the accumulator, and then
    the additions could not be reordered wrt. this instruction. 60 extra
    bits looks more attractive to me.

    But Horner scheme is not exactly unseen of.

    How would it be sped up in SIMD? Un-Horner it and compute all the
    powers in parallel, then multiply with the coefficients in parallel,
    then add up the summands with pairwise addition?

    See: Estrin's method--it tree-ifies Horner.

    With VVM, the parallel parts should be relatively straightforward to
    do, and then the pairwise addition parts would be done with the
    reduction support, whatever it is.

    - anton
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Thomas Koenig@tkoenig@netcologne.de to comp.arch on Sun Nov 15 19:49:56 2026
    From Newsgroup: comp.arch

    Anton Ertl <anton@mips.complang.tuwien.ac.at> schrieb:
    Thomas Koenig <tkoenig@netcologne.de> writes:
    Anton Ertl <anton@mips.complang.tuwien.ac.at> schrieb:
    Michael S <already5chosen@yahoo.com> writes:
    How would you do it for non-associative arithmetic opcodes like >>>>floating-point?

    IIRC Mitch Alsup's answer to FP reduction is an accumulator with about
    2100 bits or so.
    ...
    It's not clear to me how one can accumulate 16 DP FP
    values per cycle, like Zen5 can do.

    Lots of pipelining and lots of full adders would be my guess.

    One way to do it would be to add up the 16 operands using pairwise
    addition, and then finally add the result to the accumulator. That
    approach would cost a lot of transistors, however.

    That would be quite inefficient. Far better to use full adders to
    do 3:2 compressions (for example); six layers would compress 19
    inputs down to 2, and that could be doable in a cycle or two
    Afterwards, it is "only" an addition of two numbers with around
    2100 bits (I forget the exact number).

    But I suspect a lot of optimization can go into that sort of thing.
    --
    This USENET posting was made without artificial intelligence,
    artificial impertinence, artificial arrogance, artificial stupidity,
    artificial flavorings or artificial colorants.
    --- Synchronet 3.22a-Linux NewsLink 1.2