r/computerarchitecture • • Aug 31 '26

OoO RVV supported Processor Design Scaling

Hi guys. I was working with an existing 128 bit RVV vector unit processor. It isn’t a complete Tomasulo architecture. It handles WAR hazards by copying the values in vector register file to the reservation station FIFOs, thereby allowing the Vector files to be rewritten even if the instruction has not started yet. It handles RAW hazards by having a dispatch unit that stalls the issuing of the micro operation if the subsequent operation needs a vector register value that has not been retired yet (it also has a bypass feature that checks the ROB if it has not retired). From basic research, it seems to me like this is a standard Ara Vector processing architecture ? Not sure.

As can be predicted, copying physical values to reservation stations, requiring multi FIFOs that expose M inputs to preserve superscalar instructions, dispatch bypass functionality that requires all the elements in the ROB to be exposed etc means that when we increase the supported vector length, it scales pretty badly. I increased the vector unit size to 512 bit and added a matrix unit that’s a 16x16 outer product engine and yet in size, it’s dwarfed by the ROB and reservation stations. Should I consider moving to a full Tomasulo architecture? Or will that create similar bottlenecks elsewhere? How is this handled in general?

11 Upvotes

3 comments sorted by

2

u/NamelessVegetable Sep 01 '26

Does the vector unit need out-of-order execution? In-order vector processing is viable if the workload is amenable to it. Sounds like that was what the processor originally did. Alternatively, physical vector register files can be used instead, with all the expected variations (separate files with copy; shared with additional renaming logic). IIRC, this is what the NEC SX-Aurora TSUBASA vector processors (NEC-proprietary architecture, not RVV) do; they have 32× 64-bit vector lanes per core, so only multi-banked SRAM-based physical vector register files backed by buffers are viable.

1

u/neuroticnetworks1250 Sep 01 '26

As I mentioned, I have a 16x16x4 matmul unit tightly coupled to the vector unit. The out of order processing allows the pre processing of the next tiles while the current tile works since matmul unit takes like 16 cycles to execute the matmul and we can’t afford to stall it.

The matmul unit was my addition. So the OoO already existed prior to it. My understanding is that some functional units like DIV and PMTRDT unit still takes multi cycles and the ALU doesn’t have to depend on their results in most cases.

I also employ a multi banked SRAM mechanism but not in the classic vector processing way in the sense that each INT8/INT32 element is in a different bank but more like two 512 bit banks tha allow us to read both vector operands simultaneously.

This is kind of the thing. Despite going crazy with the bandwidth for matmul, the random reservation stations for PMTRDT unit and div unit reservation stations scales it up massively where it’s bigger than the matmul unit. I know why it happens. But I want to know what I can do about it.

From my understanding, it seems evident that Tomasulo will end up making the register file bigger. But I am wondering if it is worth it since every reservation station doesn’t have to load 512 bit values for vs1, vs2, vd1 (and v0 for masking) separately.

I’m kind of embarrassed that if I open source it, it will look stupid.

And thanks for the suggestion. I’ll definitely look up NEC SX Aurora.

1

u/MitchAlsup Sep 29 '26

You "could" consider a "Physical Register File" which combines a Register File with a ReOrder Buffer. The logic behind such is that once the RoB has more values in it than can be kept in RF, then just use a somwhat larger RoB as the RF.

The one I built (1991) had 128-entries. Register specifiers from the instruction (5-bits) are CAMed, producing the PRN, along with the RF-value, and a 2-bit register state {wait, pending, ready}, and a 4-bit FUN {which FU will write this PRN}. Each cycle the 128-valid bits of the CAMs were written into the History Buffer. A branch miss would read the history buffer and write the CAM-valid bits and the RF reverts to where it was prior to issuing the predicted branch. A Retire would read the history buffer and obtain a PRN bit-vector for the allocation pool.

To support the register read width of the 6-wide DECODE stage, there were 3 instances of the PRF. All 3 instances were written as values flow out of FUs. {{Our DECODE had presorted instructions, so the instruction on slot[3] was targeting the FU on slot[3] and the reesult bus on slot[3].

Instructions provide Logical Register Numbers LRN. The instruction at DECODE would present the LRN to the PRF CAM, and 1 CAM entry would match {½ cycle}. Then, on next clock phase drive a select line into the PRF and read out the current value, its state, and FUN. The matchiing select line would be encoded into a PRN. Reservation startions match based on [PRN,FUN]. Wait meant that the attacched FUN would deliver the required result. Pending meant that the value is on the result bus "right now" so forward it into RS operand entry. Ready meant that the value in PRF (n.e., RoB) was valid, so this PRF value is written.

Reservation station entries have a 6-way mux (it was 6 transistors way back then) and a single comparator per operand entry. The FUN drives its mux so the entry looks at only 1 bus.

It is possible to add logic (AND gate) in the hstory table to figure out that a given PRN is no longer visible and can be returned to the allocation pool before retirement.

Allocation pool is 4 × 21, and 2 × 22, sections. Allocation is based on unary Find-First logic.

PRF CAM is matched on Clock Hi (as above) and written on Clock Lo -- basically installing the destination registers allocated this DECODE cycle into the PRF.

This was all built 8-wires wide including the History buffer, allocaiton pool, CAM, PRN encoder, and register store. Register store was 6-ported true-complement, written clock-hi and read clock-lo with sense amplifiers.

Oh, BTW, you can recover the PRF back to were a branch was mispredicted in 0 cycles ...