Embedding Logic and Non-volatile Devices in CMOS Digital Circuits for Improving Energy Efficiency