some more lottes & fluery.

This commit is contained in:
ed committed 2026-08-25 16:06:00 -04:00
1 parent 927025d052
commit ab5e01c7b6
19 files changed
+892

No files matched your search

@@ -0,0 +1,72 @@
---
title: "Operands/time = Perf"
type: archive
source: twitter
source_url: "https://x.com/NOTimothyLottes/status/2091652388184572155"
author: "NOTimothyLottes"
handle: NOTimothyLottes
post_id: "2091652388184572155"
date: 2026-08-23
archived: 2026-08-25
draft: false
tags:
- archive
- twitter
- NOTimothyLottes
description: "Operands/time = Perf"
in_reply_to: ""
---
## Source
- URL: https://x.com/NOTimothyLottes/status/2091652388184572155
- Author: NOTimothyLottes (@NOTimothyLottes)
- Posted: 2026-08-23 22:22:45
## Thread
**1/** @NOTimothyLottes
Operands/time = Perf
Mitigating amplifiers
a. Register reuse [avoid load]
b. Operand caching [avoid reg file access]
c. Destination reuse [forwarding]
d. Scalar constants + SIMD [broadcast]
e. Parallel subword extraction [inline decompression]
**2/** @NOTimothyLottes
f. Banking [for multi-port]
If reg file supports only 1 store source/port/clk then you'd need forwarding to open a clock to do a parallel load (with alu) for the given port. Likewise you'd need an isa "last use" (avoid reg write) to get parallel store [into reg file] (with alu).
**3/** @NOTimothyLottes
Seems like the best one can do on a xilinx fpga is 6 clock pipeline
[lutRAM]->[CLB1]->[DSP.ab]->[DSP.m]->[DSP.p]->[CLB2]->[lutRAM]
Where CLB1 does {DSP.p to multiplier operand forwarding to get 4 clock IMAD latency}. And accumulation uses internal c=p routing for "no" latency.
**4/** @NOTimothyLottes
CLB2 is injection for loads from BRAM (when regfile port store isn't needed for DSP.p). If register file is 3 way banked, and direct mapped (bank 0 -> CLB -> DSP.A), then there are 3 reads/clk and 3 writes/clk ... given a value is not needed in all banks, lots of pipelinabiliy
**5/** @NOTimothyLottes
But most FPGA SIMD soft processors stick to even longer pipelines, direct regfile in BRAM, and no usage of DSP P->C forwarding (accumulation). Which means they have heavy dilution of their memory/time (too many parallel tasks).
**6/** @NOTimothyLottes
I think it's better to hand unroll parallel tasks into one assembled instruction stream, expose variable latency {forwarded vs round-trip through reg file} --vs-- the alternative of HW managed multi-threading.
**7/** @NOTimothyLottes
However, how many arch have actual instruction stream compression? None? (x86 doesn't really count). If you build around massive unrolling, you are doing the same stuff with offset'ed operands -> so obviously wants compression, else a tiny I$ won't survive
**8/** @NOTimothyLottes
Ok, I lied, there are some historic examples of multi-component + SIMD which leverage a {1,2,3,4} ISA bitfield to repeat the op/compent, or SIMD itself via looping instruction -- which technically is a great example of "compression"
**9/** @NOTimothyLottes
Getting the 3x local memory vs operand data rate amplifier, along with memory hierarchy pipelining, sorted is perhaps the most important thing for realized IPC, but there is still the 100x operand vs external bandwidth mitigation which defines the platform ...
@@ -0,0 +1,52 @@
---
title: "One downsides to being a left justified machine and emulated on a FPGA is that one cannot use the built-in DSP's rounding capability through CIN."
type: archive
source: twitter
source_url: "https://x.com/NOTimothyLottes/status/2092088375205359693"
author: "NOTimothyLottes"
handle: NOTimothyLottes
post_id: "2092088375205359693"
date: 2026-08-25
archived: 2026-08-25
draft: false
tags:
- archive
- twitter
- NOTimothyLottes
description: "One downsides to being a left justified machine and emulated on a FPGA is that one cannot use the built-in DSP's rounding capability through CIN."
in_reply_to: ""
---
## Source
- URL: https://x.com/NOTimothyLottes/status/2092088375205359693
- Author: NOTimothyLottes (@NOTimothyLottes)
- Posted: 2026-08-25 03:15:12
## Thread
**1/** @NOTimothyLottes
One downsides to being a left justified machine and emulated on a FPGA is that one cannot use the built-in DSP's rounding capability through CIN. So the end of accumulation requires a long latency feedback of the MSB of P to effect LSB bits of C for final add before right shift
**2/** @NOTimothyLottes
Yields 2 options - that accumulation + expensive post accumulation rounding --OR-- round after each MUL by setting the shifted out LSBs of C based on XOR(A,B) MSBs and don't accumulate (no P) which means always a fixed 4 clk ALU latency [with forwarding]
**3/** @NOTimothyLottes
For reference - Left-justified signed IMAD: Reduced to a 3-bit machine with a 16-bit accumulator for testing [below], being used as a C model proxy for a 24-bit A expanded to 7 series 25-bits (the LSB 0), with a 18-bit B, and 24-bit C (and extracted 24-bit result in same slot).
![](https://pbs.twimg.com/media/HQiZnwQXIAAFcvO?format=png&name=orig)
**4/** @NOTimothyLottes
This is for a vector SIMD (a soft GPU). Effectively a 32-bit memory driving a 24-bit ALU with variable sub-word size {24,16,8,4} as inline compression/decompression HW. Noticed sub-word extraction gets less expensive if one uses SR on the registering flip-flop for LSB zeros.
**5/** @NOTimothyLottes
Been working on my little FPGA GPU project for quite some time, mostly trying to engineer out enough of the pipeline as mapped to CLBs/DSPs/dRAMs/bRAMs with basic rules like one CLB deep per pipeline stage per registering and no cascading, etc, to target peak frequency ...
**6/** @NOTimothyLottes
I'm engineering some horribly unconventional things, like a one instruction SIMD VLIW ALU (IMAD) with modifiers and surrounding support for binary searching "a*b/c" and "sqrt", etc, paired to a sub-word bit extraction/packing unit, sign conditional swap store to banked reg file
+2
View File
@@ -97,3 +97,5 @@ tags:
- [[archive/threads/NOTimothyLottes/2026-07-19-probably-shouldnt-consider-this-but-apparently]]
- [[archive/threads/NOTimothyLottes/2026-07-22-working-through-rough-draft-of-assembly-for-a]]
- [[archive/threads/NOTimothyLottes/2026-08-02-re-fpga-land-alus-im-firmly-distracted-by-an]]
- [[archive/threads/NOTimothyLottes/2026-08-23-operands-time-perf]]
- [[archive/threads/NOTimothyLottes/2026-08-25-one-downsides-to-being-a-left-justified-machine]]