Single photon avalanche diode (SPAD) arrays have proven themselves as serious candidates for time of flight positron emission tomography (PET). Discrete readout schemes mitigate the low-noise requirements of analog schemes and offer very fine control over threshold levels and timing pickup strategies. A high optical fill factor is paramount to timing performance in such detectors, and consequently space is limited for closely integrated electronics. Nonetheless, a production, daily used PET scanner must minimize bandwidth usage, data volume, data analysis time and power consumption and therefore requires a real-time readout and data processing architecture as close to the detector as possible. We propose a fully digital, embedded real-time readout architecture for SPAD-based detector. The readout circuit is located directly under the SPAD array instead of within or beside it to remove the fill factor versus circuit capabilities tradeoff. The overall real-time engine reduces transmitted data by a factor of 8 in standard operational mode. Combined with small local memory buffers, this significantly reduces overall acquisition dead time. A prototype device featuring individual readout for 6 scintillator channels was fabricated. Timing readout is provided by a first photon discriminator and a 31 ps time to digital discriminator, while energy reading and event packaging is done using standard logic in real-time. The dedicated serial output line supports a sustained rate of 170k counts per second (CPS) in waveform mode, while the standard operational mode supports 2.2 MCPS.