Teodor-Dumitru Ene has been doing some interesting work on optimising hardware adders. Until I spoke with him, I didn’t realise how important this basic digital building block really is. An interesting statistic from his presentation slides:
When a RISC-V processor boots into Linux, 65% to 72% of instructions use addition.
By default, Yosys will synthesise something like this:
reg [31:0] a; reg [31:0] b; wire sum = a + b; Using a ‘middle of the road’ adder, that gives medium PPA (power, performance, area) results.