Analysis and Implementation of Dense On-Die Memories Using Traditional and Compute-in-Memory Approaches