Compute-in-ROM : a in-memory activation-aware dot-product compute macro for low-cost edge devices