Expand description
DRAM dataflow composition — the spatial-dataflow layer of the compute-in-memory target.
The DRAM plane’s hardware basis is {Copy, And, Or} (unmodified ComputeDRAM: RowClone + the
sense-amp majority) plus Not (the Ambit tier: dual-contact cells). {AND, OR, NOT} is
FUNCTIONALLY COMPLETE, so every boolean function — XOR, NAND, NOR, XNOR, set difference, … — is
realized by CHAINING those primitives through intermediate rows. That chaining IS a spatial
dataflow graph: edges are DRAM rows, nodes are in-DRAM primitives, and the memory computes the
whole graph in place. Composed bit-serially over bitplanes, the same basis yields integer
ARITHMETIC (ripple-carry ADD from XOR+MAJ) — the SIMDRAM construction (Hajinazar et al., ASPLOS
2021). Every composed op is proven ≡ its reference by executing the emitted prim sequence on the
Ambit-tier DRAM executor (exec_dram_ambit).
Structs§
- Dram
Dataflow - A straight-line in-DRAM dataflow graph: a growable row heap (operands then scratch) and the prim
sequence computed over it.
not/and/or/copyappend a node writing a FRESH scratch row and return its index; higher-level gates compose those. This is the compiler-side spatial graph the DRAM plane executes.
Functions§
- bit_
serial_ add - Bit-serial ripple-carry ADD over
Bbitplanes (SIMD across the lanes packed in each row): for each bit i,sum_i = a_i XOR b_i XOR carry,carry = MAJ(a_i, b_i, carry).a/bare the operand-plane row indices (LSB first);carry0is a zero row. Returns theBsum-plane rows. Composed entirely from the{AND, OR, NOT}basis — arithmetic emerging from boolean dataflow. - bit_
serial_ mul - Bit-serial unsigned MULTIPLY (shift-add): for each bit i of
b, adda(masked by planeb[i]) shifted up by i into anout_width-plane accumulator. Composed from AND +bit_serial_add— integer multiply from the boolean basis. Result isa·bmod 2^out_width per lane;zerois a zero row (accumulator seed + carry-in + high-plane filler). - bit_
serial_ sub - Bit-serial two’s-complement SUBTRACT:
a - b = a + NOT(b) + 1(mod 2^B). Negates eachbplane and ripple-adds with carry-in 1 (ones_carry= a row with every lane’s bit set). Returns theBdifference-plane rows. Arithmetic subtraction, still composed from the boolean basis in-DRAM.